Hi!
I have been searching for a soloution fo rtihis a long time now…
I cant figure out (or google out) how to do a soap request to an wsdl file witch want the xml file in nested regions.
If i manually test the soap with SoapUI, it works as it should.
In this example beneath is an request to an PBX system to change an extension Cll Handling Mode.
The XML should look like this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.ShoreTel.com/ProServices/SDK/Web">
<soapenv:Header/>
<soapenv:Body>
<web:RegisterClient>
<!--Optional:-->
<web:clientName>?</web:clientName>
<!--Optional:-->
<web:userAuthenticationInfo>
<web:UserDN>?</web:UserDN>
<web:UserID>?</web:UserID>
<web:UserPassword>?</web:UserPassword>
</web:userAuthenticationInfo>
</web:RegisterClient>
</soapenv:Body>
</soapenv:Envelope>
My problem is the region called userAuthenticationInfo with is inside the region RegisterClient.
I have a code for the RegisterClient (without the optional part userAuthenticationInfo).
It looks like this:
$soap = new SoapClient("http://172.21.1.50:8070/ShoreTelWebSDK?wsdl");
$req = new stdClass;
$req->clientName = "HQ";
$response = $soap->RegisterClient($req);
$handle = $response->RegisterClientResult;
$req = new stdClass;
$req->clientHandle = $handle;
$req->lineAddress = $data["busy"];
$response = $soap->OpenLine($req);
$lineId = $response->OpenLineResult->lineID;
$req = new stdClass;
$req->clientHandle = $handle;
$req->lineID = $lineId;
$req->getCallParties = true;
$req->getCallProperties = true;
$onPhone = false;
$response = $soap->GetActiveCalls($req);
$onPhone = isset($response->GetActiveCallsResult->ShoreTelCallStateInfo);
$value= $onPhone ? "Yes" : "No";
$req = new stdClass;
$req->clientHandle = $handle;
$response = $soap->UnegisterClient($req);
Now i would like to add the part userAuthenticationInfo also to this code.
The part userAuthenticationInfo should have the fields UserDN, UserID and UserPassword as seen above in the xml.
Can anyone help me how to accomplish this?