note 103439 added to book.soap
| From: | Jadidi at osu1 dot php dot net | Date: | Wed, 13 Apr 2011 16:30:29 +0000 |
| Subject: | note 103439 added to book.soap | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178800@lists.php.net to get a copy of this message | ||
I needed to perform SOAP actions and get information from a Windows ASP.NET server and encountered
many errors along the way.
At first I had it solved with NUSOAP, and sending my own XMLs with it, but then when I needed to use
SSL it failed again.
So I went back to a regular SoapClient (as opposed to nusoap_client) and now I am using the WSDL
defined functions ($client->function($params)).
The ASP.NET server I'm consuming is quite strange, the WSDL definition does not define the
parameters I need to send, they only define one parameter and they expect me to send another XML
within that.
So here's my solution, in case it helps anyone:
$params['trace'] = true;
$client = new soapclient('https://www.myserver.xom/WebService.asmx?WSDL',
$params);
$msg['AccountData']['any'] =
"<somexml></somexml><otherxml></otherxml>";
$client->Function($msg);
$resulta = xml2array($client->__getLastResponse());
----
Server IP: 69.147.83.197
Probable Submitter: 85.64.91.228
----
Manual Page -- http://www.php.net/manual/en/book.soap.php
Edit -- https://master.php.net/note/edit/103439
Del: integrated -- https://master.php.net/note/delete/103439/integrated
Del: useless -- https://master.php.net/note/delete/103439/useless
Del: bad code -- https://master.php.net/note/delete/103439/bad+code
Del: spam -- https://master.php.net/note/delete/103439/spam
Del: non-english -- https://master.php.net/note/delete/103439/non-english
Del: in docs -- https://master.php.net/note/delete/103439/in+docs
Del: other reasons-- https://master.php.net/note/delete/103439
Reject -- https://master.php.net/note/reject/103439
Search -- https://master.php.net/manage/user-notes.php