NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Setting defaultNamespace


Joined: 05 Jul 2007
Posts: 1
Reply with quote
How do you set the default namespace? I am using a doc/literal WSDL.

$client = new soapclient('http://localhost/wsdl/RAS.wsdl', true);

$request['RASRequest']['AuthDetail'] = array()
// code to set other elements
$response = $client->call('myoperationname', $request, 'http://www.namespaceiwant.com);

The namespace "'http://www.namespaceiwant.com" is being created and is prefixed in the SOAP-ENV but the contents of the body are not using it. How do you force it become default namespace/or be used?

Here is how the request looks (see that SOAP-Body contents have no namespace definition) -

<?xml version="1.0" encoding="ISO-8859-1"?>
<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:ns="'http://www.namespaceiwant.com">
<SOAP-ENV:Body><RASRequest><AuthDetail>....</AuthDetail></RASRequest></SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Here is what I would like -

<?xml version="1.0" encoding="ISO-8859-1"?>
<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:ns="'http://www.namespaceiwant.com">
<SOAP-ENV:Body><ns:RASRequest><ns:AuthDetail>....</ns:AuthDetail></ns:RASRequest></SOAP-ENV:Body>
</SOAP-ENV:Envelope>

OR atleast be able to add xmlns="'http://www.namespaceiwant.com" to SOAP-ENV, SOAP-Body or the first element under the Body.
View user's profileFind all posts by techguySend private message
Setting defaultNamespace
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic