You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
Within the responce of UserGetResponse is does not include the following
Start Choice [1]
AccessDeviceMultipleContactEndpointRead [0..1]
TrunkAddressingMultipleContactRead [0..1]
End Choice
cheers
The text was updated successfully, but these errors were encountered:
Indeed, I wondered how long it would take someone else to spot it ;)
I didn't take into account <xs:choice> </xs:choice> elements being returned. There are a few places in the code that need changing to handle these correctly. I have worked around this problem before a few times very easilly but can't remember exactly how and don't currently have a system to test with. If you can provide a working login I'll review fixing it.
To get around the problem, start by requesting a different response output format and post process from there untested code, doubt it'll work as-is but may give you a better idea on how to get the data out you need.
<?phprequire_once'vendor/autoload.php';
useBroadworksOCIP\api\Rel_17_sp4_1_197_OCISchemaAS\OCISchemaUser\UserGetRequest17sp4;
useBroadworksOCIP\Builder\Builder;
useBroadworksOCIP\Response\ResponseOutput;
$client = BroadworksOCIP\Factory::getTCPClient('ocip.example.com');
if ($client->login('user', 'pass')) {
$client->send(newUserGetRequest17sp4('userid@something.com'));
// Try request the response as a different outputType$responseAsJSON = $client->getResponse(ResponseOutput::JSON);
// If you need to make a new request based on the response data, Builder::buildComplex can merge into a new type$response = $client->getResponse();
$responseAsSimpleXML = $client->getResponse(ResponseOutput::SIMPLEXML);
$accessDevice = Builder::buildComplex($responseAsSimpleXML->AccessDeviceMultipleContactEndpointRead->accessDevice);
// If the above fails, you can access the raw response body and extract the elements manually$responseAsIs = $client->getLastResponseMsg();
$client->logout();
}
?>
Hi
Within the responce of UserGetResponse is does not include the following
Start Choice [1]
AccessDeviceMultipleContactEndpointRead [0..1]
TrunkAddressingMultipleContactRead [0..1]
End Choice
cheers
The text was updated successfully, but these errors were encountered: