PaultheBroker
asked on
When attempting a sample webservice (SOAP request, using PHP), I'm getting an error that the function is Not Found
I'm trying to follow the sample script here:
http://www.oreillynet.com/pub/a/php/2007/07/26/php-web-services.html
I'm using my ISP account, and I've created a folder called 'webservice' under the main root (http://mydomain.com/webservice/) under which I have placed the sample files catalog.wsdl, soap_client.php, and soap_server.php
I'm a novice at php and know NOTHING about soap, so this is a stretch assignment for me. In the service block of the WSDL (posted below) I cnaged the tag:
<soap:address location='http://localhost/soap-server.php'/>
to
<soap:address location='http://mydomain.com/webservice/soap-server.php'/>
but Istill get the error message:
Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in /home/paul/public_html/web service/so ap-client. php:4 Stack trace: #0 [internal function]: SoapClient->__doRequest('< ?xml version="...', 'http://localhos...', 'urn:localhost-c...', 1, 0) #1 [internal function]: SoapClient->__call('getCat alogEntry' , Array) #2 /home/paul/public_html/web service/so ap-client. php(4): SoapClient->getCatalogEntr y('catalog 1') #3 {main} thrown in /home/paul/public_html/web service/so ap-client. php on line 4
http://www.oreillynet.com/pub/a/php/2007/07/26/php-web-services.html
I'm using my ISP account, and I've created a folder called 'webservice' under the main root (http://mydomain.com/webservice/) under which I have placed the sample files catalog.wsdl, soap_client.php, and soap_server.php
I'm a novice at php and know NOTHING about soap, so this is a stretch assignment for me. In the service block of the WSDL (posted below) I cnaged the tag:
<soap:address location='http://localhost/soap-server.php'/>
to
<soap:address location='http://mydomain.com/webservice/soap-server.php'/>
but Istill get the error message:
Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in /home/paul/public_html/web
<?xml version ='1.0' encoding ='UTF-8' ?>
<definitions name='Catalog'
targetNamespace='http://mydomain.com/webservice/catalog'
xmlns:tns='http://mydomain.com/webservice/catalog'
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='getCatalogRequest'>
<part name='catalogId' type='xsd:string'/>
</message>
<message name='getCatalogResponse'>
<part name='Result' type='xsd:string'/>
</message>
<portType name='CatalogPortType'>
<operation name='getCatalogEntry'>
<input message='tns:getCatalogRequest'/>
<output message='tns:getCatalogResponse'/>
</operation>
</portType>
<binding name='CatalogBinding' type='tns:CatalogPortType'>
<soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'
/>
<operation name='getCatalogEntry'>
<soap:operation soapAction='urn:localhost-catalog#getCatalogEntry'/>
<input>
<soap:body use='encoded' namespace='urn:localhost-catalog'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</input>
<output>
<soap:body use='encoded' namespace='urn:localhost-catalog'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</output>
</operation>
</binding>
<service name='CatalogService'>
<port name='CatalogPort' binding='CatalogBinding'>
<soap:address location='http://mydomain.com/webservice/soap-server.php'/>
</port>
</service>
</definitions>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for the points - as you may have guessed, I am a bit of a REST evangelist. I hope the answer was helpful, ~Ray
ASKER