title: How to call soap web service from php
body: <p>I am able to consume soap web service using wizdler in my chrome but need to how can I consume it in my php code.
  From Wizdler I can get the proper response, for example I am posting the information like this:
  <a href="https://i.stack.imgur.com/eDlzI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eDlzI.png" alt="enter image description here"></a></p>
  
  <p>Question is how to call this service from php code, what I did/trying so far is: </p>
  
  <pre><code>&lt;?php
  
  $wsdl = "http://64.20.37.90/VTWebServiceTest/VisualService.svc?wsdl";
  
  $client = new SoapClient($wsdl);
  
  $request_param = array(
  
      "storeNumber" =&gt; "valid value",
      "enterpriseId" =&gt; "valid value",
      "credential" =&gt; "valid value"
  
  );
  
  try {
  
      $responce_param = $client-&gt;GetCategories($request_param);
      $result = $responce_param-&gt;GetCategoriesResult;
      print_r($result);
  } catch (Exception $e) {
  
      echo "Exception Error!";
      echo $e-&gt;getMessage();
  
  }
  
  ?&gt;
  </code></pre>
  
  <p>But it always returns message "12|Invalid service credential."</p>
  
  <p>Can anybody help me out?</p>
  
  <p>Thanks in advance.</p>