title: SOAP Request Parameters dont arrive in PHP function
body: <p><br />
  i am working on a SOAP Webservice with WSDL Support.<br />
  The WSDL file is located here: <a href="http://paygoo.com/soap/server.wsdl" rel="nofollow">http://paygoo.com/soap/server.wsdl</a></p>
  
  <p>I have 3 functions in my Webservice.
  GetUserInfo, TransferFromWallet and TransferToWallet.</p>
  
  <p>The function GetUserInfo works fine, so i designed the two other functions like this, but the other two functions TransferFromWallet and TransferToWallet dont recive the parameters from the client.</p>
  
  <p>the function GetUserInfo looks like this:</p>
  
  <pre><code>function GetUserInfo($sessionID)
  {
  if (mysql_num_rows($result)==1){
          if (mysql_num_rows($result)==1)
          {
              $element-&gt;balance = new SoapVar($balance, XSD_DECIMAL, '','','');
              $element-&gt;currencyCode = new SoapVar("EUR", XSD_STRING, '','','');
              $element-&gt;displayName = new SoapVar($row['username'], XSD_STRING, '','','');
              $element-&gt;languageCode = new SoapVar("DE", XSD_STRING, '','','');
              $element-&gt;UID = new SoapVar($row['ID'], XSD_STRING, '','','');
              $element-&gt;responseCode = new SoapVar("OK", XSD_STRING, '','','');
              return new SoapVar($element, SOAP_ENC_OBJECT,'');
          }else
          {
              $element-&gt;responseCode = new SoapVar("UNEXPECTED_ERROR", XSD_STRING, '','','');
              return new SoapVar($element, SOAP_ENC_OBJECT,'');
          }
      }else
      {
          $element-&gt;responseCode = new SoapVar("INVALID_SESSION", XSD_STRING, '','','');
          return new SoapVar($element, SOAP_ENC_OBJECT,'');
      }
  }
  </code></pre>
  
  <p>the functions TransferFromWallet and TransferToWallet looks like this:</p>
  
  <pre><code>    function TransferFromWallet($sessionID, $UID, $amount)
  {
          if (mysql_num_rows($result)==1){
              if ($row2['ID'] == $UID)
              {
                  if($amount &gt; 0 and $amount &lt;= $balance)
                  {
                      $element-&gt;responseCode = new SoapVar("OK", XSD_STRING, '','','');
                      return new SoapVar($element, SOAP_ENC_OBJECT,'');
                  }else
                  {
                      $element-&gt;responseCode = new SoapVar("BALANCE_TOO_LOW", XSD_STRING, '','','');
                      return new SoapVar($element, SOAP_ENC_OBJECT,'');
                  }
              }else
              {
                  $element-&gt;responseCode = new SoapVar("INVALID_UID", XSD_STRING, '','','');
                  return new SoapVar($element, SOAP_ENC_OBJECT,'');
              }
          }else
          {
              $element-&gt;responseCode = new SoapVar("INVALID_SESSION", XSD_STRING, '','','');
              return new SoapVar($element, SOAP_ENC_OBJECT,'');
          }
  }
  </code></pre>
  
  <p>i defined all functions and the server like this:</p>
  
  <pre><code>$server = new SoapServer("./soap/server.wsdl", 
  array('uri' =&gt; "http://paygoo.com/server.php"));
  //Funktionen zum SOAP Server hinzufügen
  $server-&gt;addFunction('GetUserInfo');
  $server-&gt;addFunction('TransferFromWallet');
  $server-&gt;addFunction('TransferToWallet');
  //Hier wird die Abfrage abgearbeitet
  $server-&gt;handle();
  </code></pre>
  
  <p>my test client looks like this:</p>
  
  <pre><code>    &lt;?php
  error_reporting(E_ALL);
  ini_set('display_errors', TRUE);
  ini_set("soap.wsdl_cache_enabled", 0);
  $requesttype = $_REQUEST['soapRequest']; //Art des Requests Variable wird gesetzt.
  $sessionID = $_REQUEST['sessionID']; //session_id Variable wird gesetzt.
  $UID = $_REQUEST['UID']; //UserID Variable wird gesetzt
  $amount = $_REQUEST['balance']; //Zu transferierendes Guthaben Varialbe wird gesetzt
  //$client = new SoapClient('http://paygoo.com/soap/server.wsdl');  //{url} wie immer ersetzen
  
  //$sessionID = 'ae3a12e662884604c069b4dfc5a13afd';
  $wsdl = 'http://paygoo.com/soap/server.wsdl';
  $client = new SoapClient($wsdl);
  if($requesttype=="GetUserInfo")
  {
      //$parms = array('sessionID' =&gt; $sessionID);
      $result = $client-&gt;GetUserInfo($sessionID);
  }
  if($requesttype=="TransferFromWallet"){
  //$parms = array('sessionID' =&gt; $sessionID, 'UID' =&gt; $UID, 'amount' =&gt; $amount);
  $result = $client-&gt;TransferFromWallet($sessionID, $UID, $amount);
  }
  
  if($requesttype=="TransferToWallet"){
      //$parms = array('sessionID' =&gt; $sessionID, 'UID' =&gt; $UID, 'amount' =&gt; $amount);
      $result = $client-&gt;TransferToWallet($sessionID, $UID, $amount);
  }
  ?&gt;
  &lt;h1&gt;Result&lt;/h1&gt;
  &lt;pre&gt; &lt;?php var_dump($result) ?&gt; &lt;/pre&gt;
  </code></pre>
  
  <p>the SOAP server don't receive the parameters sessionID, UID and amount.<br />
  <br />
  EDIT:<br />
  i defined the parameters now in the <code>&lt;types&gt;</code> tag. like this:<br /></p>
  
  <pre><code>&lt;wsdl:types&gt;
      &lt;xsd:schema elementFormDefault='qualified' targetNamespace='http://paygoo.com/soap/server.wsdl'&gt;
          &lt;xsd:element name='transferRequest'&gt;
              &lt;xsd:complexType&gt;
                  &lt;xsd:sequence&gt;
                      &lt;xsd:element minOccurs='0' maxOccurs='1' name='sessionID' type='xsd:string'/&gt;
                      &lt;xsd:element minOccurs='0' maxOccurs='1' name='UID' type='xsd:string'/&gt;
                      &lt;xsd:element minOccurs='0' maxOccurs='1' name='amount' type='xsd:decimal'/&gt;
                  &lt;/xsd:sequence&gt;
              &lt;/xsd:complexType&gt;
          &lt;/xsd:element&gt;
          &lt;xsd:element name='transferResponse'&gt;
              &lt;xsd:complexType&gt;
                  &lt;xsd:sequence&gt;
                      &lt;xsd:element minOccurs='0' maxOccurs='1' name='ResponseCode' type='xsd:string'/&gt;
                  &lt;/xsd:sequence&gt;
              &lt;/xsd:complexType&gt;
          &lt;/xsd:element&gt;
      &lt;/xsd:schema&gt;
  &lt;/wsdl:types&gt;
  </code></pre>
  
  <p>if i send this request:<br /></p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:xmethodsWallet"&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;urn:TransferFromWallet soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;
        &lt;transferRequest&gt;
        &lt;sessionID&gt;c230f895fb98ab9159f51fd0297e236d&lt;/sessionID&gt;
        &lt;UID&gt;975&lt;/UID&gt;
        &lt;amount&gt;1&lt;/amount&gt;
        &lt;/transferRequest&gt;
        &lt;/urn:TransferFromWallet&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>my function <code>TransferFromWallet</code> didnt recive any parameters.<br />
  if i run <code>__getFunctions</code> and <code>__getTypes</code> on Client i am getting the following response:<br /></p>
  
  <pre><code>Funktionen
  
   array(3) {
    [0]=&gt;
    string(43) "string GetUserInfo(string $userinfoRequest)"
    [1]=&gt;
    string(69) "transferResponse TransferFromWallet(transferRequest $transferRequest)"
    [2]=&gt;
    string(67) "transferResponse TransferToWallet(transferRequest $transferRequest)"
  }
  
  Typen
  
   array(2) {
    [0]=&gt;
    string(75) "struct transferRequest {
   string sessionID;
   string UID;
   decimal amount;
  }"
    [1]=&gt;
    string(49) "struct transferResponse {
   string ResponseCode;
  }"
  }
  </code></pre>
  
  <p>could anyone tell me why i dont recive the parameters in the function?</p>