title: PHP/WSDL/SOAP: Error passing parameters
body: <p>I'm using a local WSDL to make service calls.  I'm fine passing/retrieving data when one parameter is expected by the service method(s), but when the method expects 2 or more parameters it errors out.  Ironically, when I attempt to pass 2 or more parameters it says that it only expects 1.  The method establishIdentity expects 2 parameters (processId=string &amp; identityAttributes = object made up of the properties found in the code below.) I've include the errors for passing 1 and 2 parameters.</p>
  
  <pre><code>&lt;?php
  set_time_limit(0);
  require_once('nusoap.php');
  require_once('BenefitSOAP.php');
  
  $client = new SoapClient('C:\wsdl\BenefitDeterminationProcess_BenefitDialogueServiceSOAP.wsdl', array('trace' =&gt; 1));
  
  $procID = (array)$client-&gt;start(array("prefix"=&gt;""));
  
  $newStringID = implode(null, $procID); //
  
  $exchange = $client-&gt;exchangeOptions($procID);
  
  $identityAttributes = new IdentityAttributes();
  $identityAttributes-&gt;ssn = 41441414;
  $identityAttributes-&gt;firstName = 'John2';
  $identityAttributes-&gt;lastName = 'Doe2';
  $identityAttributes-&gt;gender = 'MALE';
  $identityAttributes-&gt;birthDate = NULL;    
  
  echo "TYPE: ".gettype($newStringID);
  echo "NS: ".$newStringID;
  
  $identity = $client-&gt;establishIdentity($newStringID); //LINE 33 
  
  //$identity = $client-&gt;establishIdentity($newStringID, $identityAttributes); OR LINE 33//establishIdentity expects 2 parameters (processId = string, identityAttributes = object)
  
  $end = $client-&gt;stop($procID);
  ?&gt;
  </code></pre>
  
  <p>Error when passing 1 parameter:</p>
  
  <blockquote>
    <p>TYPE: stringNS: 223205</p>
    
    <blockquote>
      <p>Fatal error: Uncaught SoapFault
      exception: [HTTP] Error Fetching http
      headers in
      C:\wamp\www\SugarCE\testSOAPShawn.php:33
      Stack trace: #0 [internal function]:
      SoapClient->_<em>doRequest('</em>_call('establishIdenti...',
      Array) #2
      C:\wamp\www\SugarCE\testSOAPShawn.php(33):
      SoapClient->establishIdentity('223205')> > #3 {main} thrown in C:\wamp\www\SugarCE\testSOAPShawn.php
      on line 33</p>
    </blockquote>
  </blockquote>
  
  <p>Error when passing 2 parameters:</p>
  
  <blockquote>
    <p>TYPE: stringNS: 237506 </p>
    
    <p>Fatal error:
    Uncaught SoapFault exception:
    [soapenv:Server]
    javax.xml.ws.WebServiceException:
    com.ibm.websphere.sca.ServiceRuntimeException:
    An error occurred while parsing native
    data: The error message is:
    java.lang.IllegalArgumentException:
    Mismatched parameter count: expecting
    1 items, but got more.. Caused By:
    java.lang.IllegalArgumentException:
    Mismatched parameter count: expecting
    1 items, but got more.: caused by: An
    error occurred while parsing native
    data: The error message is:
    java.lang.IllegalArgumentException:
    Mismatched parameter count: expecting
    1 items, but got more.. Caused By:
    java.lang.IllegalArgumentException:
    Mismatched parameter count: expecting
    1 items, but got more. in
    C:\wamp\www\SugarCE\testSOAPShawn.php:33
    Stack trace: #0 [internal function]:
    SoapClient->__call('establishIdenti...',
    Array) #1
    C:\wamp\www\SugarCE\testSOAPShawn.php(33):
    SoapClient->establishIdentity('237506',
    Object(IdentityAttributes)) #2 {main}
    thrown in
    C:\wamp\www\SugarCE\testSOAPShawn.php
    on line 33</p>
  </blockquote>
  
  <p>Any and all assistance is greatly appreciated!</p>