PHP, SOAPClient: Cannot find dispatch method <p>This is my WSDL XML: (Generated with SoapUI)</p> <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://soap.test.com/"&gt; &lt;soapenv:Header/&gt; &lt;soapenv:Body&gt; &lt;ser:myMethod&gt; &lt;user&gt; &lt;id&gt;?&lt;/id&gt; &lt;name&gt;?&lt;/name&gt; &lt;/user&gt; &lt;code&gt;?&lt;/code&gt; &lt;/ser:myMethod&gt; &lt;/soapenv:Body&gt; &lt;/soapenv:Envelope&gt; </code></pre> <p>And my PHP code to consume the "<strong>myMethod</strong>" method:</p> <pre><code>$opts = array( 'location' =&gt; 'http://example.com/myServices?WSDL', 'uri' =&gt; 'http://soap.test.com' ); $client = new SOAPClient(null, $opts); $res = $client-&gt;__soapCall('myMethod', array( "id" =&gt; "123", "name" =&gt; "Sam" )); var_dump($res); </code></pre> <p>And I get the <code>Cannot find dispatch method for {http://soap.test.com} myMethod</code> error.</p> <p>I've tested the SOAP with SoupUI and it has responsed correctly.</p> <p>What is wrong here?</p>