[PHP] PHP/ Soap issue
I am hoping there's a SOAP expert on the list as this is driving me mad and Google doesn't come up with much help ... I am trying to build a fairly simple web service in SOAP -- the client sends a string SKU to query a product catalogue database and receives product pricing data - I am using a WSDL file which validates OK ... anyway I keep getting this error:- SOAP-ERROR: Encoding: object has no 'name' property The PHP code is below:- $client = new SoapClient('http://example.com/catalogue.wsdl',array('trace' = 1,'exceptions' = 0)); $sku = '12345'; $client-getProduct($sku); I can post the wsdl file contents if necessary. Hoping someone can help point me in the right direction! TIA Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/ Soap issue
On 01/09/2011 14:07, Louis Huppenbauer wrote: I think it would be best if you could provide us with the .wsdl (and possibly with the server-code). Thanks for the quick response Louis.. WSDL ?xml version=1.0 encoding=UTF-8? definitions name=CatalogueService targetNamespace=http://example.com/catalogue.wsdl; xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tns=http://example.com/catalogue.wsdl; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsd1=http://example.com/schema; types xsd:schema targetNamespace=http://example.com/schema; xmlns=http://www.w3.org/2001/XMLSchema; xsd:complexType name=product xsd:sequence xsd:element name=name type=xsd:string/ xsd:element name=description type=xsd:string/ xsd:element name=price type=xsd:double/ xsd:element name=SKU type=xsd:string/ /xsd:sequence /xsd:complexType /xsd:schema /types message name=getProductRequest part name=sku type=xsd:string/ /message message name=getProductResponse part name=product type=xsd1:product/ /message portType name=Product_PortType operation name=getProduct input message=tns:getProductRequest/ output message=tns:getProductResponse/ /operation /portType binding name=Product_Binding type=tns:Product_PortType soap:binding style=rpc transport=http://schemas.xmlsoap.org/soap/http/ operation name=getProduct soap:operation soapAction=urn:examples:CatalogueService/ input soap:body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; namespace=urn:examples:CatalogueService use=encoded/ /input output soap:body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; namespace=urn:examples:CatalogueService use=encoded/ /output /operation /binding service name=Product_Service port name=Product_Port binding=tns:Product_Binding soap:address location=http://example.com/api/catalogue/ /port /service /definitions SERVER CODE ini_set('soap.wsdl_cache_enabled',false); $server = new SoapServer('http://example.com/catalogue.wsdl'); $server-handle();
Re: [PHP] PHP/ Soap issue
On 01/09/2011 14:16, Richard Quadling wrote: Can you give me the URL for the WSDL file? Either online or by direct email. Thanks for the quick response Richard -- I have just posted the WSDL in my earlier resply to Louis... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/ Soap issue
On 1 September 2011 13:27, richard gray r...@richgray.com wrote: On 01/09/2011 14:16, Richard Quadling wrote: Can you give me the URL for the WSDL file? Either online or by direct email. Thanks for the quick response Richard -- I have just posted the WSDL in my earlier resply to Louis... Is there any chance of having the live URL? That way I can show exactly what/where the issue lies. I can build my test code for the WSDL file but I can't test it as the URLs are junk. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/ Soap issue
On 1 September 2011 13:35, Richard Quadling rquadl...@gmail.com wrote: On 1 September 2011 13:27, richard gray r...@richgray.com wrote: On 01/09/2011 14:16, Richard Quadling wrote: Can you give me the URL for the WSDL file? Either online or by direct email. Thanks for the quick response Richard -- I have just posted the WSDL in my earlier resply to Louis... Is there any chance of having the live URL? That way I can show exactly what/where the issue lies. I can build my test code for the WSDL file but I can't test it as the URLs are junk. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea Unless of course, you own example.com! -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/ Soap issue
I think it would be best if you could provide us with the .wsdl (and possibly with the server-code). 2011/9/1 richard gray r...@richgray.com I am hoping there's a SOAP expert on the list as this is driving me mad and Google doesn't come up with much help ... I am trying to build a fairly simple web service in SOAP -- the client sends a string SKU to query a product catalogue database and receives product pricing data - I am using a WSDL file which validates OK ... anyway I keep getting this error:- SOAP-ERROR: Encoding: object has no 'name' property The PHP code is below:- $client = new SoapClient('http://example.**com/catalogue.wsdlhttp://example.com/catalogue.wsdl ',array('**trace' = 1,'exceptions' = 0)); $sku = '12345'; $client-getProduct($sku); I can post the wsdl file contents if necessary. Hoping someone can help point me in the right direction! TIA Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/ Soap issue
On 1 September 2011 13:02, richard gray r...@richgray.com wrote: I am hoping there's a SOAP expert on the list as this is driving me mad and Google doesn't come up with much help ... I am trying to build a fairly simple web service in SOAP -- the client sends a string SKU to query a product catalogue database and receives product pricing data - I am using a WSDL file which validates OK ... anyway I keep getting this error:- SOAP-ERROR: Encoding: object has no 'name' property The PHP code is below:- $client = new SoapClient('http://example.com/catalogue.wsdl',array('trace' = 1,'exceptions' = 0)); $sku = '12345'; $client-getProduct($sku); I can post the wsdl file contents if necessary. Hoping someone can help point me in the right direction! TIA Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Can you give me the URL for the WSDL file? Either online or by direct email. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/ Soap issue
On 1 September 2011 13:25, richard gray r...@richgray.com wrote: On 01/09/2011 14:07, Louis Huppenbauer wrote: I think it would be best if you could provide us with the .wsdl (and possibly with the server-code). Thanks for the quick response Louis.. We need the URL for the WSDL file. Without that, we don't know what is happening. The WSDL content you've supplied is not tied to a real server. It just uses the example.com domain as a way of showing you a placeholder where your real URLs would exist. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php