NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
namespace missing in request sent by nusoap client


Joined: 22 Nov 2008
Posts: 1
Reply with quote
Hello
I am trying to make a nusoap client for a server created using gsoap (c++). But I am getting errors of type "Method 'authenticate' not implemented: method name or namespace not recognized" on the server.

The problem seems to be that the operation name in the request is missing the namespace prefix. I concluded this by comparing the request sent by nusoap client and sample request required by gsoap ( a sample is generated when server is build).

Request actually sent by nusoap client:
Code:

<?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:tns="urn:vocabulary-service-namespace">
<SOAP-ENV:Body>
<authenticate xmlns="">
     <email xmlns="">joe.net@net.com</email>
     <password xmlns="">password</password>
</authenticate>
</SOAP-ENV:Body>


Sample request required by gsoap server:
Code:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:ns1="urn:vocabulary-service-namespace">
<SOAP-ENV:Body>
   <ns1:authenticate>
   <email></email>
   <password></password>
   </ns1:authenticate>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


to make the call I am using
Code:

$client = new nusoap_client( <path to local copy of wsdl>,  true );
$client->soap_defencoding = 'UTF-8';
$namespace = "urn:vocabulary-service-namespace";
$param = array(  "email" => "joe.net@net.com", "password" => "password" );
$result = $client->call( 'authenticate', array( "parameters" => $param), $namespace, '', false, null, 'document', 'literal' );


I am pasting the parts of the wsdl I think are releveant ( I can post the complete wsdl but its big )
[/code]
(in definitions element of wsdl contains)
targetNamespace="urn:vocabulary-service-namespace"
xmlns:tns="urn:vocabulary-service-namespace"
xmlns:ns1="urn:vocabulary-service-namespace"
[/code]

I tried to make the call without passing the namespace element and other arguments but then the request sent contains a randomly generated namespace prefix in the soap envelope like xmlns:ns1681="urn:vocabulary-service-namespace", and still doesnt add any prefix to the "authenticate" element
[code]
Can someone tell me what needs to be done so that the authenticate has its namespace prefix. Or if you think theres something else wrong can you point it out.
Please note that I am building both the server and the client so I can make changes on either side.
Any help is appreciated.
Thanks
View user's profileFind all posts by sunflightSend private message
namespace missing in request sent by nusoap client
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