A node wrapper for the SOAP webservice on http://webservices.cibg.nl/Ribiz
npm install bigregister-soap --save
// import package
const bigRegister = require('bigregister-soap')
// connect to SOAP server
bigRegister.connect()
// find user data by BIG-number
.then(() => bigRegister.findByRegistrationNumber('xxx'))
.then((data) => {
// do something with data...
})
// catch errors
.catch((err) => {
// an error occurred
})
// import package
import bigRegister from 'bigregister-soap'
const example = async() => {
try {
// connect to SOAP server
await bigRegister.connect()
// find user data by BIG-number
const data = await bigRegisterApi.findByRegistrationNumber('xxx')
// do something with data
} catch(err) {
// an error occurred
}
}
-
Connect to SOAP server:
Method structure (pseudo code):
BigRegister.connect(wsdl:String):Promise.<void>
@note: it's not necessary to wait for resolving the promise, since each API method waits for this promise to be resolved.
const BigRegister = require('bigregister-soap') BigRegister.connect() .then(() => console.log('connected')) .catch((err) => console.error(`An error occurred: ${err}`))
-
Find user by BIG-number:
Method structure (pseudo code):
BigRegister.findByRegistrationNumber(bigNumber:String|Number): Promise.<Object>
const BigRegister = require('bigregister-soap') BigRegister.connect() .then(() => BigRegister.findByRegistrationNumber('xxx')) .then((data) => console.log(data)) .catch((err) => console.error(`An error occurred: ${err}`))