title: SOAP request by cURL gives back response: There was an error generating the XML document
body: <p><strong>The XML</strong></p>
  
  <pre><code>$xml = "&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;soap12:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap12='http://www.w3.org/2003/05/soap-envelope'&gt;
    &lt;soap12:Body&gt;
      &lt;GetProviderTrades xmlns='ZuluTrade.WebServices'&gt;
        &lt;providerId&gt;128391&lt;/providerId&gt;
        &lt;currencyIds&gt;
      &lt;string&gt;EURUSD&lt;/string&gt;
      &lt;string&gt;USDCAD&lt;/string&gt;
        &lt;/currencyIds&gt;
        &lt;fromDateStr&gt;1986-08-27T09:00:00&lt;/fromDateStr&gt;
        &lt;toDateStr&gt;2014-01-12T09:00:00&lt;/toDateStr&gt;
        &lt;validTrades&gt;true&lt;/validTrades&gt;
        &lt;lotSize&gt;Standard&lt;/lotSize&gt;
        &lt;start&gt;0&lt;/start&gt;
        &lt;length&gt;20&lt;/length&gt;
        &lt;sortBy&gt;dc&lt;/sortBy&gt;
        &lt;sortAscending&gt;false&lt;/sortAscending&gt;
      &lt;/GetProviderTrades&gt;
    &lt;/soap12:Body&gt;
  &lt;/soap12:Envelope&gt;";
  </code></pre>
  
  <p><strong>The Request function</strong></p>
  
  <pre><code>function http_post ($url, $xml)
  {
  date_default_timezone_set('America/New_York');
  $post_string = $xml;
  
  $soap_do = curl_init(); 
  curl_setopt($soap_do, CURLOPT_URL,            $url );   
  curl_setopt($soap_do, CURLOPT_CONNECTTIMEOUT, 10); 
  curl_setopt($soap_do, CURLOPT_TIMEOUT,        10); 
  curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true );
  curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false);  
  curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false); 
  curl_setopt($soap_do, CURLOPT_POST,           true ); 
  curl_setopt($soap_do, CURLOPT_POSTFIELDS,    $post_string); 
  curl_setopt($soap_do, CURLOPT_HTTPHEADER,     array('Content-Type: text/xml; charset=utf-8', 'Content-Length: '.strlen($post_string) )); 
  //curl_setopt($soap_do, CURLOPT_USERPWD, $user . ":" . $password);
  
  $result = curl_exec($soap_do);
  $err = curl_error($soap_do); 
  
  return $result;
  }
  </code></pre>
  
  <p><strong>The call</strong></p>
  
  <pre><code>    $postRequest = http_post('http://www.zulutrade.com/WebServices/Performance.asmx?op=GetProviderTrades',$xml);
  </code></pre>
  
  <p><strong>The Full Response</strong></p>
  
  <pre><code>soap:ServerServer was unable to process request. ---&gt; There was an error generating the XML document. ---&gt; &lt;&gt;f__AnonymousType55`2[System.Int32,Z.T[]] cannot be serialized because it does not have a parameterless constructor.
  </code></pre>
  
  <p><strong>The WSDL</strong>
  <a href="http://www.zulutrade.com/WebServices/Performance.asmx?WSDL" rel="nofollow">http://www.zulutrade.com/WebServices/Performance.asmx?WSDL</a></p>
  
  <p>Haven't found anything wrong with what I'm doing, any ideas?</p>