how to post xmldata to an https:// wsdl via php
<p>Good Evening All,</p>

<p></p>

<p>I am been fighting an uphill battle try to post xml data to an https web service. I am new to PHP so I am trying to learn as I go. I have been able to post the xml data to the web services via soapUI but I cannot recreate to process thru PHP. If anyone who a PHP SOAP guru could explain to me what I am doing wrong that would be a great help. Below is the code snippet I am trying to post to the web service.</p>

<p></p>

<pre><code>&lt;?php
$user = "xxxxxx"; 
$password = "xxxxx"; 
$url = "https://esws.energystar.gov/DataServices/servlet/webservices?ver=1.1&amp;wsdlxml";
$post_string = &lt;&lt;&lt;EOT
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:roof="http://www.energystar.gov/schema/Roof_Products_2_x/" xmlns:core="http://www.energystar.gov/schema/core/"&gt;
 &lt;soapenv:Header/&gt;
 &lt;soapenv:Body&gt;
    &lt;roof:Roof_Products_submission&gt;
       &lt;core:core_submission&gt;
          &lt;core:Authentication_UserName&gt;xxxxx&lt;/core:Authentication_UserName&gt;
          &lt;core:Authentication_Password&gt;xxxxxxx&lt;/core:Authentication_Password&gt;
  &lt;core:Certification_Body_EPA_Issued_Organization_Id&gt;xxxxxxx&lt;/core:Certification_Body_EPA_Issued_Organization_Id&gt;
          &lt;core:Is_Test_Submission&gt;Yes&lt;/core:Is_Test_Submission&gt;
       &lt;/core:core_submission&gt;
       &lt;!--1 or more repetitions:--&gt;
       &lt;roof:Roof_Products&gt;
          &lt;core:core_product_data&gt;
             &lt;core:ENERGY_STAR_Manufacturing_Partner&gt;QPX Active Partner&lt;/core:ENERGY_STAR_Manufacturing_Partner&gt;
             &lt;core:ENERGY_STAR_Manufacturing_Partner_s_EPA_issued_Organization_ID&gt;xxxxxxxxx&lt;/core:ENERGY_STAR_Manufacturing_Partner_s_EPA_issued_Organization_ID&gt;
             &lt;core:Partner_Contact_Name_For_This_Model&gt;xxxxxxx&lt;/core:Partner_Contact_Name_For_This_Model&gt;
             &lt;core:Type_of_Transaction&gt;Initial Certification&lt;/core:Type_of_Transaction&gt;
             &lt;core:Reason_for_Transaction&gt;Initial Certification: Model Meets ENERGY STAR Requirements&lt;/core:Reason_for_Transaction&gt;
             &lt;core:Date_of_Transaction_Type&gt;2010-12-31&lt;/core:Date_of_Transaction_Type&gt;
             &lt;core:ENERGY_STAR_Model_Identifier&gt;TestID2929&lt;/core:ENERGY_STAR_Model_Identifier&gt;
             &lt;core:Certification_ID&gt;TestCertID123&lt;/core:Certification_ID&gt;
             &lt;core:Family_ID&gt;TestFamID123&lt;/core:Family_ID&gt;
             &lt;core:Model_Name&gt;Model_Name1234&lt;/core:Model_Name&gt;
             &lt;core:Model_Number&gt;Model_Number33453&lt;/core:Model_Number&gt;
             &lt;core:Brand_Name&gt;Brand_Name1&lt;/core:Brand_Name&gt;
             &lt;core:Tested_Model_Name&gt;Tested_Model_Name1&lt;/core:Tested_Model_Name&gt;
             &lt;core:Tested_Model_Number&gt;Tested_Model_Number1&lt;/core:Tested_Model_Number&gt;
             &lt;!--Zero or more repetitions:--&gt;
             &lt;core:Additional_Models_Represented_by_Family_Series_or_DOE_Basic&gt;
                &lt;core:Additional_Model_Name&gt;test&lt;/core:Additional_Model_Name&gt;
                &lt;core:Additional_Model_Number&gt;12345&lt;/core:Additional_Model_Number&gt;
                &lt;core:Additional_Identifying_Information&gt;non&lt;/core:Additional_Identifying_Information&gt;
             &lt;/core:Additional_Models_Represented_by_Family_Series_or_DOE_Basic&gt;
             &lt;core:Is_the_Partner_Listed_the_Original_Equipment_Manufacturer_OEM&gt;Yes&lt;/core:Is_the_Partner_Listed_the_Original_Equipment_Manufacturer_OEM&gt;
             &lt;core:If_the_Partner_is_Not_the_Original_Equipment_Manufacturer_Who_is&gt;?&lt;/core:If_the_Partner_is_Not_the_Original_Equipment_Manufacturer_Who_is&gt;
             &lt;core:Currently_Available_on_Market&gt;Yes&lt;/core:Currently_Available_on_Market&gt;
             &lt;core:Date_Available_On_Market&gt;2010-12-31&lt;/core:Date_Available_On_Market&gt;
             &lt;core:Date_Tested&gt;2010-12-31&lt;/core:Date_Tested&gt;
             &lt;core:Date_CB_Notified_Partner_of_Model_Qualification&gt;2010-12-31&lt;/core:Date_CB_Notified_Partner_of_Model_Qualification&gt;
             &lt;core:Certification_Body_Contact_Name_for_This_Model&gt;QPX Certification Body 1&lt;/core:Certification_Body_Contact_Name_for_This_Model&gt;
             &lt;!--Zero or more repetitions:--&gt;
             &lt;core:Laboratory&gt;
                &lt;core:Laboratory_EPA_issued_Organization_ID&gt;xxxxxxxxx&lt;/core:Laboratory_EPA_issued_Organization_ID&gt;
                &lt;core:Laboratory_Contact_for_This_Model&gt;QPX Laboratory Test&lt;/core:Laboratory_Contact_for_This_Model&gt;
             &lt;/core:Laboratory&gt;
             &lt;!--1 to 8 repetitions:--&gt;
             &lt;core:To_What_Major_Markets_is_This_Model_Sold&gt;United States&lt;/core:To_What_Major_Markets_is_This_Model_Sold&gt;
             &lt;core:Notes&gt;notes on the product&lt;/core:Notes&gt;
          &lt;/core:core_product_data&gt;
          &lt;roof:ENERGY_STAR_Specification_Version&gt;2.2&lt;/roof:ENERGY_STAR_Specification_Version&gt;
          &lt;roof:Product_Type&gt;Single-Ply&lt;/roof:Product_Type&gt;
          &lt;roof:Measured_Initial_Solar_Reflectance&gt;0.25&lt;/roof:Measured_Initial_Solar_Reflectance&gt;
          &lt;roof:Reported_Initial_Solar_Reflectance&gt;0.26&lt;/roof:Reported_Initial_Solar_Reflectance&gt;
          &lt;roof:Initial_Solar_Reflectance_Test_Method&gt;ASTM E903-96&lt;/roof:Initial_Solar_Reflectance_Test_Method&gt;
          &lt;roof:Measured_Solar_Reflectance_After_Three_Years&gt;0.15&lt;/roof:Measured_Solar_Reflectance_After_Three_Years&gt;
          &lt;roof:Reported_Reflectance_After_Three_Years&gt;0.16&lt;/roof:Reported_Reflectance_After_Three_Years&gt;
          &lt;roof:Solar_Reflectance_After_Three_Years_Test_Method&gt;ASTM C1549-09&lt;/roof:Solar_Reflectance_After_Three_Years_Test_Method&gt;
          &lt;roof:Measured_Initial_Emissivity&gt;0.01&lt;/roof:Measured_Initial_Emissivity&gt;
          &lt;roof:Reported_Initial_Emissivity&gt;0.02&lt;/roof:Reported_Initial_Emissivity&gt;
          &lt;roof:Initial_Emissivity_Test_Method_Used&gt;ASTM E408-71(1996) e1&lt;/roof:Initial_Emissivity_Test_Method_Used&gt;
          &lt;roof:Low_Slope&gt;Yes&lt;/roof:Low_Slope&gt;
          &lt;roof:Steep_Slope&gt;Yes&lt;/roof:Steep_Slope&gt;
          &lt;roof:Roof_Cleaned_Prior_to_Third_Year_Test&gt;No&lt;/roof:Roof_Cleaned_Prior_to_Third_Year_Test&gt;
          &lt;roof:Warranty_Period&gt;abcdefg&lt;/roof:Warranty_Period&gt;
       &lt;/roof:Roof_Products&gt;
    &lt;/roof:Roof_Products_submission&gt;
 &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
 EOT;

  $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);   
  ?&gt;
</code></pre>

<p>Any and all help would be greatly <b>appreciated</b>.</p>
