axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anne Thomas Manes <atma...@gmail.com>
Subject Re: document/literal webservice does not work good if the operation contains more than one parameter
Date Sun, 10 Jul 2005 13:17:52 GMT
That's correct. That's the way SOAP is supposed to work. SOAP
processes only the first child of the soap:Body. If you send multiple
children, then either all children after the first child are ignored
or they are treated as separate request invocations. (The spec isn't
clear on this point, so results will vary based on the tool you're
using.) The WS-I Basic Profile
(http://www.ws-i.org/Profiles/BasicProfile-1.1.html) clarifies this
ambiguity:
<ws-i-bp-excerpt>
4.4.1 Bindings and Parts

There are various interpretations about how many wsdl:part elements
are permitted or required for document-literal and rpc-literal
bindings and how they must be defined.

R2201 A document-literal binding in a DESCRIPTION MUST, in each of its
soapbind:body element(s), have at most one part listed in the parts
attribute, if the parts attribute is specified.

R2209 A wsdl:binding in a DESCRIPTION SHOULD bind every wsdl:part of a
wsdl:message in the wsdl:portType to which it refers with a binding
extension element.

R2210 If a document-literal binding in a DESCRIPTION does not specify
the parts attribute on a soapbind:body element, the corresponding
abstract wsdl:message MUST define zero or one wsdl:parts.
</ws-i-bp-excerpt>

If you want to send multiple parameters, you must used wrapped
doc/literal (or RPC style).

Anne

On 7/9/05, Ravi Krishnamurthy <ravik@savvion.com> wrote:
> Hello:
> Created a simple java class called DocLit1 with the following method:
> 
> public String testString(String str1, String str2){
>         System.out.println(" str 1 is " + str1);
>         System.out.println(" str2 is " + str2);
>         return str1 + str2;
>     }
> 
> Deployed it as document/literal (NOT WRAPPED )
> 
> When the input values are {"str1", "str2") the response is str1null. On
> further investigation found out that the second parameter is always null.
> 
> I have attached the WSDL and my client code(DocLit1.java as dynamic
> invocation) with this email. Would appreciate any pointers.
> 
> Even generated the stubs using the WSDL2JAVA and tried it but got the
> same result. The client for the stub is DocLiteralClient.java.
> 
> Thanks,
> Ravi
> 
> 
> 
> 
>  
> 
>

Mime
View raw message