Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP - create and call SOAP web service - error
    primarykey
    data
    text
    <p>Every time i try to make a call to my webservice, through the wsdl, i get the error message shown here. I think its probably an issue within the the WSDL defintion, because I am not really sure what i am doing within the WSDL definition to begin with:</p> <pre><code> [22-Sep-2011 18:54:46] PHP Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in /www/zendserver/htdocs/dev/csc/request.php:4 Stack trace: #0 [internal function]: SoapClient-&gt;__doRequest('&lt;?xml version="...', 'http://192.168....', 'http://www.exam...', 1, 0) #1 [internal function]: SoapClient-&gt;__call('EchoText', Array) #2 /www/zendserver/htdocs/dev/csc/request.php(4): SoapClient-&gt;EchoText('test') #3 {main} thrown in /www/zendserver/htdocs/dev/csc/request.php on line 4 </code></pre> <hr> <p>I have a very simple web service, located at: <a href="http://192.168.1.2:10088/csc/csc.php" rel="nofollow">http://192.168.1.2:10088/csc/csc.php</a></p> <pre><code>&lt;?php function EchoText($text){ return "ECHO: ".$text; } $server = new SoapServer(null, array('uri' =&gt; "http://192.168.1.2:10088/csc/csc.php")); $server-&gt;addFunction('EchoText'); $server-&gt;handle(); ?&gt; </code></pre> <hr> <p>I have an interfacing page, which is what i access and then get the error shown above, located at: <a href="http://192.168.1.2:10088/csc/request.php" rel="nofollow">http://192.168.1.2:10088/csc/request.php</a></p> <pre><code>&lt;?php $client = new SoapClient("http://192.168.1.2:10088/csc/NewWSDLFile.wsdl"); $result = $client-&gt;EchoText("test"); echo $result; &gt;? </code></pre> <hr> <p>I have my WSDL, located at: <a href="http://192.168.1.2:10088/csc/NewWSDLFile.wsdl" rel="nofollow">http://192.168.1.2:10088/csc/NewWSDLFile.wsdl</a></p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt; &lt;wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://192.168.1.2:10088/csc/NewWSDLFile.wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NewWSDLFile" targetNamespace="http://192.168.1.2:10088/csc/NewWSDLFile.wsdl"&gt; &lt;wsdl:types&gt; &lt;xsd:schema targetNamespace="http://192.168.1.2:10088/csc/NewWSDLFile.wsdl"&gt; &lt;xsd:element name="EchoText"&gt; &lt;xsd:complexType&gt; &lt;xsd:sequence&gt; &lt;xsd:element name="in" type="xsd:string"/&gt; &lt;/xsd:sequence&gt; &lt;/xsd:complexType&gt; &lt;/xsd:element&gt; &lt;xsd:element name="EchoTextResponse"&gt; &lt;xsd:complexType&gt; &lt;xsd:sequence&gt; &lt;xsd:element name="out" type="xsd:string"/&gt; &lt;/xsd:sequence&gt; &lt;/xsd:complexType&gt; &lt;/xsd:element&gt; &lt;/xsd:schema&gt; &lt;/wsdl:types&gt; &lt;wsdl:message name="EchoTextRequest"&gt; &lt;wsdl:part element="tns:EchoText" name="parameters"/&gt; &lt;/wsdl:message&gt; &lt;wsdl:message name="EchoTextResponse"&gt; &lt;wsdl:part element="tns:EchoText" name="parameters"/&gt; &lt;/wsdl:message&gt; &lt;wsdl:portType name="NewWSDLFile"&gt; &lt;wsdl:operation name="EchoText"&gt; &lt;wsdl:input message="tns:EchoTextRequest"/&gt; &lt;wsdl:output message="tns:EchoTextResponse"/&gt; &lt;/wsdl:operation&gt; &lt;/wsdl:portType&gt; &lt;wsdl:binding name="NewWSDLFileSOAP" type="tns:NewWSDLFile"&gt; &lt;soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt; &lt;wsdl:operation name="EchoText"&gt; &lt;soap:operation soapAction="http://192.168.1.2:10088/csc/NewWSDLFile/EchoText"/&gt; &lt;wsdl:input&gt; &lt;soap:body use="literal"/&gt; &lt;/wsdl:input&gt; &lt;wsdl:output&gt; &lt;soap:body use="literal"/&gt; &lt;/wsdl:output&gt; &lt;/wsdl:operation&gt; &lt;/wsdl:binding&gt; &lt;wsdl:service name="NewWSDLFile"&gt; &lt;wsdl:port binding="tns:NewWSDLFileSOAP" name="NewWSDLFileSOAP"&gt; &lt;soap:address location="http://192.168.1.2:10088/csc/csc.php"/&gt; &lt;/wsdl:port&gt; &lt;/wsdl:service&gt; &lt;/wsdl:definitions&gt; </code></pre> <hr> <p>UPDATE..</p> <p>I was able to get more detailed information on the error message by doing a try catch and print_r($e);... here is the detailed error message:</p> <pre><code> SoapFault Object ( [message:protected] => Not Found [string:private] => [code:protected] => 0 [file:protected] => /www/zendserver/htdocs/dev/csc/request.php [line:protected] => 7 [trace:private] => Array ( [0] => Array ( [function] => __doRequest [class] => SoapClient [type] => -> [args] => Array ( [0] => [1] => http://192.168.1.2:10088/csc/csc.wsdl [2] => http://www.example.org/NewWSDLFile/EchoText [3] => 1 [4] => 0 ) ) [1] => Array ( [function] => __call [class] => SoapClient [type] => -> [args] => Array ( [0] => EchoText [1] => Array ( [0] => test ) ) ) [2] => Array ( [file] => /www/zendserver/htdocs/dev/csc/request.php [line] => 7 [function] => EchoText [class] => SoapClient [type] => -> [args] => Array ( [0] => test ) ) ) [faultstring] => Not Found [faultcode] => HTTP ) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload