Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I had a similar situation with a PHP Soap Client communicating with a .NET Soap Server using WSDL 2.0. Here's one thing I discovered: When passing the information to the server, you must explicitly define the variable as a SoapVar object. So in your example above, change it to:</p> <pre><code>$pCriteria-&gt;type = new SoapVar(1, XSD_INT, 'xsd:int'); </code></pre> <p>Passing an array is similar, essentialy you pass an array of SoapVars:</p> <pre><code>$pCriteria-&gt;type = array(new SoapVar(1, XSD_INT, 'xsd:int'), new SoapVar(2, XSD_INT, 'xsd:int', new SoapVar(3, XSD_INT, 'xsd:int'));`enter code here` </code></pre> <p>Also, you can use several built-in functions of the SoapClient to get some additional feedback on possible errors.</p> <pre><code>$client-&gt;__getLastRequest() //To display the XML that you sent to the server $client-&gt;__getLastResponse() //to display the XML that is sent in response to your request </code></pre> <p>If you can get a copy of the expected WSDL format you can use the response from the above commands to determine what is going wrong. Usually you can access this from the URL that you pass to the SoapClient. So, for example, if the WSDL services URL is <a href="http://example.com/webservices/wvrgroupservice.asmx?WSDL" rel="nofollow noreferrer">http://example.com/webservices/wvrgroupservice.asmx?WSDL</a>, enter <a href="http://example.com/webservices/wvrgroupservice.asmx" rel="nofollow noreferrer">http://example.com/webservices/wvrgroupservice.asmx</a> to view the functions and expected XML from that server.</p>
 

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