note 111682 added to soapclient.soapclient

From: Date: Fri, 15 Mar 2013 20:43:44 +0000
Subject: note 111682 added to soapclient.soapclient
Groups: php.notes 
Request: Send a blank email to php-notes+get-194091@lists.php.net to get a copy of this message
Where you have the problem of "looks like we got no XML document SoapClient", really the real problem is the xml code from remote server is not clear (after last tag is possible that you have space or other caracter that the your supplier of service have lost : no one is perfect!) I've read some solution, like here, but you must to know that is possible, that is possible that the remote server don't wrong, and the "surplus" (latin word for added values) is needed. In particolar with axis Java server, is possible that the configuration of server is needed and the "surplus" is one or more attachments... The solution is 3: 1) contact your supplier if is possible to remove caracter if is an error (good luck! ;) ) 2) use another class like nusoap resolve the problem (but has other problem!) 3) this technical solution: when call the wsdl be sure that the option trace and exceptions are setted (the first true and the second false) <?php $SoapClient = new SoapClient(NULL, array( .... 'trace' => 1, 'exceptions' => 0 ) ?> (if you don't do that you can't use the __getLastResponse) Now You can do the request and use __getLastResponse() to obtain all the part.. <?php $result = $SoapClient -> problematicCall($par); ?> After all you obtain a variable like that: -----=_Part_9325_126764118.1363377774664 Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: binary Content-Id: <1C06F7FBA057796C5A6185605F9F93E4> <?xml version="1.0" encoding="utf-8"?><...etc >&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;MESSAGGIO&gt; &lt;DA&gt;MI&lt;/DA&gt; &lt;A&gt;PALADINUX&lt;/A&gt; &lt;ID&gt;12345&lt;/ID&gt; &lt;TIPODOC&gt;RC&lt;/TIPODOC&gt; &lt;RISPOSTA&gt; &lt;/MESSAGGIO&gt; </rxproblematicCallReturn></ns1:rxCatalogoMaterialiResponse></soapenv:Body></soapenv:Envelope> ------=_Part_9325_126764118.1234567890123 Content-Type: application/zip Content-Transfer-Encoding: binary Content-Id: <43E91F7E7PALADINUXE07BF041A7BAC9> ------------------------- Is easy understand if the added part is needed or not! Now you can explode all the part and parse! Hope this can help you.See ya in the cyberspace! ---- Server IP: 69.147.83.199 Probable Submitter: 95.248.242.52 ---- Manual Page -- http://php.net/manual/en/soapclient.soapclient.php Edit -- https://master.php.net/note/edit/111682 Del: integrated -- https://master.php.net/note/delete/111682/integrated Del: useless -- https://master.php.net/note/delete/111682/useless Del: bad code -- https://master.php.net/note/delete/111682/bad+code Del: spam -- https://master.php.net/note/delete/111682/spam Del: non-english -- https://master.php.net/note/delete/111682/non-english Del: in docs -- https://master.php.net/note/delete/111682/in+docs Del: other reasons-- https://master.php.net/note/delete/111682 Reject -- https://master.php.net/note/reject/111682 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#194091) next »