title: PHP SoapClient sends escaped XML characters
body: <p>I create an XML document using PHP's <code>XMLWriter</code>.</p>
  
  <pre><code>    $xmlWriter = new \XMLWriter();
      $xmlWriter-&gt;openMemory(); //generate XML in-memory, not on disk
  
      //Please keep the indentation intact to preserve everybody's sanity!
      $xmlWriter-&gt;startElement('RootElement');
      // ...
      $xmlWriter-&gt;endElement();
  
      $myXml = $xmlWriter-&gt;outputMemory(true);
  </code></pre>
  
  <p>Now I connect to a SOAP service in non-WSDL mode.</p>
  
  <pre><code>        $soapClient = new \SoapClient(null, array(
              "location" =&gt; "https://theservice.com:1234/soap/",
              "uri" =&gt;  "http://www.namespace.com",
              "trace" =&gt; 1
              )
          );
  
          $params = array(
                  new \SoapParam($myXml, 'param')
              );
  
          $result = $soapClient-&gt;__soapCall('method', $params);
  </code></pre>
  
  <p>The problem is that the SOAP message received by the SOAP service contains my data as escaped XML characters. (Warning : dummy SOAP message ahead!)</p>
  
  <pre><code>&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope" ...&gt;
      &lt;SOAP-ENV:Header&gt;
          ...
      &lt;/SOAP-ENV:Header&gt;
      &lt;SOAP-ENV:Body&gt;
          &lt;ns1:method&gt;
              &lt;Request xsi:type="xsd:string"&gt;
                  &amp;lt;Root&amp;gt;
                      (escaped data)
                  &amp;lt;/Root&amp;gt;
              &lt;/Request&gt;
          &lt;/ns1:method&gt;
      &lt;/SOAP-ENV:Body&gt;
  &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  
  <p>The SOAP service will not work with escaped data but, on the other hand, I don't escape my data, the <code>SoapClient</code> does so. How do I make my <code>SoapClient</code> send unescaped data?</p>