Using SOAP Results
There are three types of results that can be returned from a successful wsapi SOAP call:
-
OpenAir Complex Type object
-
Array of ReadResult objects
-
Array of UpdateResult objects
ReadResult
The NSOA.wsapi.read(readRequest) function returns the ReadResult object.
For example, if the fields to be returned were "id, nickname, updated”, the objects property for the returned ReadResult object would be:
// example ReadResult object - assumes the fields to be returned were "id, nickname, updated"
[
{
"errors": null,
"objects": [
{
"id": "26",
"nickname": "mcollins",
"updated": "2019-10-03 15:42:23",
"return_fields": {
"id": "1",
"nickname": "1",
"updated": "1"
}
},
{
"id": "33",
"nickname": "jadmin",
"updated": "2019-09-03 09:12:46",
"return_fields": {
"id": "1",
"nickname": "1",
"updated": "1"
}
}
]
}
]
Property |
Value |
---|---|
objects |
Array of Complex Type objects, each with the following properties:
|
errors |
Array of oaError objects. |
UpdateResult
Thefollowing functions return the UpdateResult object.
Property |
Value |
---|---|
id |
Internal ID of the record created or updated. |
errors |
Array of oaError objects. |
status |
|
Also see Handling SOAP Errors.