title: Post SOAP XML Request
body: <p>I was trying several examples from here, but nothing seems to work for me.</p>
  
  <p>I need to send this envelope for the request:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:v2="http://xmlns.oracle.com/oxp/service/v2"&gt;
    &lt;soapenv:Header /&gt;
   &lt;soapenv:Body&gt;
    &lt;v2:runReport&gt;
    &lt;v2:reportRequest&gt;
    &lt;v2:attributeLocale&gt;en-US&lt;/v2:attributeLocale&gt;
    &lt;v2:attributeTemplate&gt;Default&lt;/v2:attributeTemplate&gt;
    &lt;v2:reportAbsolutePath&gt;/Custom/Financials/Fac/XXIASA_FAC.xdo&lt;/v2:reportAbsolutePath&gt;
    &lt;v2:dynamicDataSource xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;v2:parameterNameValues xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;v2:XDOPropertyList xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /&gt;
    &lt;/v2:reportRequest&gt;
    &lt;v2:userID&gt;user&lt;/v2:userID&gt;
    &lt;v2:password&gt;password&lt;/v2:password&gt;
    &lt;/v2:runReport&gt;
    &lt;/soapenv:Body&gt;
    &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>  $url = 'https://soapurl/v2/ReportService?WSDL';
  
      $headers = array("Content-type: application/soap+xml; charset=\"utf-8\"", "Content-length: " . strlen($xml));
  
      $ch = curl_init();
  
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
      curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
      curl_setopt($ch, CURLOPT_POST, true);
      curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
      curl_setopt($ch, CURLOPT_TIMEOUT, 30);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  
      $response = curl_exec($ch);
      print_r($response);
  </code></pre>
  
  <p>And this is the weird result I am getting back:</p>
  
  <pre><code>��R;o�0��+\ﱁTj�QZ�S_R���m�%sF�@��k�Q�l�����lwjT紅�$�H��Rñ���6OxW2gy�`�_aPƶ �|�\{��:Q��;�S���H���EG�&lt;9���q$�v&amp;gI�ҟ���l��6y��yB���?[��x���X5�a��6��5&amp; ��&lt;8�Q���e`�/F+������{���]������K�(2Q��T���X(�F*ϵ�k��eym����Ӊ��]�M�!y ��"m.�����0z�|�1���g�����}� ������C
  </code></pre>
  
  <p>Why I'm getting this?</p>