title: How to remove the “ser” prefix from SOAP request attributes in PHP
body: <p>I'm trying to remove the 'ser' attribute from the following SOAP request:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://localhost/server"&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;ser:eRoamingChargeDetailRecord&gt;
           &lt;SessionID&gt;?&lt;/SessionID&gt;
        &lt;/ser:eRoamingChargeDetailRecord&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>I'd like it to look like this:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="localhost/blah"&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;eRoamingChargeDetailRecord xmlns:ns2="localhost/blah" xmlns="localhost/blah"&gt;
           &lt;SessionID&gt;?&lt;/SessionID&gt;
        &lt;/eRoamingChargeDetailRecord&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>However, when I remove this prefix manually, the server returns the following error:</p>
  
  <pre><code>Procedure 'eRoamingChargeDetailRecord' not present
  </code></pre>
  
  <p>The SOAP server is set up in PHP like so:</p>
  
  <pre><code>if (isset($_GET['wsdl'])) {
              ini_set('soap.wsdl_cache_enabled', 0);
              $soapAutoDiscover = new \Zend\Soap\AutoDiscover(new \Zend\Soap\Wsdl\ComplexTypeStrategy\ArrayOfTypeSequence());
              $soapAutoDiscover-&gt;setBindingStyle(array('style' =&gt; 'document'));
              $soapAutoDiscover-&gt;setOperationBodyStyle(array('use' =&gt; 'literal'));
              $soapAutoDiscover-&gt;setClass('\\App\\Helpers\\Soap\\SoapFunctions');
              $soapAutoDiscover-&gt;setUri('http://localhost/server');
              $soapAutoDiscover-&gt;handle();
          } else {
              $soap = new \Zend\Soap\Server('http://localhost/server?wsdl', array("soap_version" =&gt; SOAP_1_1));
              $soap-&gt;setObject(new \Zend\Soap\Server\DocumentLiteralWrapper(new \App\Helpers\Soap\SoapFunctions()));
              $soap-&gt;handle();
          }
  }
  </code></pre>
  
  <p>And the function is:</p>
  
  <pre><code>/**
   * This method takes ...
   *
   * @param string $SessionID
   * @return string
   */
  public function eRoamingChargeDetailRecord($SessionID) {
      return "hello2 {$SessionID}";
  }
  </code></pre>
  
  <p>How can I remove this ser prefix?</p>
  
  <p><a href="https://stackoverflow.com/questions/34826581/how-to-remove-the-new-prefix-from-several-attributes-of-the-element-in-the-req">I've found similar questions on SO, but these are related to Java</a></p>