Re: [SOAP] problems with a soap Server
| From: | Claus Jørgensen | Date: | Thu, 21 Sep 2006 06:35:36 +0000 |
| Subject: | Re: [SOAP] problems with a soap Server | ||
| References: | 1 2 3 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-2374@lists.php.net to get a copy of this message | ||
Hey
The error in your code is caused by a path error, it's working fine here.
Though your WSDL contain following problems:
SOAP-ERROR: Parsing WSDL: Missing <portType> with name 'getDataBinding'
This is caused by a syntax-error in your WSDL:
<binding name='getDataBinding' type='tns"getDataPortType'>
should be:
<binding name='getDataBinding' type='tns:getDataPortType'>
:-)
When this is done the code works.
Also if you're working with a php5 class you could consider using Davey's
Zend_Service_Server class, found here:
http://framework.zend.com/wiki/display/ZFPROP/Zend_Service_Server+Proposal+-+Davey+Shafik
Best regards
Claus Jørgensen
2006/9/20, anisbet <anisbet@auroras.tv>:
Thanks for the reply I fixed that, but I am still having the same issue. Kevin Barnard wrote: transprot should be transport in the binding. That's a start On 9/20/06, anisbet <anisbet@auroras.tv> wrote:soapAction='urn:xmethods-middleware-Data#getData'/>Hello all. I am having some issues getting a new Soap server working, hopefully the board can shed some light on what I am doing wrong. Here is my WSDL <?xml version ='1.0' encoding ='UTF-8' ?> <definitions name='MiddleWareData' targetNamespace='http://example.org/MiddleWareData' xmlns:tns=' http://example.org/MiddleWareData ' 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='getDataRequest'><part name='request' type='xsd:string'/></message> <message name='getDataResponse'> <part name='data' type='xsd:string'/> </message> <portType name='getDataPortType'> <operation name='getData'><input message='tns:getDataRequest'/> <output message='tns:getDataResponse'/></operation> </portType> <binding name='getDataBinding' type='tns"getDataPortType'> <soap:binding style='rpc' transprot='http://schemas.xmlsoap.org/soap/http'/> <operation name='getData'><soap:operationhttp://www.nabble.com/problems-with-a-soap-Server-tf2306161.html#a6410271<input> <soap:body use='encoded'namespace='urn:xmethods-middleware-Data' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/></input> <output> <soap:body use='encoded'namespace='urn:xmethods-middleware-Data' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/></output></operation> </binding> <service name='MiddleWareDataService'> <port name='getDataPort' binding='getDataBinding'><soap:addresslocation='http://10.1.2.171/billing/webServerTest.php'/> </port> </service> </definitions> Application code <?PHPini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache $server = new SoapServer("middleWareData.wsdl"); $server->addFunction("getData"); $server->handle();?> This gives me the following results − <SOAP-ENV:Envelope> − <SOAP-ENV:Body> − <SOAP-ENV:Fault> <faultcode>WSDL</faultcode> − <faultstring> SOAP-ERROR: Parsing WSDL: Couldn't load from '/var/www/localhost/htdocs/billing/middleWareData.wsdl' </faultstring> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope I am using php 5.1.6 with native soap enabled. Any help would be greatly appreciated. -- View this message in context:-- Kevin Barnard "Great Beauty, great strength, and great Riches, are really and truly of no great Use; a right Heart exceeds all." -- Benjamin Franklin -- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- View this message in context: http://www.nabble.com/problems-with-a-soap-Server-tf2306161.html#a6415325 Sent from the Php - Soap mailing list archive at Nabble.com. -- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpSent from the Php - Soap mailing list archive at Nabble.com. -- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php