You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Christopher Moesel <Ch...@avid.com> on 2007/03/29 15:47:37 UTC

Wsdl2Java Generating BARE not WRAPPED

I'm using the Maven 2 plugin for executing Wsdl2Java.  Although my WSDL
is in doc/literal wrapped style, the generated code specifies
SOAPBinding.ParameterStyle.BARE.  And the style of the generated methods
is also bare-for example:

 

    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)

    @WebResult(targetNamespace = "http://mycompany.com/ws", partName =
"body", name = "MyOperationResponse")

    @WebMethod(operationName = "MyOperation")

    public com.mycompany.ws.MyOperationResponseType myOperation(

        @WebParam(targetNamespace = "http://mycompany.com/ws", partName
= "body", name = "MyOperation")

        com.mycompany.ws.MyOperationType body

    );

 

If I run the same WSDL through the XFire 1.2.5 generator, it correctly
identifies it as doc/literal wrapped and generates code in that style.
So I suspect my WSDL is correct.

 

I didn't see any open issues regarding this-is anyone else having
problems with it?  Any suggestions for things I might try?  Any gotchas
between how XFire identifies wrapped style and how CXF identifies it?

 

Thanks,

Chris

 

 


RE: Wsdl2Java Generating BARE not WRAPPED

Posted by Christopher Moesel <Ch...@avid.com>.
Thanks Dan-- I appreciate the help!

-Chris

-----Original Message-----
From: Dan Diephouse [mailto:dan@envoisolutions.com] 
Sent: Thursday, March 29, 2007 2:42 PM
To: cxf-user@incubator.apache.org
Subject: Re: Wsdl2Java Generating BARE not WRAPPED

Thanks for the bug report. We'll try to fix this soon!
- Dan

On 3/29/07, Christopher Moesel <Ch...@avid.com> wrote:
>
> After some investigation (commenting out and uncommenting out sections
> of WSDL)-- I've determined the cause of the problem.
>
> If a doc/literal wrapped WSDL uses xsd:any in the wrapped request or
> response type, then the WSDL2Java tool will generate the interface
with
> style SOAPBinding.ParameterStyle.BARE.
>
> I don't believe this is the intended behavior (is it?) and have
> submitted a bug report (with example code/wsdl):
> https://issues.apache.org/jira/browse/CXF-502
>
> At this point, this is a stopper for me porting my service from XFire
to
> CXF.  Once the bug is resolved, I'll give it another shot.
>
> Thanks,
> Chris
>
> -----Original Message-----
> From: James Mao [mailto:james.mao@iona.com]
> Sent: Thursday, March 29, 2007 10:05 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: Wsdl2Java Generating BARE not WRAPPED
>
> Hi Chris,
>
> I suggest you open the validate option, to check if there is any
> errors/warnings during processing.
> And also you can try the JAXWS RI, and see if generated as you
expected.
> The last option, also the quickest option is fire an issue on [1] ,
> attach your wsdl.
>
> [1] https://issues.apache.org/jira/browse/CXF
>
> Thanks,
> James.
> > I'm using the Maven 2 plugin for executing Wsdl2Java.  Although my
> WSDL
> > is in doc/literal wrapped style, the generated code specifies
> > SOAPBinding.ParameterStyle.BARE.  And the style of the generated
> methods
> > is also bare-for example:
> >
> >
> >
> >     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> >
> >     @WebResult(targetNamespace = "http://mycompany.com/ws", partName
=
> > "body", name = "MyOperationResponse")
> >
> >     @WebMethod(operationName = "MyOperation")
> >
> >     public com.mycompany.ws.MyOperationResponseType myOperation(
> >
> >         @WebParam(targetNamespace = "http://mycompany.com/ws",
> partName
> > = "body", name = "MyOperation")
> >
> >         com.mycompany.ws.MyOperationType body
> >
> >     );
> >
> >
> >
> > If I run the same WSDL through the XFire 1.2.5 generator, it
correctly
> > identifies it as doc/literal wrapped and generates code in that
style.
> > So I suspect my WSDL is correct.
> >
> >
> >
> > I didn't see any open issues regarding this-is anyone else having
> > problems with it?  Any suggestions for things I might try?  Any
> gotchas
> > between how XFire identifies wrapped style and how CXF identifies
it?
> >
> >
> >
> > Thanks,
> >
> > Chris
> >
> >
> >
> >
> >
> >
> >
>
>


-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Re: Wsdl2Java Generating BARE not WRAPPED

Posted by Dan Diephouse <da...@envoisolutions.com>.
Thanks for the bug report. We'll try to fix this soon!
- Dan

On 3/29/07, Christopher Moesel <Ch...@avid.com> wrote:
>
> After some investigation (commenting out and uncommenting out sections
> of WSDL)-- I've determined the cause of the problem.
>
> If a doc/literal wrapped WSDL uses xsd:any in the wrapped request or
> response type, then the WSDL2Java tool will generate the interface with
> style SOAPBinding.ParameterStyle.BARE.
>
> I don't believe this is the intended behavior (is it?) and have
> submitted a bug report (with example code/wsdl):
> https://issues.apache.org/jira/browse/CXF-502
>
> At this point, this is a stopper for me porting my service from XFire to
> CXF.  Once the bug is resolved, I'll give it another shot.
>
> Thanks,
> Chris
>
> -----Original Message-----
> From: James Mao [mailto:james.mao@iona.com]
> Sent: Thursday, March 29, 2007 10:05 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: Wsdl2Java Generating BARE not WRAPPED
>
> Hi Chris,
>
> I suggest you open the validate option, to check if there is any
> errors/warnings during processing.
> And also you can try the JAXWS RI, and see if generated as you expected.
> The last option, also the quickest option is fire an issue on [1] ,
> attach your wsdl.
>
> [1] https://issues.apache.org/jira/browse/CXF
>
> Thanks,
> James.
> > I'm using the Maven 2 plugin for executing Wsdl2Java.  Although my
> WSDL
> > is in doc/literal wrapped style, the generated code specifies
> > SOAPBinding.ParameterStyle.BARE.  And the style of the generated
> methods
> > is also bare-for example:
> >
> >
> >
> >     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> >
> >     @WebResult(targetNamespace = "http://mycompany.com/ws", partName =
> > "body", name = "MyOperationResponse")
> >
> >     @WebMethod(operationName = "MyOperation")
> >
> >     public com.mycompany.ws.MyOperationResponseType myOperation(
> >
> >         @WebParam(targetNamespace = "http://mycompany.com/ws",
> partName
> > = "body", name = "MyOperation")
> >
> >         com.mycompany.ws.MyOperationType body
> >
> >     );
> >
> >
> >
> > If I run the same WSDL through the XFire 1.2.5 generator, it correctly
> > identifies it as doc/literal wrapped and generates code in that style.
> > So I suspect my WSDL is correct.
> >
> >
> >
> > I didn't see any open issues regarding this-is anyone else having
> > problems with it?  Any suggestions for things I might try?  Any
> gotchas
> > between how XFire identifies wrapped style and how CXF identifies it?
> >
> >
> >
> > Thanks,
> >
> > Chris
> >
> >
> >
> >
> >
> >
> >
>
>


-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Re: Wsdl2Java Generating BARE not WRAPPED

Posted by James Mao <ja...@iona.com>.
Hi Chris,

I believe DanK is correct, the wildcard and substituion groups will fail 
the wrapped style and goes into the Bare style
I also checked with JAXWS-RI confirm this is correct.


Cheers,
James.

> Ooooh...  Yeah, xsd:any would probably be considered a wildcard in this
> case.  So no wildcards and no substitution groups...  That makes writing
> a wrapped style service with extensible schemas pretty difficult,
> doesn't it?
>
> I haven't seen this restriction on the wrapped style before-- does
> anyone know if this is a rule in general for wrapped style, or if it's
> just a JAX-WS thing?
>
> Thanks,
> Chris
>
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org] 
> Sent: Thursday, March 29, 2007 3:32 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Wsdl2Java Generating BARE not WRAPPED
>
>
> Honestly, I'm not sure if the spec would allow us to change this.   The 
> JAX-WS spec specifically says:
>
> "The wrapper elements only contain child elements, they must not contain
>
> other structures such as wildcards (element or attribute), xsd:choice, 
> substitution groups (element references are not per-mitted) or 
> attributes; furthermore, they must not be nillable."
>
> I'm not sure if an "xsd:any" would be considered a "chile element".
>
>
> Dan
>
>
> On Thursday 29 March 2007 12:56, Christopher Moesel wrote:
>   
>> After some investigation (commenting out and uncommenting out sections
>> of WSDL)-- I've determined the cause of the problem.
>>
>> If a doc/literal wrapped WSDL uses xsd:any in the wrapped request or
>> response type, then the WSDL2Java tool will generate the interface
>> with style SOAPBinding.ParameterStyle.BARE.
>>
>> I don't believe this is the intended behavior (is it?) and have
>> submitted a bug report (with example code/wsdl):
>> https://issues.apache.org/jira/browse/CXF-502
>>
>> At this point, this is a stopper for me porting my service from XFire
>> to CXF.  Once the bug is resolved, I'll give it another shot.
>>
>> Thanks,
>> Chris
>>
>> -----Original Message-----
>> From: James Mao [mailto:james.mao@iona.com]
>> Sent: Thursday, March 29, 2007 10:05 AM
>> To: cxf-user@incubator.apache.org
>> Subject: Re: Wsdl2Java Generating BARE not WRAPPED
>>
>> Hi Chris,
>>
>> I suggest you open the validate option, to check if there is any
>> errors/warnings during processing.
>> And also you can try the JAXWS RI, and see if generated as you
>> expected. The last option, also the quickest option is fire an issue
>> on [1] , attach your wsdl.
>>
>> [1] https://issues.apache.org/jira/browse/CXF
>>
>> Thanks,
>> James.
>>
>>     
>>> I'm using the Maven 2 plugin for executing Wsdl2Java.  Although my
>>>       
>> WSDL
>>
>>     
>>> is in doc/literal wrapped style, the generated code specifies
>>> SOAPBinding.ParameterStyle.BARE.  And the style of the generated
>>>       
>> methods
>>
>>     
>>> is also bare-for example:
>>>
>>>
>>>
>>>     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
>>>
>>>     @WebResult(targetNamespace = "http://mycompany.com/ws", partName
>>> = "body", name = "MyOperationResponse")
>>>
>>>     @WebMethod(operationName = "MyOperation")
>>>
>>>     public com.mycompany.ws.MyOperationResponseType myOperation(
>>>
>>>         @WebParam(targetNamespace = "http://mycompany.com/ws",
>>>       
>> partName
>>
>>     
>>> = "body", name = "MyOperation")
>>>
>>>         com.mycompany.ws.MyOperationType body
>>>
>>>     );
>>>
>>>
>>>
>>> If I run the same WSDL through the XFire 1.2.5 generator, it
>>> correctly identifies it as doc/literal wrapped and generates code in
>>> that style. So I suspect my WSDL is correct.
>>>
>>>
>>>
>>> I didn't see any open issues regarding this-is anyone else having
>>> problems with it?  Any suggestions for things I might try?  Any
>>>       
>> gotchas
>>
>>     
>>> between how XFire identifies wrapped style and how CXF identifies
>>> it?
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Chris
>>>       
>
>   


RE: Wsdl2Java Generating BARE not WRAPPED

Posted by Christopher Moesel <Ch...@avid.com>.
Ooooh...  Yeah, xsd:any would probably be considered a wildcard in this
case.  So no wildcards and no substitution groups...  That makes writing
a wrapped style service with extensible schemas pretty difficult,
doesn't it?

I haven't seen this restriction on the wrapped style before-- does
anyone know if this is a rule in general for wrapped style, or if it's
just a JAX-WS thing?

Thanks,
Chris

-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org] 
Sent: Thursday, March 29, 2007 3:32 PM
To: cxf-user@incubator.apache.org
Subject: Re: Wsdl2Java Generating BARE not WRAPPED


Honestly, I'm not sure if the spec would allow us to change this.   The 
JAX-WS spec specifically says:

"The wrapper elements only contain child elements, they must not contain

other structures such as wildcards (element or attribute), xsd:choice, 
substitution groups (element references are not per-mitted) or 
attributes; furthermore, they must not be nillable."

I'm not sure if an "xsd:any" would be considered a "chile element".


Dan


On Thursday 29 March 2007 12:56, Christopher Moesel wrote:
> After some investigation (commenting out and uncommenting out sections
> of WSDL)-- I've determined the cause of the problem.
>
> If a doc/literal wrapped WSDL uses xsd:any in the wrapped request or
> response type, then the WSDL2Java tool will generate the interface
> with style SOAPBinding.ParameterStyle.BARE.
>
> I don't believe this is the intended behavior (is it?) and have
> submitted a bug report (with example code/wsdl):
> https://issues.apache.org/jira/browse/CXF-502
>
> At this point, this is a stopper for me porting my service from XFire
> to CXF.  Once the bug is resolved, I'll give it another shot.
>
> Thanks,
> Chris
>
> -----Original Message-----
> From: James Mao [mailto:james.mao@iona.com]
> Sent: Thursday, March 29, 2007 10:05 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: Wsdl2Java Generating BARE not WRAPPED
>
> Hi Chris,
>
> I suggest you open the validate option, to check if there is any
> errors/warnings during processing.
> And also you can try the JAXWS RI, and see if generated as you
> expected. The last option, also the quickest option is fire an issue
> on [1] , attach your wsdl.
>
> [1] https://issues.apache.org/jira/browse/CXF
>
> Thanks,
> James.
>
> > I'm using the Maven 2 plugin for executing Wsdl2Java.  Although my
>
> WSDL
>
> > is in doc/literal wrapped style, the generated code specifies
> > SOAPBinding.ParameterStyle.BARE.  And the style of the generated
>
> methods
>
> > is also bare-for example:
> >
> >
> >
> >     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> >
> >     @WebResult(targetNamespace = "http://mycompany.com/ws", partName
> > = "body", name = "MyOperationResponse")
> >
> >     @WebMethod(operationName = "MyOperation")
> >
> >     public com.mycompany.ws.MyOperationResponseType myOperation(
> >
> >         @WebParam(targetNamespace = "http://mycompany.com/ws",
>
> partName
>
> > = "body", name = "MyOperation")
> >
> >         com.mycompany.ws.MyOperationType body
> >
> >     );
> >
> >
> >
> > If I run the same WSDL through the XFire 1.2.5 generator, it
> > correctly identifies it as doc/literal wrapped and generates code in
> > that style. So I suspect my WSDL is correct.
> >
> >
> >
> > I didn't see any open issues regarding this-is anyone else having
> > problems with it?  Any suggestions for things I might try?  Any
>
> gotchas
>
> > between how XFire identifies wrapped style and how CXF identifies
> > it?
> >
> >
> >
> > Thanks,
> >
> > Chris

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Re: Wsdl2Java Generating BARE not WRAPPED

Posted by Daniel Kulp <dk...@apache.org>.
Honestly, I'm not sure if the spec would allow us to change this.   The 
JAX-WS spec specifically says:

"The wrapper elements only contain child elements, they must not contain 
other structures such as wildcards (element or attribute), xsd:choice, 
substitution groups (element references are not per-mitted) or 
attributes; furthermore, they must not be nillable."

I'm not sure if an "xsd:any" would be considered a "chile element".


Dan


On Thursday 29 March 2007 12:56, Christopher Moesel wrote:
> After some investigation (commenting out and uncommenting out sections
> of WSDL)-- I've determined the cause of the problem.
>
> If a doc/literal wrapped WSDL uses xsd:any in the wrapped request or
> response type, then the WSDL2Java tool will generate the interface
> with style SOAPBinding.ParameterStyle.BARE.
>
> I don't believe this is the intended behavior (is it?) and have
> submitted a bug report (with example code/wsdl):
> https://issues.apache.org/jira/browse/CXF-502
>
> At this point, this is a stopper for me porting my service from XFire
> to CXF.  Once the bug is resolved, I'll give it another shot.
>
> Thanks,
> Chris
>
> -----Original Message-----
> From: James Mao [mailto:james.mao@iona.com]
> Sent: Thursday, March 29, 2007 10:05 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: Wsdl2Java Generating BARE not WRAPPED
>
> Hi Chris,
>
> I suggest you open the validate option, to check if there is any
> errors/warnings during processing.
> And also you can try the JAXWS RI, and see if generated as you
> expected. The last option, also the quickest option is fire an issue
> on [1] , attach your wsdl.
>
> [1] https://issues.apache.org/jira/browse/CXF
>
> Thanks,
> James.
>
> > I'm using the Maven 2 plugin for executing Wsdl2Java.  Although my
>
> WSDL
>
> > is in doc/literal wrapped style, the generated code specifies
> > SOAPBinding.ParameterStyle.BARE.  And the style of the generated
>
> methods
>
> > is also bare-for example:
> >
> >
> >
> >     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> >
> >     @WebResult(targetNamespace = "http://mycompany.com/ws", partName
> > = "body", name = "MyOperationResponse")
> >
> >     @WebMethod(operationName = "MyOperation")
> >
> >     public com.mycompany.ws.MyOperationResponseType myOperation(
> >
> >         @WebParam(targetNamespace = "http://mycompany.com/ws",
>
> partName
>
> > = "body", name = "MyOperation")
> >
> >         com.mycompany.ws.MyOperationType body
> >
> >     );
> >
> >
> >
> > If I run the same WSDL through the XFire 1.2.5 generator, it
> > correctly identifies it as doc/literal wrapped and generates code in
> > that style. So I suspect my WSDL is correct.
> >
> >
> >
> > I didn't see any open issues regarding this-is anyone else having
> > problems with it?  Any suggestions for things I might try?  Any
>
> gotchas
>
> > between how XFire identifies wrapped style and how CXF identifies
> > it?
> >
> >
> >
> > Thanks,
> >
> > Chris

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

RE: Wsdl2Java Generating BARE not WRAPPED

Posted by Christopher Moesel <Ch...@avid.com>.
After some investigation (commenting out and uncommenting out sections
of WSDL)-- I've determined the cause of the problem.

If a doc/literal wrapped WSDL uses xsd:any in the wrapped request or
response type, then the WSDL2Java tool will generate the interface with
style SOAPBinding.ParameterStyle.BARE.

I don't believe this is the intended behavior (is it?) and have
submitted a bug report (with example code/wsdl):
https://issues.apache.org/jira/browse/CXF-502

At this point, this is a stopper for me porting my service from XFire to
CXF.  Once the bug is resolved, I'll give it another shot.

Thanks,
Chris

-----Original Message-----
From: James Mao [mailto:james.mao@iona.com] 
Sent: Thursday, March 29, 2007 10:05 AM
To: cxf-user@incubator.apache.org
Subject: Re: Wsdl2Java Generating BARE not WRAPPED

Hi Chris,

I suggest you open the validate option, to check if there is any 
errors/warnings during processing.
And also you can try the JAXWS RI, and see if generated as you expected.
The last option, also the quickest option is fire an issue on [1] , 
attach your wsdl.

[1] https://issues.apache.org/jira/browse/CXF

Thanks,
James.
> I'm using the Maven 2 plugin for executing Wsdl2Java.  Although my
WSDL
> is in doc/literal wrapped style, the generated code specifies
> SOAPBinding.ParameterStyle.BARE.  And the style of the generated
methods
> is also bare-for example:
>
>  
>
>     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
>
>     @WebResult(targetNamespace = "http://mycompany.com/ws", partName =
> "body", name = "MyOperationResponse")
>
>     @WebMethod(operationName = "MyOperation")
>
>     public com.mycompany.ws.MyOperationResponseType myOperation(
>
>         @WebParam(targetNamespace = "http://mycompany.com/ws",
partName
> = "body", name = "MyOperation")
>
>         com.mycompany.ws.MyOperationType body
>
>     );
>
>  
>
> If I run the same WSDL through the XFire 1.2.5 generator, it correctly
> identifies it as doc/literal wrapped and generates code in that style.
> So I suspect my WSDL is correct.
>
>  
>
> I didn't see any open issues regarding this-is anyone else having
> problems with it?  Any suggestions for things I might try?  Any
gotchas
> between how XFire identifies wrapped style and how CXF identifies it?
>
>  
>
> Thanks,
>
> Chris
>
>  
>
>  
>
>
>   


Re: Wsdl2Java Generating BARE not WRAPPED

Posted by James Mao <ja...@iona.com>.
Hi Chris,

I suggest you open the validate option, to check if there is any 
errors/warnings during processing.
And also you can try the JAXWS RI, and see if generated as you expected.
The last option, also the quickest option is fire an issue on [1] , 
attach your wsdl.

[1] https://issues.apache.org/jira/browse/CXF

Thanks,
James.
> I'm using the Maven 2 plugin for executing Wsdl2Java.  Although my WSDL
> is in doc/literal wrapped style, the generated code specifies
> SOAPBinding.ParameterStyle.BARE.  And the style of the generated methods
> is also bare-for example:
>
>  
>
>     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
>
>     @WebResult(targetNamespace = "http://mycompany.com/ws", partName =
> "body", name = "MyOperationResponse")
>
>     @WebMethod(operationName = "MyOperation")
>
>     public com.mycompany.ws.MyOperationResponseType myOperation(
>
>         @WebParam(targetNamespace = "http://mycompany.com/ws", partName
> = "body", name = "MyOperation")
>
>         com.mycompany.ws.MyOperationType body
>
>     );
>
>  
>
> If I run the same WSDL through the XFire 1.2.5 generator, it correctly
> identifies it as doc/literal wrapped and generates code in that style.
> So I suspect my WSDL is correct.
>
>  
>
> I didn't see any open issues regarding this-is anyone else having
> problems with it?  Any suggestions for things I might try?  Any gotchas
> between how XFire identifies wrapped style and how CXF identifies it?
>
>  
>
> Thanks,
>
> Chris
>
>  
>
>  
>
>
>