RE: [SOAP] accessing the results returned from webservice

From: Date: Thu, 08 Jan 2009 13:13:15 +0000
Subject: RE: [SOAP] accessing the results returned from webservice
References: 1 2 3 4 5  Groups: php.soap 
Request: Send a blank email to php-soap+get-2884@lists.php.net to get a copy of this message
> Do you have > > a public URL of the .NET web service? > > https://beanstream.com/soap/ProcessTransaction.wsdl > This test script <?php $soap = new SoapClient('https://beanstream.com/soap/ProcessTransaction.wsdl'); $result = $soap->TransactionProcess('<a />'); echo nl2br(htmlspecialchars(print_r($result, 1))); ?> returns: <response><trnId></trnId><trnApproved>0</trnApproved><messageId>0</messageId ><messageText>Invalid merchant id (merchant_id = 0)</messageText><trnAuthCode></trnAuthCode></response> According to the WSDL, the return data type is a simple string. So the web service is returning XML, no matter which technology you use. So it's neither PHP's not .NET's fault :-) However since you are using PHP, you may want to use SimpleXML to parse the XML. --Christian

« previous php.soap (#2884) next »