title: How to get SOAP URI from WSDL?
body: <p>I'm testing a SOAP webservice and I want to use it in non-wsdl mode.</p>
  <p>This is the code I'm trying to run:</p>
  <pre><code>$client = new SoapClient(null,
  [
      'location' =&gt; 'http://www.dneonline.com/calculator.asmx',
      'uri' =&gt; 'http://tempuri.org/',
      'trace' =&gt; 1,
  ]);
  
  echo $argv[1].' - '.$argv[2].' = '. $client-&gt;Subtract(
      [
          'intA' =&gt; $argv[2],
          'intB' =&gt; $argv[1]
      ])-&gt;SubtractResult.PHP_EOL;
  </code></pre>
  <p>When I run this code I get the following error:</p>
  <pre><code>PHP Fatal error:  Uncaught SoapFault exception: [soap:Client] System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://tempuri.org/#Subtract.
     at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
     at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
     at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
     at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)
     at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean&amp; abortProcessing)
  </code></pre>
  <p>When I use it in WSDL mode it works fine...</p>
  <p>I got the idea of using <code>http://tempuri.org/</code> as URI from the definition of the WS:</p>
  <pre><code>&lt;wsdl:definitions xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; xmlns:tm=&quot;http://microsoft.com/wsdl/mime/textMatching/&quot; xmlns:soapenc=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot; xmlns:mime=&quot;http://schemas.xmlsoap.org/wsdl/mime/&quot; xmlns:tns=&quot;http://tempuri.org/&quot; xmlns:s=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:soap12=&quot;http://schemas.xmlsoap.org/wsdl/soap12/&quot; xmlns:http=&quot;http://schemas.xmlsoap.org/wsdl/http/&quot; targetNamespace=&quot;http://tempuri.org/&quot; xmlns:wsdl=&quot;http://schemas.xmlsoap.org/wsdl/&quot;&gt;
  </code></pre>
  <p>But apparently that's not it... any idea how I can make this work?</p>
  <p>Thanks!</p>