title: Assistance with PHP Soap request with attributes and nodes
body: <p>Edit, see my last comment. I commented the code where I added the fullName to the metadata array.</p>
  
  <p>I'm having an issue using the PHP Soap client to create the below XML Soap request. Problem I'm having is adding the fullName element as the child node to sObjects. </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn1="urn:tooling.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;x:Header&gt;
      &lt;urn1:SessionHeader&gt;
          &lt;urn1:sessionId&gt;a sessionid&lt;/urn1:sessionId&gt;
      &lt;/urn1:SessionHeader&gt;
      &lt;urn1:MetadataWarningsHeader&gt;
          &lt;urn1:ignoreSaveWarnings&gt;false&lt;/urn1:ignoreSaveWarnings&gt;
      &lt;/urn1:MetadataWarningsHeader&gt;
      &lt;urn1:AllOrNoneHeader&gt;
          &lt;urn1:allOrNone&gt;false&lt;/urn1:allOrNone&gt;
      &lt;/urn1:AllOrNoneHeader&gt;
      &lt;urn1:CallOptions&gt;
          &lt;urn1:client/&gt;
      &lt;/urn1:CallOptions&gt;
  &lt;/x:Header&gt;
  &lt;x:Body&gt;
      &lt;urn1:create&gt;
          &lt;urn1:sObjects xsi:type="WorkflowFieldUpdate"&gt;
              &lt;fullName&gt;Lead.Tooling&lt;/fullName&gt;
              &lt;metadata&gt;
                  &lt;field&gt;Test_Field_Update__c&lt;/field&gt;
                  &lt;name&gt;Tooling&lt;/name&gt;
                  &lt;notifyAssignee&gt;false&lt;/notifyAssignee&gt;
                  &lt;operation&gt;Null&lt;/operation&gt;
                  &lt;protected&gt;false&lt;/protected&gt;
              &lt;/metadata&gt;
          &lt;/urn1:sObjects&gt;
      &lt;/urn1:create&gt;
  &lt;/x:Body&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here is the code I'm using in the create function. I get everything, but the fullName. I tried adding is as apart of an array with the Metadata node, but it's inserted as Bogus.</p>
  
  <pre><code>$field = new SoapVar('Test_Field_Update__c', XSD_STRING, null, null, 'field', null);
  $name = new SoapVar('ToolingSample', XSD_STRING, null, null, 'name', null);
  $notifyAssignee = new SoapVar(false, XSD_BOOLEAN, null, null, 'notifyAssignee');
  $protected = new SoapVar(false, XSD_BOOLEAN, null, null, 'protected');
  $operation = new SoapVar('Null', XSD_STRING, null, null, 'operation');
  $fullname = new SoapVar('Lead.ToolingSample', XSD_STRING, null, null, 'fullName', null);
  
  $metadata = new SoapVar(
      array($field, $name, $notifyAssignee, $protected, $operation),
      SOAP_ENC_OBJECT,
      null,
      null,
      'Metadata'
  );
  // I needed change this line SoapVar
  $metadataList = new SoapVar(array($metadata), SOAP_ENC_OBJECT);
  // Fix: Is adding the fullName var to the $metadata array
  $metadataList = SoapVar(array($metadata, $fullname), SOAP_ENC_OBJECT);
  
  $sObject = new SoapVar($metadataList, SOAP_ENC_OBJECT, 'WorkflowFieldUpdate', null, 'sObjects');
  $sObjects = new SoapVar(array($sObject), SOAP_ENC_OBJECT, null, null, null);
  
  $response = $soapClient-&gt;create(new SoapVar($sObjects, SOAP_ENC_OBJECT));
  
  $ReturnArray = array('success' =&gt; true, 'data' =&gt; $response, 'types' =&gt; $metadataList, 'request' =&gt; $soapClient-&gt;__getLastRequest());
  
  echo $_REQUEST['callback'] . '(' . json_encode($ReturnArray) . ')';
  </code></pre>
  
  <p>I tried changing the sObject Soapvar to this, but no go. I wasn't too confident it would work.</p>
  
  <pre><code>$sObject = new SoapVar(array($fullName, $metadataList), SOAP_ENC_OBJECT, 'WorkflowFieldUpdate', null, 'sObjects')
  </code></pre>