Not getting the required SOAP request XML
<p>I am working on a Simple php Client that uses OCPP (Open Charge Point Protocol). I have created the client and This is the request XML that goes from my code.</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn://Ocpp/Cs/2015/10/"&gt;
      &lt;env:Header&gt;
          &lt;ns1:chargeBoxIdentity env:mustUnderstand="true"&gt;XXX01&lt;/ns1:chargeBoxIdentity&gt;
          &lt;ns1:Action env:mustUnderstand="true"&gt;/Authorize&lt;/ns1:Action&gt;
          &lt;ns1:MessageId env:mustUnderstand="true"&gt;123&lt;/ns1:MessageId&gt;
          &lt;ns1:RelatesTo&gt;relatesTo&lt;/ns1:RelatesTo&gt;
          &lt;ns1:From/&gt;
          &lt;ns1:ReplyTo/&gt;
          &lt;ns1:To/&gt;
      &lt;/env:Header&gt;
      &lt;env:Body&gt;
          &lt;ns1:authorizeRequest&gt;
          &lt;ns1:idTag&gt;1234567&lt;/ns1:idTag&gt;
          &lt;/ns1:authorizeRequest&gt;
      &lt;/env:Body&gt;
  &lt;/env:Envelope&gt;
</code></pre>

<p>But I am suppose to get this XML output</p>

<pre><code>&lt;?xml version='1.0' encoding='utf8'?&gt; 
&lt;ns0:Envelope xmlns:ns0="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn://Ocpp/Cs/2015/10/"&gt;
    &lt;ns0:Header&gt;
        &lt;ns1:chargeBoxIdentity mustUnderstand="true"&gt;XXX01 &lt;/ns1:chargeBoxIdentity&gt;
        &lt;ns1:Action mustUnderstand="true"&gt;/Authorize&lt;/ns1:Action&gt;
        &lt;ns1:MessageId mustUnderstand="true"&gt;123&lt;/ns1:MessageId&gt;
        &lt;ns1:RelatesTo&gt;relatesTo&lt;/ns1:RelatesTo&gt;
        &lt;ns1:From /&gt;
        &lt;ns1:ReplyTo /&gt;
        &lt;ns1:To /&gt;
    &lt;/ns0:Header&gt;
    &lt;ns0:Body&gt;
        &lt;ns1:IdTag&gt;1234567&lt;/ns1:IdTag&gt;
    &lt;/ns0:Body&gt;
&lt;/ns0:Envelope&gt;
</code></pre>

<p>Notice that my code has <code>env:Envelope</code> and output has <code>ns0:Envelope</code> and in my code extra attribute is there in the Soap Body. I have very limited knowledge in php SOAP. The relevant code is below.</p>

<pre><code>ini_set('soap.wsdl_cache_enabled',0);

$wsdl_centralsystem = "OCPP_centralsystemservice_1.5_final.wsdl";
$params =  "0.1.1.255.0.0.1.0.";

$vLocation = "linktoserver/server.php";

$client = new SoapClient($wsdl_centralsystem, array(

    "soap_version" =&gt; SOAP_1_2,
    "location" =&gt; $vLocation,
    "trace"=&gt;1, "exceptions"=&gt;0,

));

$chargeboxid = "XXX01";
$action = "/Authorize";
$msgid = "123";
$relatesto = "relatesTo";


//Create Soap Headers
$headerCchargeBoxIdentity = new SoapHeader("urn://Ocpp/Cs/2015/10/", 'chargeBoxIdentity', $chargeboxid, true);
$headerAction = new SoapHeader("urn://Ocpp/Cs/2015/10/", 'Action', $action, true);
$headerMessageId = new SoapHeader("urn://Ocpp/Cs/2015/10/", 'MessageId', $msgid, true);
$headerRelatesTo = new SoapHeader("urn://Ocpp/Cs/2015/10/", 'RelatesTo', $relatesto, false);
$headerFrom = new SoapHeader("urn://Ocpp/Cs/2015/10/", 'From', NULL, false);
$headerReplyTo= new SoapHeader("urn://Ocpp/Cs/2015/10/", 'ReplyTo', NULL, false);
$headerTo = new SoapHeader("urn://Ocpp/Cs/2015/10/", 'To', NULL, false);

//set the Headers of Soap Client.
$client-&gt;__setSoapHeaders(array($headerCchargeBoxIdentity,$headerAction,$headerMessageId,$headerRelatesTo,$headerFrom,$headerReplyTo,$headerTo));


$output = $client-&gt; __soapCall('Authorize',array($params));
</code></pre>