note 57032 added to function.soap-soapclient-soapcall

From: Date: Thu, 22 Sep 2005 04:38:06 +0000
Subject: note 57032 added to function.soap-soapclient-soapcall
Groups: php.notes 
Request: Send a blank email to php-notes+get-95572@lists.php.net to get a copy of this message
If you want to pass an xml document node as a function parameter, your need to create a SoapVar object with a text represention of the xml node and the XSD_ANYXML encoding constant. However, this constant is not exported by the extension and is not documented for some unknown reason. Therefore, to get this to work you must either register the XSD_ANYXML #define as a PHP constant, or use the integer value of the constant when creating the SoapVar, which is 147. $soapvar = new SoapVar($xml_text, 147); $params = array("ItemXml" => $soapvar, "PropertyView" => "blah"); $result = $this->soapclient->__soapCall("SaveItem", array("parameters"=>$params), null, $this->soapheaders); However, this still doesnt give the correct result. For some reason, the ItemXml parameter node is not wrapped around the associated xml parameter in the soap request, and the following soap is produced (assumming '<item>blah</item>' is used as the $xml_text): <SOAP-ENV:Envelope xmlns:SOAP-ENV="..." xmlns:ns1="..."> <SOAP-ENV:Header>...</SOAP-ENV:Header> <SOAP-ENV:Body> <ns1:SaveItem> <item>blah</item> <ns1:PropertyView>blah</ns1:PropertyView> </ns1:SaveItem> </SOAP-ENV:Body> </SOAP-ENV:Envelope> ---- Manual Page -- http://www.php.net/manual/en/function.soap-soapclient-soapcall.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57032 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57032&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57032&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57032&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57032&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57032&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57032&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57032&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57032&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#95572) next »