You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Oliver Kowalke <ol...@t-online.de> on 2002/02/02 16:29:10 UTC
parameters not namespace-quallified ???
Hello,
I've also an problem with propagating parameters from Apache SOAP client to
.NET service (service doesn't get the two values).
In my client code I register the method (addNumbers) and its parameters(dbl1
and dbl2:
call.setTargetObjectURI("http://tempuri.org/");
call.setMethodName("addNumbers");
call.setEncodingStyleURI( Constants.NS_URI_SOAP_ENC);
Vector params = new Vector();
params.addElement( new Parameter("dbl1", Double.class, "1.4",
Constants.NS_URI_SOAP_ENC) );
params.addElement( new Parameter("dbl2", Double.class, "3.6",
Constants.NS_URI_SOAP_ENC) );
call.setParams( params);
the envelop send to the .Net service looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:addNumbers xmlns:ns1="http://tempuri.org/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<dbl1 xsi:type="xsd:double">1.4</dbl1>
<dbl2 xsi:type="xsd:double">3.6</dbl2>
</ns1:addNumbers>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I could figure out that dbl1 and dbl2 schould be quallified by namespace
'ns1'. If I change the client code to:
Vector params = new Vector();
params.addElement( new Parameter("ns1:dbl1", Double.class, "1.4",
Constants.NS_URI_SOAP_ENC) );
params.addElement( new Parameter("ns1:dbl2", Double.class, "3.6",
Constants.NS_URI_SOAP_ENC) );
call.setParams( params);
the .Net server gets the parameters. But this is a hack. The Apache SOAP
toolkit should set the namespace for the method and for its parameters. I
think ;^)
Maybe you have an solution?
so long,
Oliver