SOAP: need different namespace format for request
| From: | roehr at zilleon dot com | Date: | Thu, 16 Nov 2006 08:42:20 +0000 |
| Subject: | SOAP: need different namespace format for request | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-25846@lists.php.net to get a copy of this message | ||
Hi,
I need PEAR::SOAP to generate a different namespace syntax for the request. I'm using 0.9.4 and
my script is this:
$soapclient =& new SOAP_Client('http://.../xyz.asmx?WSDL');
$options = array('namespace' => 'urn:ABC', 'trace' => 1);
$ret =& $soapclient->call('GetByDate', $params = array('dDate' =>
'11/13/2006'), $options);
SOAP generates this:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="ABC">
<SOAP-ENV:Body>
<ns4:GetByDate>
<dDate>11/13/2006</dDate>
</ns4:GetByDate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
What I need is this:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetByDate xmlns="ABC">
<dDate>dateTime</dDate>
</GetByDate>
</soap:Body>
</soap:Envelope>
So instead of <ns4:GetByDate> the server expects <GetByDate xmlns="ABC">.
Is there any option I can pass to SOAP to change the way it handles namespaces?
Any hints are greatly appreciated.
Thanks and regards,
Torsten