xml - PHP SoapVar remove unwanted parent tag -


i following example http://php.net/manual/en/soapvar.soapvar.php#114701

current code:

<?php     $parm = array(); $parm[] = new soapvar('31', xsd_string, null, null, 'content_id');  $client = new soapclient($soap_url, array('trace' => 1)); $response = $client->getcontentbyid(new soapvar($parm, soap_enc_object));  echo "request:\n" . $client->__getlastrequest() . "\n"; 

generated xml:

<?xml version="1.0" encoding="utf-8"?> <soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://v1.service.ws.com/">     <soap-env:body>         <ns1:getcontentbyid>             <content_id>                 <content_id>31</content_id>             </content_id>         </ns1:getcontentbyid>     </soap-env:body> </soap-env:envelope> 

expected xml:

<?xml version="1.0" encoding="utf-8"?> <soap-env:envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://v1.service.ws.com/">     <soap-env:body>         <ns1:getcontentbyid>             <content_id>31</content_id>         </ns1:getcontentbyid>     </soap-env:body> </soap-env:envelope> 

the problem unknown parent tag content_id above correct content_id tag , want remove them. how that?

my php version 7.0.22-0ubuntu0.16.04.1, ubuntu server 16.04 lts.

thanks.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -