users@jax-rpc.java.net

Re: wsdl and soap header question

From: Doug Kohlert <Doug.Kohlert_at_Sun.COM>
Date: Tue, 16 Nov 2004 09:28:53 -0800

Alessio,
You can either write a handler, see:
http://java.sun.com/webservices/docs/1.3/tutorial/doc/JAXRPC7.html#wp122942
Or you can use the -f:explicitcontext option. This option will place
headers as parameters in the method signatures.

Alessio Cervellin wrote:

>I have a wsdl which defines two messages, each of them having only one part, and an operation which puts a message in the body and the other one in the header:
>..
> <wsdl:message name="message1">
> <wsdl:part element="element1" name="body"/>
> </wsdl:message>
> <wsdl:message name="message2">
> <wsdl:part element="element2" name="header"/>
> </wsdl:message>
>..
> <wsdl:operation name="NewOperation">
> <soap:operation
> soapAction=""
> style="document"/>
> <wsdl:input>
> <soap:body parts="body" use="literal"/>
> <soap:header message="tns:message2" part="header" use="literal">
></soap:header>
> </wsdl:input>
> <wsdl:output>
> <soap:body parts="body" use="literal"/>
> <soap:header message="tns:message2" part="header" use="literal">
></soap:header>
>..
>
>by compiling this wsdl with wscompile (jwsdp1.5), it generates a _Stub class with one method "NewOperation" having only one parameter, "element1".
>What I wonder is: shouldn't it have two parameters, element1 and element2? Otherwise, how can the stub populate the header with the values of element2?
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
>For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net