Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP SoapClient against Java Server
    primarykey
    data
    text
    <p>I am at the end of my ropes so its time to ask the community for help, i've been pillaging the web for any resource I can find on this issue but none helps me.</p> <p>I am currently trying to communicated with a Java Webservice server through PHP. I can pull down a WSDL and list its functions and types through <code>__getFunctions();</code> and <code>__getTypes();</code></p> <p>I am creating the client in this format </p> <p><code>new SoapClient("https://username:password@ip:port/path/to/wsdl?wsdl");</code></p> <p>Now initially this poses no problems, but when I try to make a function call on this service I get 1 of 2 responses.</p> <p>I know one of them is a timeout error, the second one I do not understand as of yet.</p> <p>Error : <code>SoapFault exception: [SOAP-ENV:Client] [MT-IP] SOAP message is not well formed in...</code></p> <p>Here is the code:</p> <pre><code>// All of this works $options["login"] = "login"; $options["password"] = "password"; $wsdl = "https://" . $options["login"] . ":" . $options["password"] . "@ip:port/path/to/wsdl?wsdl"; $client = new SoapClient($wsdl, $options); try { $functions = $client-&gt;__getFunctions(); $types = $client-&gt;__getTypes(); $params = new stdClass(); $params-&gt;pong = (string)"Hello World!"; // This fails $result = $client-&gt;ping($params); var_dump($result); } catch (SoapFault $exception) { echo $exception; } </code></pre> <p>To add I have also attempted to call methods in all the ways available such as</p> <pre><code>$client-&gt;__soapCall("ping", array($params)); $client-&gt;__soapCall("ping", array(array("pong" =&gt; "Hello World!))); $client-&gt;__soapCall("ping", array("pong" =&gt; "Hello World")); $client-&gt;__soapCall("ping", array("parameters" =&gt; array("pong" =&gt; "Hello World")); // and some more.. </code></pre> <p>You can also see the WSDL I am testing against <a href="http://moenbjollefabrikk.no/wsdl" rel="nofollow">WSDL</a></p> <p>You can also view the page where I try to call webservice <a href="http://moenbjollefabrikk.no/soap.php" rel="nofollow">SOAP TEST</a></p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="com.computas.mt.extern.Ping"&gt; &lt;SOAP-ENV:Body&gt; &lt;ns1:ping&gt; &lt;pong&gt;Hello World!&lt;/pong&gt; &lt;/ns1:ping&gt; &lt;/SOAP-ENV:Body&gt; &lt;/SOAP-ENV:Envelope&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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