title: SoapClient Php Trouble sending xml data
body: <p>I am using a web service to grab user data in XML and then resend it to a second web service with changes. The problem is everytime I send the request I end up making a new user with no data. This means that the first 3 elements are being accepted but the User object is not being accepted. I have tried to use both xml and an aarray as the input but nothing works. The SaveUser service requires a complex object and its WSDL requirements look like</p>
  
  <pre><code>&lt;s:element name="SaveUser"&gt;
  &lt;s:complexType&gt;
  &lt;s:sequence&gt;
  &lt;s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string"/&gt;
  &lt;s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/&gt;
  &lt;s:element minOccurs="1" maxOccurs="1" name="CompanyID" type="s:long"/&gt;
  &lt;s:element minOccurs="0" maxOccurs="1" name="User" type="tns:User"/&gt;
  &lt;/s:sequence&gt;
  &lt;/s:complexType&gt;
  &lt;/s:element&gt;
  </code></pre>
  
  <p>Here is the xml I want to send and is represented by $userDataXML in php code</p>
  
  <pre><code>&lt;User&gt;
  &lt;AccountExpiryDate&gt;2114-08-11T15:22:08.983&lt;/AccountExpiryDate&gt;
  &lt;AccountFailedLoginAttempts&gt;0&lt;/AccountFailedLoginAttempts&gt;
  &lt;AccountLastActiveDate&gt;2015-12-11T13:17:57.6916477-05:00&lt;/AccountLastActiveDate&gt;
  &lt;AccountLastIPAddress&gt;192.81.170.5&lt;/AccountLastIPAddress&gt;
  &lt;AccountLastLoginDate&gt;2015-12-11T13:17:57.6916477-05:00&lt;/AccountLastLoginDate&gt;
  &lt;AccountLoggedIn&gt;true&lt;/AccountLoggedIn&gt;
  &lt;AccountLogin&gt;testuser3&lt;/AccountLogin&gt;
  &lt;AccountPassword&gt;password&lt;/AccountPassword&gt;
  &lt;AccountPasswordChangeRequired&gt;false&lt;/AccountPasswordChangeRequired&gt;
  &lt;Active&gt;true&lt;/Active&gt;
  &lt;Address&gt;
  &lt;CompanyID&gt;0&lt;/CompanyID&gt;
  &lt;ID&gt;0&lt;/ID&gt;
  &lt;UserID&gt;210&lt;/UserID&gt;
  &lt;/Address&gt;
  &lt;AddressList&gt;
  &lt;Address&gt;
  &lt;CompanyID&gt;0&lt;/CompanyID&gt;
  &lt;ID&gt;0&lt;/ID&gt;
  &lt;UserID&gt;210&lt;/UserID&gt;
  &lt;/Address&gt;
  &lt;/AddressList&gt;
  &lt;CreatedByUserID&gt;1&lt;/CreatedByUserID&gt;
  &lt;CreatedDate&gt;2015-10-29T19:23:29.64&lt;/CreatedDate&gt;
  &lt;CompanyID&gt;4&lt;/CompanyID&gt;
  &lt;Email1&gt;fasd@THIS.HAS&lt;/Email1&gt;
  &lt;ID&gt;210&lt;/ID&gt;
  &lt;LanguageID&gt;0&lt;/LanguageID&gt;
  &lt;ModifiedByUserID&gt;1&lt;/ModifiedByUserID&gt;
  &lt;ModifiedDate&gt;2015-10-29T19:26:08.59&lt;/ModifiedDate&gt;
  &lt;RoleID&gt;9&lt;/RoleID&gt;
  &lt;StoreID&gt;0&lt;/StoreID&gt;
  &lt;TokenID/&gt;
  &lt;UpdateTimestamp&gt;
  &lt;DateTime&gt;2015-11-17T19:45:46&lt;/DateTime&gt;
  &lt;MilliSeconds&gt;718&lt;/MilliSeconds&gt;
  &lt;/UpdateTimestamp&gt;
  &lt;Verified&gt;true&lt;/Verified&gt;
  &lt;XMLData&gt;
  &lt;data xmlns=""/&gt;
  &lt;/XMLData&gt;
  &lt;/User&gt;
  </code></pre>
  
  <p>and here is my php code for the SaveUser part</p>
  
  <pre><code>$clientSaveUser = new SoapClient('$WSDL',array('trace'=&gt;1));
      $saveUserQueryData = array(     
                          "Username"=&gt; $master,
                          "Password"=&gt;$masterPass,
                          "CompanyID"=&gt;$compid,
                          "User"=&gt;$userDataXML
                          );
      $saveUser = $clientSaveUser-&gt;SaveUser($saveUserQueryData);
  
      libxml_use_internal_errors(true);
      $lastResponseSaveUser = $clientSaveUser-&gt;__getLastResponse();
  </code></pre>
  
  <p>Thanks for any help!</p>