private function plainXML($xmlRequest)
    {
        $envelope = new DOMDocument();
        $envelope->loadXML(
            '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
		    <soapenv:Body></soapenv:Body>
		</soapenv:Envelope>'
        );

        $envelope->encoding = 'UTF-8';
        $envelope->version = '1.0';
        $xmlRequestType = $xmlRequest->documentElement->localName;
        $xmlRequestTypeNode = $xmlRequest->getElementsByTagName($xmlRequestType)->item(0);
        $xmlRequestTypeNode = $envelope->importNode($xmlRequestTypeNode, true);

        $envelope->getElementsByTagName('Body')->item(0)->appendChild($xmlRequestTypeNode);

        return $envelope->saveXML();
    }
private function plainXML($xmlRequest)
    {
        $envelope = new DOMDocument();
        $envelope->loadXML(
            '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
		    <soapenv:Body></soapenv:Body>
		</soapenv:Envelope>'
        );

        $envelope->encoding = 'UTF-8';
        $envelope->version = '1.0';
        $xmlRequestType = $xmlRequest->documentElement->localName;
        $xmlRequestTypeNode = $xmlRequest->getElementsByTagName($xmlRequestType)->item(0);
        $xmlRequestTypeNode = $envelope->importNode($xmlRequestTypeNode, true);

        $envelope->getElementsByTagName('Body')->item(0)->appendChild($xmlRequestTypeNode);

        return $envelope->saveXML();
    }
private function plainXML ( $ xmlRequest ) { $ envelope = new DOMDocument ( ) ; $ envelope -> loadXML ( '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
		    <soapenv:Body></soapenv:Body>
		</soapenv:Envelope>' ) ; $ envelope -> encoding = 'UTF-8' ; $ envelope -> version = '1.0' ; $ xmlRequestType = $ xmlRequest -> documentElement -> localName ; $ xmlRequestTypeNode = $ xmlRequest -> getElementsByTagName ( $ xmlRequestType ) -> item ( 0 ) ; $ xmlRequestTypeNode = $ envelope -> importNode ( $ xmlRequestTypeNode , true ) ; $ envelope -> getElementsByTagName ( 'Body' ) -> item ( 0 ) -> appendChild ( $ xmlRequestTypeNode ) ; return $ envelope -> saveXML ( ) ; }
Generate XML request

@param DOMDocument $xmlRequest XML request to parse to plain XML

@return string
Generate XML request