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:
<?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:
<?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
$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