title: Converting SOAP request from XML to PHP
body: <p>I am getting desperate here, I am trying to convert an XML SOAP request which works in SoapUI to PHP. I went through so much documentation online and still cannot get to creating a correct request from within PHP. I tried using the SOAP class provided in PHP together SoapVars, SoapParams and SoapHeaders. This is the request I need to send (in XML form):</p>
  
  <pre><code>&lt;soapenv:Envelope 
  xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' 
  xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' 
  xmlns:xsd='http://www.w3.org/2001/XMLSchema' 
  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
  xmlns:wsa='http://schemas.xmlsoap.org/ws/2004/03/addressing' 
  xmlns:gen='http://www.polaris-uk.co.uk/GenericSchema/1_1/GenericTypes' 
  xmlns:Detail='http://www.polaris-uk.co.uk/GenericSchema/2/PEMFault' 
  xsi:SchemaLocation='http://www.polaris-uk.co.uk/GenericSchema/2/PEMFault http://ppw.imarket.co.uk/Polaris/Schema/PEMFault.xsd'&gt;
  &lt;soapenv:Header&gt;
    &lt;wsse:Security 
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis- 200401-wss-wssecurity-secext-1.0.xsd" 
    soapenv:mustUnderstand="1" 
    soapenv:actor="http://www.imarket.co.uk/soap/actor"&gt;
      &lt;wsse:UsernameToken&gt;
        &lt;wsse:Username&gt;XXXXXXXXXX&lt;/wsse:Username&gt;
        &lt;wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-ns2curity-secext-1.0.xsd#PasswordText"&gt;XXXXXXXXXX&lt;/wsse:Password&gt;
      &lt;/wsse:UsernameToken&gt;
    &lt;/wsse:Security&gt;
  &lt;/soapenv:Header&gt;
  
  &lt;soapenv:Body&gt;
    &lt;ConfirmImarketUserIDReq xmlns="http://www.polaris-uk.co.uk/Schema/1_1/ConfirmImarketUserIDReq"&gt; 
      &lt;ns1:UserID xmlns:ns1="http://www.polaris-uk.co.uk/GenericSchema/1_1/GenericTypes"&gt;XXXXXXXXXX&lt;/ns1:UserID&gt; 
      &lt;ns2:Password xmlns:ns2="http://www.polaris-uk.co.uk/GenericSchema/1_1/GenericTypes"&gt;XXXXXXXXXX&lt;/ns2:Password&gt; 
    &lt;/ConfirmImarketUserIDReq&gt;
  &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>I will not post any code I did until now because it is just a mess since I tried writing bits and pieces without actually putting them together at one point and it will just spam this whole post.</p>
  
  <p>Please, if anyone could help with converting this into a PHP code it will be much appreciated.</p>
  
  <p>Thank you in advance!</p>