You are here: PHP5 SOAP and wrong result type « All PHP « IT news, forums, messages
PHP5 SOAP and wrong result type

Posted by J.O. Aho on 12/03/07 13:14

I have been working with a SOAP that uses the built in SOAP in PHP5.

The soap works as it should, as long as I run it on my local machine, on one
of the official servers or my private server at home, on the server on which
it's supposed to run, the result comes out in the wrong format. The only
difference with the servers as I can see is that the supposed server has
coldfusion configured, while the others don't. I'm completely lost what may be
wrong.

This is how it supposed to come out:
array(14) {
....
[9]=>
array(2) {
["gate"]=>
string(3) "S07"
["name"]=>
string(6) "PADDAN"
}
....
}
This is how it comes out on the supposed server:
object(stdClass)#2 (1) {
["item"]=>
array(14) {
....
[9]=>
object(stdClass)#30 (1) {
["item"]=>
array(2) {
[0]=>
object(stdClass)#31 (2) {
["key"]=>
string(4) "gate"
["value"]=>
string(3) "S07"
}
[1]=>
object(stdClass)#32 (2) {
["key"]=>
string(4) "name"
["value"]=>
string(6) "PADDAN"
}
}
}
....
}


The files on all the machines are the same.

The wsdl looks like this (this is a cut down version):
<?xml version='1.0' encoding='UTF-8' ?>
<definitions name='gp_soap'
targetNamespace='urn:gp_soap'
xmlns:tns='urn:gp_soap'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
xmlns='http://schemas.xmlsoap.org/wsdl/'>

<message name='getGatesRequest'>
<part name='upc' type='xsd:array'/>
</message>
<message name='getGatesResponse'>
<part name='Result' type='xsd:array'/>
</message>
<portType name='gotpass_soapPortType'>
<operation name='getGates'>
<input message='tns:getGatesRequest'/>
<output message='tns:getGatesResponse'/>
</operation>
</portType>

<binding name='gp_soapBinding' type='tns:gp_soapPortType'>
<soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
<operation name='getGates'>
<soap:operation soapAction='urn:xmethods-delayed-quotes#getGates'/>
<input>
<soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</input>
<output>
<soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</output>
</operation>
</binding>
<service name='gp_soapService'>
<port name='gp_soapPort' binding='gp_soapBinding'>
<soap:address location='http://localhost/~g/gp_soap.php'/>
</port>
</service>
</definitions>



--

//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация