create php SOAP request -
create php SOAP request -
i wanna create soap request below
<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/axl/api/10.0"> <soapenv:header/> <soapenv:body> <ns:updateuser sequence="?"> <!--you have selection of next 2 items @ level--> <uuid>{74932749237942794729473927493829}</uuid> <userid>?</userid> <associatedgroups> <!--zero or more repetitions:--> <usergroup> <name>standard cti enabled</name> <!--optional:--> <userroles> <!--zero or more repetitions:--> <userrole>standard cti enabled</userrole> </userroles> </usergroup> <usergroup> <name>standard ccm end users</name> <!--optional:--> <userroles> <!--zero or more repetitions:--> <userrole>standard ccm end users</userrole> </userroles> </usergroup> </associatedgroups> </ns:updateuser> </soapenv:body> </soapenv:envelope>
i have code far:
$userid = "example@mydomain.com"; $retaccesswebex["useruuid"] = "{74932749237942794729473927493829}"; //sample useruuid $usergroup = array(); $userrolecti = array("standard cti enabled"); $usergroup[] = array( "name" => "standard cti enabled", "userroles" => array( "userrole" => $userrolecti, ) ); $userroleccm = array("standard ccm end users"); $usergroup[] = array( "name" => "standard ccm end users", "userroles" => array( "userrole" => $userroleccm, ) ); $param = array( "uuid" => $retaccesswebex["useruuid"], "userid" => $userid, "associatedgroups" => array( array( "usergroup" => $usergroup, ) ) ); $mywsdl = "pathtoschemawsdl/axlapi.wsdl"; $wsdl = "https://127.0.0.1:8443/axl/"; $client = new soapclient($mywsdl, array('trace' => true, 'exceptions' => true, 'location' => $wsdl, 'login' => 'administrator', 'password' => 'mtp455w0rd', )); $response = $client->updateuser($param);
however, when executing, error message:
fatal error: uncaught soapfault exception: [sender] soap-error: encoding: object has no 'name' property
try see in request
echo $client->__getlastrequestheaders(); echo $client->__getlastrequest();
php soap soap-client
Comments
Post a Comment