You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by forda <da...@bredband.net> on 2009/08/28 15:48:54 UTC

Error while generating soap:header using WSDL-first approach with CXF 2.2.3

Hello !

Whith the instruction below:

"wsdl first way: you can add elements to the message in the wsdl and then
mark them as soap:headers in the soap:binding section of the wsdl. The
wsdl2java tool will generate the @WebParam(header = true) annotations as
above"

which is from the FAQ, i receive an Error, will attach it with this post
along with the WSDL.
Though with the workaround passing an extra arg like this

<extraargs>										       	    <extraarg>-autoNameResolution</extraarg>
</extraargs>

Using 2.2.3 version of CXF. Any idea?

Thanks in advance.

Daniel

http://www.nabble.com/file/p25190243/error.txt error.txt 
http://www.nabble.com/file/p25190243/Ansokan.wsdl Ansokan.wsdl 
http://www.nabble.com/file/p25190243/ListaAnsokanstatusTypSvarsmeddelande.xsd
ListaAnsokanstatusTypSvarsmeddelande.xsd  
http://www.nabble.com/file/p25190243/ListaAnsokanstatusTypAnropsmeddelande.xsd
ListaAnsokanstatusTypAnropsmeddelande.xsd 
http://www.nabble.com/file/p25190243/MeddelandeTidsstampel.xsd
MeddelandeTidsstampel.xsd 					
-- 
View this message in context: http://www.nabble.com/Error-while-generating-soap%3Aheader-using-WSDL-first-approach-with-CXF-2.2.3-tp25190243p25190243.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Error while generating soap:header using WSDL-first approach with CXF 2.2.3

Posted by Daniel Kulp <dk...@apache.org>.
In your case, the input/output messages don't meet the requirements of it 
being an unwrapable operation, thus, it's treating it as bare mode.   When 
that happens, a bunch of JAX-WS rules change and adding an extra out parameter 
causes it to change to a "void" return and each out param is a holder param.   
It would be:

void listaAnsokanstatusTyp(
 ListaAnsokanstatusTypAnropsmeddelande parameters,
 Holder<ListaAnsokanstatusTypSvarsmeddelande> parameters,
 Holder<MeddelandeTidsstampel> meddelandetidsstampelheader)

Since java won't allow two parameters of a method (the first two) to have the 
same name, the exception is thrown.   The -autoNameResolution  flag works the 
best as it just renames the second to parameters1.    

Dan


On Fri August 28 2009 9:48:54 am forda wrote:
> Hello !
>
> Whith the instruction below:
>
> "wsdl first way: you can add elements to the message in the wsdl and then
> mark them as soap:headers in the soap:binding section of the wsdl. The
> wsdl2java tool will generate the @WebParam(header = true) annotations as
> above"
>
> which is from the FAQ, i receive an Error, will attach it with this post
> along with the WSDL.
> Though with the workaround passing an extra arg like this
>
> <extraargs>										       	    <extraarg>-autoNameResolution</extraarg>
> </extraargs>
>
> Using 2.2.3 version of CXF. Any idea?
>
> Thanks in advance.
>
> Daniel
>
> http://www.nabble.com/file/p25190243/error.txt error.txt
> http://www.nabble.com/file/p25190243/Ansokan.wsdl Ansokan.wsdl
> http://www.nabble.com/file/p25190243/ListaAnsokanstatusTypSvarsmeddelande.x
>sd ListaAnsokanstatusTypSvarsmeddelande.xsd
> http://www.nabble.com/file/p25190243/ListaAnsokanstatusTypAnropsmeddelande.
>xsd ListaAnsokanstatusTypAnropsmeddelande.xsd
> http://www.nabble.com/file/p25190243/MeddelandeTidsstampel.xsd
> MeddelandeTidsstampel.xsd

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog