users@jax-ws.java.net

Re: Java to WSDL to Java with Soap Headers

From: Sameer Tyagi <styagi_at_usc.edu>
Date: Wed, 25 Apr 2007 10:37:13 -0400

Modified jax-ws sample code attached.

/s


----- Original Message -----
From: Sameer Tyagi <styagi_at_usc.edu>
Date: Wednesday, April 25, 2007 10:36 am
Subject: Java to WSDL to Java with Soap Headers
To: users_at_jax-ws.dev.java.net

> Question.
>
> I have a Java class with @webparam header=true in the method
> signature.public int addNumbers (int p1, int p2, int p3, @WebParam
> (name="contextheader", header=true) POContextHeader header)
> When I generate the WSDL, everything is good and the operation has
> the headers.
>
> However when I generate the client - wsimport has seems to be
> using the BARE style rather than the default wrapped style and
> wrapping the signature in a single bean - rather than generating
> the same signature it generates this.
>
> public AddNumbersResponse addNumbers(
> @WebParam(name = "addNumbers", targetNamespace =
> "http://server.fromjava/", partName = "parameters")
> AddNumbers parameters,
> @WebParam(name = "contextheader", targetNamespace =
> "http://server.fromjava/", header = true, partName = "contextheader")
> POContextHeader contextheader);
>
> Why does it do this ? Even when I specify the custom
> <enableWrapperStyle> true. Is there a way to force the client stub
> signature to look identical the server side signature ?
>
> /s
>
>