You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Alexey Zavizionov <al...@gmail.com> on 2008/10/07 17:07:20 UTC
Incorrect code generation?
Hello, list!
I am in migration process to CXF from AXIS1 (v.1.4).
Let me explain my situation.
I have a WSRP service. There are several wsdl files for generating sources:
wsrp-service.wsdl
---------------------------------------------------
<import namespace="urn:oasis:names:tc:wsrp:v2:bind"
location="wsrp-2.0-bindings.wsdl"/>
<wsdl:service name="WSRPService">
<wsdl:port binding="v2bind:WSRP_v2_Markup_Binding_SOAP"
name="WSRP_v2_Markup_Service">
<soap:address location="http://my.service:8082/WSRPService"/>
</wsdl:port>
...
---------------------------------------------------
wsrp-2.0-bindings.wsdl
---------------------------------------------------
<import namespace="urn:oasis:names:tc:wsrp:v2:intf"
location="wsrp-2.0-interfaces.wsdl"/>
<wsdl:binding name="WSRP_v2_Markup_Binding_SOAP"
type="intf:WSRP_v2_Markup_PortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getMarkup">
<soap:operation soapAction="urn:oasis:names:tc:wsrp:v2:getMarkup"/>
<wsdl:input name="getMarkup">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getMarkupResponse">
<soap:body use="literal"/>
</wsdl:output>
...
---------------------------------------------------
wsrp-2.0-interfaces.wsdl
---------------------------------------------------
<import namespace="urn:oasis:names:tc:wsrp:v2:types"
schemaLocation="wsrp-2.0-types.xsd"
<wsdl:portType name="WSRP_v2_Markup_PortType">
<wsdl:operation name="getMarkup">
<wsdl:input message="intf:getMarkup" name="getMarkup"/>
<wsdl:output message="intf:getMarkupResponse" name="getMarkupResponse"/>
...
---------------------------------------------------
WSDL2Java results:
AXIS generation result:
WSRP_v2_Markup_PortType.java
MarkupResponse getMarkup(org.exoplatform.services.wsrp2.type.GetMarkup...
WSRP_v2_Markup_Binding_SOAPImpl (implements WSRP_v2_Markup_PortType)
WSRP_v2_Markup_Binding_SOAPStub.java (implements WSRP_v2_Markup_PortType)
CXF generation result:
WSRPV2MarkupPortType.java
void getMarkup(org.exoplatform.services.wsrp2.type.RegistrationContext
registrationContext...
WSRPV2MarkupPortTypeImpl (implements WSRPV2MarkupPortType)
WSRPV2MarkupPortType_WSRPMarkupService_Client.java
WSRPV2MarkupPortType_WSRPMarkupService_Server.java
Why is WSRPV2MarkupPortType (CXF generation) not similar to
WSRP_v2_Markup_PortType (AXIS generation)
Thanks and regards,
Alexey
Re: Incorrect code generation?
Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 25 November 2008 10:13:30 am Alexey Zavizionov wrote:
> Ok, the fist solution works
>
> ====================
> A: Create an external binding file and set the value of
> <enableWrapperStyle/> to true or false as desired:
> <jaxws:bindings
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> wsdlLocation="your.wsdl"
> xmlns="http://java.sun.com/xml/ns/jaxws"
> xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
> <enableWrapperStyle>false</enableWrapperStyle>
> </jaxws:bindings>
> ===================
>
> Will it conflict with JAX-WS spec (JSR 224) in this case?
Nope. This behavior is specifically defined in the JAX-WS Spec.
Dan
>
> Regards,
> Alexey
>
> --
> Alexey Zavizionov
> eXo Platform SAS
>
> On Mon, Nov 24, 2008 at 7:31 PM, Alexey Zavizionov
>
> <al...@gmail.com> wrote:
> > Hello, it's me again
> >
> > For me doesn't work non-wrapper style.
> >
> > "non-wrapper style means that a single Java object containing all the
> > data elements serves as the lone parameter to the web service method
> > call."
> >
> > at http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
> > ===============
> > Alternatively you can embed this instruction within the WSDL file
> > directly, as the immediate child of the wsdl:portType:
> >
> > <wsdl:portType name="MyWebServicePortType">
> > <jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
> > <enableWrapperStyle>false</enableWrapperStyle>
> > ... other binding settings if needed ...
> > </jaxws:bindings>
> > <wsdl:operation name="sayHello">
> > ...
> > </wsdl:portType>
> >
> > ===============
> >
> > On Wed, Oct 8, 2008 at 5:55 PM, Daniel Kulp <dk...@apache.org> wrote:
> >> On Wednesday 08 October 2008, Alexey Zavizionov wrote:
> >>> Thanks for the replies.
> >>> I have to do more code refactoring than I thought before.
> >>
> >> And thats why, when looking at products that solve your immediate needs,
> >> it's a good idea to select products that implement standards instead of
> >> locking you into proprietary API's and mappings. In the future, if
> >> needs change, switching to another provider that implements the same
> >> standard becomes a lot easier.
> >>
> >> :-)
> >>
> >> Dan
> >>
> >>> Regards,
> >>> Alexey.
> >>>
> >>> On Wed, Oct 8, 2008 at 6:23 PM, Daniel Kulp <dk...@apache.org> wrote:
> >>> > On Wednesday 08 October 2008, Alexey Zavizionov wrote:
> >>> >> Thanks fo the replies!
> >>> >> I understood. I will use default ("wrapper-style") behaviour.
> >>> >>
> >>> >> One more question:
> >>> >> why generated port type's names without the underline sign?
> >>> >
> >>> > Again, per spec. JAXWS generally maps _ to a word separator that
> >>> > results in the next letter being capitalized.
> >>> >
> >>> > That said, section 8 of the JAX-WS spec does provide more
> >>> > customization things to put into the customization binding file to
> >>> > control that and remap it into something else if you don't like it.
> >>> >
> >>> > Dan
> >>> >
> >>> >> Regards,
> >>> >> Alexey.
> >>> >>
> >>> >> On Tue, Oct 7, 2008 at 9:14 PM, Glen Mazza <gl...@gmail.com>
> >>> >
> >>> > wrote:
> >>> >> > See the bottom of this page for more details:
> >>> >> > http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
> >>> >> >
> >>> >> > Glen
> >>> >> >
> >>> >> > dkulp wrote:
> >>> >> >> The CXF generated code is correct per jaxws spec. If the
> >>> >> >> operation looks like it's in a "wrapped" doc literal form, we
> >>> >> >> unwrap the elements into individual parameters. Section
> >>> >> >> 2.3.1.2 of the JAX-WS spec defines the rules for when an
> >>> >> >> operation is considered wrapped so it gets unwrapped.
> >>> >> >>
> >>> >> >> That said, JAX-WS also provides a binding customization to force
> >>> >> >> it to non-unwrap in which case the method will look more like
> >>> >> >> the Axis 1 version. Create a file with the contents:
> >>> >> >>
> >>> >> >> <jaxws:bindings
> >>> >> >> wsdlLocation="hello_world.wsdl"
> >>> >> >> xmlns="http://java.sun.com/xml/ns/jaxws">
> >>> >> >>
> >>> >> >> <enableWrapperStyle>false</enableWrapperStyle>
> >>> >> >>
> >>> >> >> </jaxws:bindings>
> >>> >> >>
> >>> >> >> (update the wsdlLocation attribute) and pass that into wsdl2java
> >>> >> >> with the -b flag. That should turn off the unwrapping and
> >>> >> >> produce code closer to what you expect.
> >>> >> >>
> >>> >> >>
> >>> >> >> Dan
> >>> >> >>
> >>> >> >> On Tuesday 07 October 2008, Alexey Zavizionov wrote:
> >>> >> >>> Hello, list!
> >>> >> >>>
> >>> >> >>> I am in migration process to CXF from AXIS1 (v.1.4).
> >>> >> >>> Let me explain my situation.
> >>> >> >>>
> >>> >> >>> I have a WSRP service. There are several wsdl files for
> >>> >> >>> generating sources:
> >>> >> >>>
> >>> >> >>> wsrp-service.wsdl
> >>> >> >>>
> >>> >> >>> ---------------------------------------------------
> >>> >> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:bind"
> >>> >> >>> location="wsrp-2.0-bindings.wsdl"/>
> >>> >> >>>
> >>> >> >>> <wsdl:service name="WSRPService">
> >>> >> >>> <wsdl:port binding="v2bind:WSRP_v2_Markup_Binding_SOAP"
> >>> >> >>> name="WSRP_v2_Markup_Service">
> >>> >> >>> <soap:address
> >>> >> >>> location="http://my.service:8082/WSRPService"/> </wsdl:port>
> >>> >> >>> ...
> >>> >> >>> ---------------------------------------------------
> >>> >> >>>
> >>> >> >>> wsrp-2.0-bindings.wsdl
> >>> >> >>>
> >>> >> >>> ---------------------------------------------------
> >>> >> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:intf"
> >>> >> >>> location="wsrp-2.0-interfaces.wsdl"/>
> >>> >> >>>
> >>> >> >>> <wsdl:binding name="WSRP_v2_Markup_Binding_SOAP"
> >>> >> >>> type="intf:WSRP_v2_Markup_PortType">
> >>> >> >>> <soap:binding style="document"
> >>> >> >>> transport="http://schemas.xmlsoap.org/soap/http"/>
> >>> >> >>> <wsdl:operation name="getMarkup">
> >>> >> >>> <soap:operation
> >>> >> >>> soapAction="urn:oasis:names:tc:wsrp:v2:getMarkup"/> <wsdl:input
> >>> >> >>> name="getMarkup">
> >>> >> >>> <soap:body use="literal"/>
> >>> >> >>> </wsdl:input>
> >>> >> >>> <wsdl:output name="getMarkupResponse">
> >>> >> >>> <soap:body use="literal"/>
> >>> >> >>> </wsdl:output>
> >>> >> >>> ...
> >>> >> >>> ---------------------------------------------------
> >>> >> >>>
> >>> >> >>>
> >>> >> >>> wsrp-2.0-interfaces.wsdl
> >>> >> >>> ---------------------------------------------------
> >>> >> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:types"
> >>> >> >>> schemaLocation="wsrp-2.0-types.xsd"
> >>> >> >>>
> >>> >> >>> <wsdl:portType name="WSRP_v2_Markup_PortType">
> >>> >> >>> <wsdl:operation name="getMarkup">
> >>> >> >>> <wsdl:input message="intf:getMarkup"
> >>> >> >>> name="getMarkup"/> <wsdl:output
> >>> >> >>> message="intf:getMarkupResponse" name="getMarkupResponse"/> ...
> >>> >> >>> ---------------------------------------------------
> >>> >> >>>
> >>> >> >>>
> >>> >> >>> WSDL2Java results:
> >>> >> >>>
> >>> >> >>> AXIS generation result:
> >>> >> >>> WSRP_v2_Markup_PortType.java
> >>> >> >>> MarkupResponse
> >>> >> >>> getMarkup(org.exoplatform.services.wsrp2.type.GetMarkup...
> >>> >> >>> WSRP_v2_Markup_Binding_SOAPImpl (implements
> >>> >> >>> WSRP_v2_Markup_PortType) WSRP_v2_Markup_Binding_SOAPStub.java
> >>> >> >>> (implements
> >>> >> >>> WSRP_v2_Markup_PortType)
> >>> >> >>>
> >>> >> >>>
> >>> >> >>> CXF generation result:
> >>> >> >>> WSRPV2MarkupPortType.java
> >>> >> >>> void
> >>> >> >>> getMarkup(org.exoplatform.services.wsrp2.type.RegistrationConte
> >>> >> >>>xt registrationContext...
> >>> >> >>> WSRPV2MarkupPortTypeImpl (implements WSRPV2MarkupPortType)
> >>> >> >>> WSRPV2MarkupPortType_WSRPMarkupService_Client.java
> >>> >> >>> WSRPV2MarkupPortType_WSRPMarkupService_Server.java
> >>> >> >>>
> >>> >> >>> Why is WSRPV2MarkupPortType (CXF generation) not similar to
> >>> >> >>> WSRP_v2_Markup_PortType (AXIS generation)
> >>> >> >>>
> >>> >> >>> Thanks and regards,
> >>> >> >>> Alexey
> >>> >> >>
> >>> >> >> --
> >>> >> >> J. Daniel Kulp
> >>> >> >> dkulp@apache.org
> >>> >> >> http://www.dankulp.com/blog
> >>> >> >
> >>> >> > --
> >>> >> > View this message in context:
> >>> >> > http://www.nabble.com/Incorrect-code-generation--tp19860324p19864
> >>> >> >113 .html Sent from the cxf-user mailing list archive at
> >>> >> > Nabble.com.
> >>> >
> >>> > --
> >>> > J. Daniel Kulp
> >>> > dkulp@apache.org
> >>> > http://www.dankulp.com/blog
> >>
> >> --
> >> J. Daniel Kulp
> >> dkulp@apache.org
> >> http://www.dankulp.com/blog
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Re: Incorrect code generation?
Posted by Alexey Zavizionov <al...@gmail.com>.
Ok, the fist solution works
====================
A: Create an external binding file and set the value of
<enableWrapperStyle/> to true or false as desired:
<jaxws:bindings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
wsdlLocation="your.wsdl"
xmlns="http://java.sun.com/xml/ns/jaxws"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
<enableWrapperStyle>false</enableWrapperStyle>
</jaxws:bindings>
===================
Will it conflict with JAX-WS spec (JSR 224) in this case?
Regards,
Alexey
--
Alexey Zavizionov
eXo Platform SAS
On Mon, Nov 24, 2008 at 7:31 PM, Alexey Zavizionov
<al...@gmail.com> wrote:
> Hello, it's me again
>
> For me doesn't work non-wrapper style.
>
> "non-wrapper style means that a single Java object containing all the
> data elements serves as the lone parameter to the web service method
> call."
>
> at http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
> ===============
> Alternatively you can embed this instruction within the WSDL file
> directly, as the immediate child of the wsdl:portType:
>
> <wsdl:portType name="MyWebServicePortType">
> <jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
> <enableWrapperStyle>false</enableWrapperStyle>
> ... other binding settings if needed ...
> </jaxws:bindings>
> <wsdl:operation name="sayHello">
> ...
> </wsdl:portType>
>
> ===============
>
> On Wed, Oct 8, 2008 at 5:55 PM, Daniel Kulp <dk...@apache.org> wrote:
>> On Wednesday 08 October 2008, Alexey Zavizionov wrote:
>>> Thanks for the replies.
>>> I have to do more code refactoring than I thought before.
>>
>> And thats why, when looking at products that solve your immediate needs,
>> it's a good idea to select products that implement standards instead of
>> locking you into proprietary API's and mappings. In the future, if
>> needs change, switching to another provider that implements the same
>> standard becomes a lot easier.
>>
>> :-)
>>
>> Dan
>>
>>
>>>
>>> Regards,
>>> Alexey.
>>>
>>> On Wed, Oct 8, 2008 at 6:23 PM, Daniel Kulp <dk...@apache.org> wrote:
>>> > On Wednesday 08 October 2008, Alexey Zavizionov wrote:
>>> >> Thanks fo the replies!
>>> >> I understood. I will use default ("wrapper-style") behaviour.
>>> >>
>>> >> One more question:
>>> >> why generated port type's names without the underline sign?
>>> >
>>> > Again, per spec. JAXWS generally maps _ to a word separator that
>>> > results in the next letter being capitalized.
>>> >
>>> > That said, section 8 of the JAX-WS spec does provide more
>>> > customization things to put into the customization binding file to
>>> > control that and remap it into something else if you don't like it.
>>> >
>>> > Dan
>>> >
>>> >> Regards,
>>> >> Alexey.
>>> >>
>>> >> On Tue, Oct 7, 2008 at 9:14 PM, Glen Mazza <gl...@gmail.com>
>>> >
>>> > wrote:
>>> >> > See the bottom of this page for more details:
>>> >> > http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
>>> >> >
>>> >> > Glen
>>> >> >
>>> >> > dkulp wrote:
>>> >> >> The CXF generated code is correct per jaxws spec. If the
>>> >> >> operation looks like it's in a "wrapped" doc literal form, we
>>> >> >> unwrap the elements into individual parameters. Section
>>> >> >> 2.3.1.2 of the JAX-WS spec defines the rules for when an
>>> >> >> operation is considered wrapped so it gets unwrapped.
>>> >> >>
>>> >> >> That said, JAX-WS also provides a binding customization to force
>>> >> >> it to non-unwrap in which case the method will look more like
>>> >> >> the Axis 1 version. Create a file with the contents:
>>> >> >>
>>> >> >> <jaxws:bindings
>>> >> >> wsdlLocation="hello_world.wsdl"
>>> >> >> xmlns="http://java.sun.com/xml/ns/jaxws">
>>> >> >>
>>> >> >> <enableWrapperStyle>false</enableWrapperStyle>
>>> >> >>
>>> >> >> </jaxws:bindings>
>>> >> >>
>>> >> >> (update the wsdlLocation attribute) and pass that into wsdl2java
>>> >> >> with the -b flag. That should turn off the unwrapping and
>>> >> >> produce code closer to what you expect.
>>> >> >>
>>> >> >>
>>> >> >> Dan
>>> >> >>
>>> >> >> On Tuesday 07 October 2008, Alexey Zavizionov wrote:
>>> >> >>> Hello, list!
>>> >> >>>
>>> >> >>> I am in migration process to CXF from AXIS1 (v.1.4).
>>> >> >>> Let me explain my situation.
>>> >> >>>
>>> >> >>> I have a WSRP service. There are several wsdl files for
>>> >> >>> generating sources:
>>> >> >>>
>>> >> >>> wsrp-service.wsdl
>>> >> >>>
>>> >> >>> ---------------------------------------------------
>>> >> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:bind"
>>> >> >>> location="wsrp-2.0-bindings.wsdl"/>
>>> >> >>>
>>> >> >>> <wsdl:service name="WSRPService">
>>> >> >>> <wsdl:port binding="v2bind:WSRP_v2_Markup_Binding_SOAP"
>>> >> >>> name="WSRP_v2_Markup_Service">
>>> >> >>> <soap:address
>>> >> >>> location="http://my.service:8082/WSRPService"/> </wsdl:port>
>>> >> >>> ...
>>> >> >>> ---------------------------------------------------
>>> >> >>>
>>> >> >>> wsrp-2.0-bindings.wsdl
>>> >> >>>
>>> >> >>> ---------------------------------------------------
>>> >> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:intf"
>>> >> >>> location="wsrp-2.0-interfaces.wsdl"/>
>>> >> >>>
>>> >> >>> <wsdl:binding name="WSRP_v2_Markup_Binding_SOAP"
>>> >> >>> type="intf:WSRP_v2_Markup_PortType">
>>> >> >>> <soap:binding style="document"
>>> >> >>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>> >> >>> <wsdl:operation name="getMarkup">
>>> >> >>> <soap:operation
>>> >> >>> soapAction="urn:oasis:names:tc:wsrp:v2:getMarkup"/> <wsdl:input
>>> >> >>> name="getMarkup">
>>> >> >>> <soap:body use="literal"/>
>>> >> >>> </wsdl:input>
>>> >> >>> <wsdl:output name="getMarkupResponse">
>>> >> >>> <soap:body use="literal"/>
>>> >> >>> </wsdl:output>
>>> >> >>> ...
>>> >> >>> ---------------------------------------------------
>>> >> >>>
>>> >> >>>
>>> >> >>> wsrp-2.0-interfaces.wsdl
>>> >> >>> ---------------------------------------------------
>>> >> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:types"
>>> >> >>> schemaLocation="wsrp-2.0-types.xsd"
>>> >> >>>
>>> >> >>> <wsdl:portType name="WSRP_v2_Markup_PortType">
>>> >> >>> <wsdl:operation name="getMarkup">
>>> >> >>> <wsdl:input message="intf:getMarkup"
>>> >> >>> name="getMarkup"/> <wsdl:output
>>> >> >>> message="intf:getMarkupResponse" name="getMarkupResponse"/> ...
>>> >> >>> ---------------------------------------------------
>>> >> >>>
>>> >> >>>
>>> >> >>> WSDL2Java results:
>>> >> >>>
>>> >> >>> AXIS generation result:
>>> >> >>> WSRP_v2_Markup_PortType.java
>>> >> >>> MarkupResponse
>>> >> >>> getMarkup(org.exoplatform.services.wsrp2.type.GetMarkup...
>>> >> >>> WSRP_v2_Markup_Binding_SOAPImpl (implements
>>> >> >>> WSRP_v2_Markup_PortType) WSRP_v2_Markup_Binding_SOAPStub.java
>>> >> >>> (implements
>>> >> >>> WSRP_v2_Markup_PortType)
>>> >> >>>
>>> >> >>>
>>> >> >>> CXF generation result:
>>> >> >>> WSRPV2MarkupPortType.java
>>> >> >>> void
>>> >> >>> getMarkup(org.exoplatform.services.wsrp2.type.RegistrationConte
>>> >> >>>xt registrationContext...
>>> >> >>> WSRPV2MarkupPortTypeImpl (implements WSRPV2MarkupPortType)
>>> >> >>> WSRPV2MarkupPortType_WSRPMarkupService_Client.java
>>> >> >>> WSRPV2MarkupPortType_WSRPMarkupService_Server.java
>>> >> >>>
>>> >> >>> Why is WSRPV2MarkupPortType (CXF generation) not similar to
>>> >> >>> WSRP_v2_Markup_PortType (AXIS generation)
>>> >> >>>
>>> >> >>> Thanks and regards,
>>> >> >>> Alexey
>>> >> >>
>>> >> >> --
>>> >> >> J. Daniel Kulp
>>> >> >> dkulp@apache.org
>>> >> >> http://www.dankulp.com/blog
>>> >> >
>>> >> > --
>>> >> > View this message in context:
>>> >> > http://www.nabble.com/Incorrect-code-generation--tp19860324p19864
>>> >> >113 .html Sent from the cxf-user mailing list archive at
>>> >> > Nabble.com.
>>> >
>>> > --
>>> > J. Daniel Kulp
>>> > dkulp@apache.org
>>> > http://www.dankulp.com/blog
>>
>>
>>
>> --
>> J. Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>
Re: Incorrect code generation?
Posted by Alexey Zavizionov <al...@gmail.com>.
Hello, it's me again
For me doesn't work non-wrapper style.
"non-wrapper style means that a single Java object containing all the
data elements serves as the lone parameter to the web service method
call."
at http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
===============
Alternatively you can embed this instruction within the WSDL file
directly, as the immediate child of the wsdl:portType:
<wsdl:portType name="MyWebServicePortType">
<jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
<enableWrapperStyle>false</enableWrapperStyle>
... other binding settings if needed ...
</jaxws:bindings>
<wsdl:operation name="sayHello">
...
</wsdl:portType>
===============
On Wed, Oct 8, 2008 at 5:55 PM, Daniel Kulp <dk...@apache.org> wrote:
> On Wednesday 08 October 2008, Alexey Zavizionov wrote:
>> Thanks for the replies.
>> I have to do more code refactoring than I thought before.
>
> And thats why, when looking at products that solve your immediate needs,
> it's a good idea to select products that implement standards instead of
> locking you into proprietary API's and mappings. In the future, if
> needs change, switching to another provider that implements the same
> standard becomes a lot easier.
>
> :-)
>
> Dan
>
>
>>
>> Regards,
>> Alexey.
>>
>> On Wed, Oct 8, 2008 at 6:23 PM, Daniel Kulp <dk...@apache.org> wrote:
>> > On Wednesday 08 October 2008, Alexey Zavizionov wrote:
>> >> Thanks fo the replies!
>> >> I understood. I will use default ("wrapper-style") behaviour.
>> >>
>> >> One more question:
>> >> why generated port type's names without the underline sign?
>> >
>> > Again, per spec. JAXWS generally maps _ to a word separator that
>> > results in the next letter being capitalized.
>> >
>> > That said, section 8 of the JAX-WS spec does provide more
>> > customization things to put into the customization binding file to
>> > control that and remap it into something else if you don't like it.
>> >
>> > Dan
>> >
>> >> Regards,
>> >> Alexey.
>> >>
>> >> On Tue, Oct 7, 2008 at 9:14 PM, Glen Mazza <gl...@gmail.com>
>> >
>> > wrote:
>> >> > See the bottom of this page for more details:
>> >> > http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
>> >> >
>> >> > Glen
>> >> >
>> >> > dkulp wrote:
>> >> >> The CXF generated code is correct per jaxws spec. If the
>> >> >> operation looks like it's in a "wrapped" doc literal form, we
>> >> >> unwrap the elements into individual parameters. Section
>> >> >> 2.3.1.2 of the JAX-WS spec defines the rules for when an
>> >> >> operation is considered wrapped so it gets unwrapped.
>> >> >>
>> >> >> That said, JAX-WS also provides a binding customization to force
>> >> >> it to non-unwrap in which case the method will look more like
>> >> >> the Axis 1 version. Create a file with the contents:
>> >> >>
>> >> >> <jaxws:bindings
>> >> >> wsdlLocation="hello_world.wsdl"
>> >> >> xmlns="http://java.sun.com/xml/ns/jaxws">
>> >> >>
>> >> >> <enableWrapperStyle>false</enableWrapperStyle>
>> >> >>
>> >> >> </jaxws:bindings>
>> >> >>
>> >> >> (update the wsdlLocation attribute) and pass that into wsdl2java
>> >> >> with the -b flag. That should turn off the unwrapping and
>> >> >> produce code closer to what you expect.
>> >> >>
>> >> >>
>> >> >> Dan
>> >> >>
>> >> >> On Tuesday 07 October 2008, Alexey Zavizionov wrote:
>> >> >>> Hello, list!
>> >> >>>
>> >> >>> I am in migration process to CXF from AXIS1 (v.1.4).
>> >> >>> Let me explain my situation.
>> >> >>>
>> >> >>> I have a WSRP service. There are several wsdl files for
>> >> >>> generating sources:
>> >> >>>
>> >> >>> wsrp-service.wsdl
>> >> >>>
>> >> >>> ---------------------------------------------------
>> >> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:bind"
>> >> >>> location="wsrp-2.0-bindings.wsdl"/>
>> >> >>>
>> >> >>> <wsdl:service name="WSRPService">
>> >> >>> <wsdl:port binding="v2bind:WSRP_v2_Markup_Binding_SOAP"
>> >> >>> name="WSRP_v2_Markup_Service">
>> >> >>> <soap:address
>> >> >>> location="http://my.service:8082/WSRPService"/> </wsdl:port>
>> >> >>> ...
>> >> >>> ---------------------------------------------------
>> >> >>>
>> >> >>> wsrp-2.0-bindings.wsdl
>> >> >>>
>> >> >>> ---------------------------------------------------
>> >> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:intf"
>> >> >>> location="wsrp-2.0-interfaces.wsdl"/>
>> >> >>>
>> >> >>> <wsdl:binding name="WSRP_v2_Markup_Binding_SOAP"
>> >> >>> type="intf:WSRP_v2_Markup_PortType">
>> >> >>> <soap:binding style="document"
>> >> >>> transport="http://schemas.xmlsoap.org/soap/http"/>
>> >> >>> <wsdl:operation name="getMarkup">
>> >> >>> <soap:operation
>> >> >>> soapAction="urn:oasis:names:tc:wsrp:v2:getMarkup"/> <wsdl:input
>> >> >>> name="getMarkup">
>> >> >>> <soap:body use="literal"/>
>> >> >>> </wsdl:input>
>> >> >>> <wsdl:output name="getMarkupResponse">
>> >> >>> <soap:body use="literal"/>
>> >> >>> </wsdl:output>
>> >> >>> ...
>> >> >>> ---------------------------------------------------
>> >> >>>
>> >> >>>
>> >> >>> wsrp-2.0-interfaces.wsdl
>> >> >>> ---------------------------------------------------
>> >> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:types"
>> >> >>> schemaLocation="wsrp-2.0-types.xsd"
>> >> >>>
>> >> >>> <wsdl:portType name="WSRP_v2_Markup_PortType">
>> >> >>> <wsdl:operation name="getMarkup">
>> >> >>> <wsdl:input message="intf:getMarkup"
>> >> >>> name="getMarkup"/> <wsdl:output
>> >> >>> message="intf:getMarkupResponse" name="getMarkupResponse"/> ...
>> >> >>> ---------------------------------------------------
>> >> >>>
>> >> >>>
>> >> >>> WSDL2Java results:
>> >> >>>
>> >> >>> AXIS generation result:
>> >> >>> WSRP_v2_Markup_PortType.java
>> >> >>> MarkupResponse
>> >> >>> getMarkup(org.exoplatform.services.wsrp2.type.GetMarkup...
>> >> >>> WSRP_v2_Markup_Binding_SOAPImpl (implements
>> >> >>> WSRP_v2_Markup_PortType) WSRP_v2_Markup_Binding_SOAPStub.java
>> >> >>> (implements
>> >> >>> WSRP_v2_Markup_PortType)
>> >> >>>
>> >> >>>
>> >> >>> CXF generation result:
>> >> >>> WSRPV2MarkupPortType.java
>> >> >>> void
>> >> >>> getMarkup(org.exoplatform.services.wsrp2.type.RegistrationConte
>> >> >>>xt registrationContext...
>> >> >>> WSRPV2MarkupPortTypeImpl (implements WSRPV2MarkupPortType)
>> >> >>> WSRPV2MarkupPortType_WSRPMarkupService_Client.java
>> >> >>> WSRPV2MarkupPortType_WSRPMarkupService_Server.java
>> >> >>>
>> >> >>> Why is WSRPV2MarkupPortType (CXF generation) not similar to
>> >> >>> WSRP_v2_Markup_PortType (AXIS generation)
>> >> >>>
>> >> >>> Thanks and regards,
>> >> >>> Alexey
>> >> >>
>> >> >> --
>> >> >> J. Daniel Kulp
>> >> >> dkulp@apache.org
>> >> >> http://www.dankulp.com/blog
>> >> >
>> >> > --
>> >> > View this message in context:
>> >> > http://www.nabble.com/Incorrect-code-generation--tp19860324p19864
>> >> >113 .html Sent from the cxf-user mailing list archive at
>> >> > Nabble.com.
>> >
>> > --
>> > J. Daniel Kulp
>> > dkulp@apache.org
>> > http://www.dankulp.com/blog
>
>
>
> --
> J. Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
Re: Incorrect code generation?
Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 08 October 2008, Alexey Zavizionov wrote:
> Thanks for the replies.
> I have to do more code refactoring than I thought before.
And thats why, when looking at products that solve your immediate needs,
it's a good idea to select products that implement standards instead of
locking you into proprietary API's and mappings. In the future, if
needs change, switching to another provider that implements the same
standard becomes a lot easier.
:-)
Dan
>
> Regards,
> Alexey.
>
> On Wed, Oct 8, 2008 at 6:23 PM, Daniel Kulp <dk...@apache.org> wrote:
> > On Wednesday 08 October 2008, Alexey Zavizionov wrote:
> >> Thanks fo the replies!
> >> I understood. I will use default ("wrapper-style") behaviour.
> >>
> >> One more question:
> >> why generated port type's names without the underline sign?
> >
> > Again, per spec. JAXWS generally maps _ to a word separator that
> > results in the next letter being capitalized.
> >
> > That said, section 8 of the JAX-WS spec does provide more
> > customization things to put into the customization binding file to
> > control that and remap it into something else if you don't like it.
> >
> > Dan
> >
> >> Regards,
> >> Alexey.
> >>
> >> On Tue, Oct 7, 2008 at 9:14 PM, Glen Mazza <gl...@gmail.com>
> >
> > wrote:
> >> > See the bottom of this page for more details:
> >> > http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
> >> >
> >> > Glen
> >> >
> >> > dkulp wrote:
> >> >> The CXF generated code is correct per jaxws spec. If the
> >> >> operation looks like it's in a "wrapped" doc literal form, we
> >> >> unwrap the elements into individual parameters. Section
> >> >> 2.3.1.2 of the JAX-WS spec defines the rules for when an
> >> >> operation is considered wrapped so it gets unwrapped.
> >> >>
> >> >> That said, JAX-WS also provides a binding customization to force
> >> >> it to non-unwrap in which case the method will look more like
> >> >> the Axis 1 version. Create a file with the contents:
> >> >>
> >> >> <jaxws:bindings
> >> >> wsdlLocation="hello_world.wsdl"
> >> >> xmlns="http://java.sun.com/xml/ns/jaxws">
> >> >>
> >> >> <enableWrapperStyle>false</enableWrapperStyle>
> >> >>
> >> >> </jaxws:bindings>
> >> >>
> >> >> (update the wsdlLocation attribute) and pass that into wsdl2java
> >> >> with the -b flag. That should turn off the unwrapping and
> >> >> produce code closer to what you expect.
> >> >>
> >> >>
> >> >> Dan
> >> >>
> >> >> On Tuesday 07 October 2008, Alexey Zavizionov wrote:
> >> >>> Hello, list!
> >> >>>
> >> >>> I am in migration process to CXF from AXIS1 (v.1.4).
> >> >>> Let me explain my situation.
> >> >>>
> >> >>> I have a WSRP service. There are several wsdl files for
> >> >>> generating sources:
> >> >>>
> >> >>> wsrp-service.wsdl
> >> >>>
> >> >>> ---------------------------------------------------
> >> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:bind"
> >> >>> location="wsrp-2.0-bindings.wsdl"/>
> >> >>>
> >> >>> <wsdl:service name="WSRPService">
> >> >>> <wsdl:port binding="v2bind:WSRP_v2_Markup_Binding_SOAP"
> >> >>> name="WSRP_v2_Markup_Service">
> >> >>> <soap:address
> >> >>> location="http://my.service:8082/WSRPService"/> </wsdl:port>
> >> >>> ...
> >> >>> ---------------------------------------------------
> >> >>>
> >> >>> wsrp-2.0-bindings.wsdl
> >> >>>
> >> >>> ---------------------------------------------------
> >> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:intf"
> >> >>> location="wsrp-2.0-interfaces.wsdl"/>
> >> >>>
> >> >>> <wsdl:binding name="WSRP_v2_Markup_Binding_SOAP"
> >> >>> type="intf:WSRP_v2_Markup_PortType">
> >> >>> <soap:binding style="document"
> >> >>> transport="http://schemas.xmlsoap.org/soap/http"/>
> >> >>> <wsdl:operation name="getMarkup">
> >> >>> <soap:operation
> >> >>> soapAction="urn:oasis:names:tc:wsrp:v2:getMarkup"/> <wsdl:input
> >> >>> name="getMarkup">
> >> >>> <soap:body use="literal"/>
> >> >>> </wsdl:input>
> >> >>> <wsdl:output name="getMarkupResponse">
> >> >>> <soap:body use="literal"/>
> >> >>> </wsdl:output>
> >> >>> ...
> >> >>> ---------------------------------------------------
> >> >>>
> >> >>>
> >> >>> wsrp-2.0-interfaces.wsdl
> >> >>> ---------------------------------------------------
> >> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:types"
> >> >>> schemaLocation="wsrp-2.0-types.xsd"
> >> >>>
> >> >>> <wsdl:portType name="WSRP_v2_Markup_PortType">
> >> >>> <wsdl:operation name="getMarkup">
> >> >>> <wsdl:input message="intf:getMarkup"
> >> >>> name="getMarkup"/> <wsdl:output
> >> >>> message="intf:getMarkupResponse" name="getMarkupResponse"/> ...
> >> >>> ---------------------------------------------------
> >> >>>
> >> >>>
> >> >>> WSDL2Java results:
> >> >>>
> >> >>> AXIS generation result:
> >> >>> WSRP_v2_Markup_PortType.java
> >> >>> MarkupResponse
> >> >>> getMarkup(org.exoplatform.services.wsrp2.type.GetMarkup...
> >> >>> WSRP_v2_Markup_Binding_SOAPImpl (implements
> >> >>> WSRP_v2_Markup_PortType) WSRP_v2_Markup_Binding_SOAPStub.java
> >> >>> (implements
> >> >>> WSRP_v2_Markup_PortType)
> >> >>>
> >> >>>
> >> >>> CXF generation result:
> >> >>> WSRPV2MarkupPortType.java
> >> >>> void
> >> >>> getMarkup(org.exoplatform.services.wsrp2.type.RegistrationConte
> >> >>>xt registrationContext...
> >> >>> WSRPV2MarkupPortTypeImpl (implements WSRPV2MarkupPortType)
> >> >>> WSRPV2MarkupPortType_WSRPMarkupService_Client.java
> >> >>> WSRPV2MarkupPortType_WSRPMarkupService_Server.java
> >> >>>
> >> >>> Why is WSRPV2MarkupPortType (CXF generation) not similar to
> >> >>> WSRP_v2_Markup_PortType (AXIS generation)
> >> >>>
> >> >>> Thanks and regards,
> >> >>> Alexey
> >> >>
> >> >> --
> >> >> J. Daniel Kulp
> >> >> dkulp@apache.org
> >> >> http://www.dankulp.com/blog
> >> >
> >> > --
> >> > View this message in context:
> >> > http://www.nabble.com/Incorrect-code-generation--tp19860324p19864
> >> >113 .html Sent from the cxf-user mailing list archive at
> >> > Nabble.com.
> >
> > --
> > J. Daniel Kulp
> > dkulp@apache.org
> > http://www.dankulp.com/blog
--
J. Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
Re: Incorrect code generation?
Posted by Alexey Zavizionov <al...@gmail.com>.
Thanks for the replies.
I have to do more code refactoring than I thought before.
Regards,
Alexey.
On Wed, Oct 8, 2008 at 6:23 PM, Daniel Kulp <dk...@apache.org> wrote:
> On Wednesday 08 October 2008, Alexey Zavizionov wrote:
>> Thanks fo the replies!
>> I understood. I will use default ("wrapper-style") behaviour.
>>
>> One more question:
>> why generated port type's names without the underline sign?
>
> Again, per spec. JAXWS generally maps _ to a word separator that results
> in the next letter being capitalized.
>
> That said, section 8 of the JAX-WS spec does provide more customization
> things to put into the customization binding file to control that and
> remap it into something else if you don't like it.
>
> Dan
>
>
>
>
>>
>> Regards,
>> Alexey.
>>
>> On Tue, Oct 7, 2008 at 9:14 PM, Glen Mazza <gl...@gmail.com>
> wrote:
>> > See the bottom of this page for more details:
>> > http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
>> >
>> > Glen
>> >
>> > dkulp wrote:
>> >> The CXF generated code is correct per jaxws spec. If the
>> >> operation looks like it's in a "wrapped" doc literal form, we
>> >> unwrap the elements into individual parameters. Section 2.3.1.2
>> >> of the JAX-WS spec defines the rules for when an operation is
>> >> considered wrapped so it gets unwrapped.
>> >>
>> >> That said, JAX-WS also provides a binding customization to force it
>> >> to non-unwrap in which case the method will look more like the Axis
>> >> 1 version. Create a file with the contents:
>> >>
>> >> <jaxws:bindings
>> >> wsdlLocation="hello_world.wsdl"
>> >> xmlns="http://java.sun.com/xml/ns/jaxws">
>> >>
>> >> <enableWrapperStyle>false</enableWrapperStyle>
>> >>
>> >> </jaxws:bindings>
>> >>
>> >> (update the wsdlLocation attribute) and pass that into wsdl2java
>> >> with the -b flag. That should turn off the unwrapping and produce
>> >> code closer to what you expect.
>> >>
>> >>
>> >> Dan
>> >>
>> >> On Tuesday 07 October 2008, Alexey Zavizionov wrote:
>> >>> Hello, list!
>> >>>
>> >>> I am in migration process to CXF from AXIS1 (v.1.4).
>> >>> Let me explain my situation.
>> >>>
>> >>> I have a WSRP service. There are several wsdl files for generating
>> >>> sources:
>> >>>
>> >>> wsrp-service.wsdl
>> >>>
>> >>> ---------------------------------------------------
>> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:bind"
>> >>> location="wsrp-2.0-bindings.wsdl"/>
>> >>>
>> >>> <wsdl:service name="WSRPService">
>> >>> <wsdl:port binding="v2bind:WSRP_v2_Markup_Binding_SOAP"
>> >>> name="WSRP_v2_Markup_Service">
>> >>> <soap:address
>> >>> location="http://my.service:8082/WSRPService"/> </wsdl:port>
>> >>> ...
>> >>> ---------------------------------------------------
>> >>>
>> >>> wsrp-2.0-bindings.wsdl
>> >>>
>> >>> ---------------------------------------------------
>> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:intf"
>> >>> location="wsrp-2.0-interfaces.wsdl"/>
>> >>>
>> >>> <wsdl:binding name="WSRP_v2_Markup_Binding_SOAP"
>> >>> type="intf:WSRP_v2_Markup_PortType">
>> >>> <soap:binding style="document"
>> >>> transport="http://schemas.xmlsoap.org/soap/http"/>
>> >>> <wsdl:operation name="getMarkup">
>> >>> <soap:operation
>> >>> soapAction="urn:oasis:names:tc:wsrp:v2:getMarkup"/> <wsdl:input
>> >>> name="getMarkup">
>> >>> <soap:body use="literal"/>
>> >>> </wsdl:input>
>> >>> <wsdl:output name="getMarkupResponse">
>> >>> <soap:body use="literal"/>
>> >>> </wsdl:output>
>> >>> ...
>> >>> ---------------------------------------------------
>> >>>
>> >>>
>> >>> wsrp-2.0-interfaces.wsdl
>> >>> ---------------------------------------------------
>> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:types"
>> >>> schemaLocation="wsrp-2.0-types.xsd"
>> >>>
>> >>> <wsdl:portType name="WSRP_v2_Markup_PortType">
>> >>> <wsdl:operation name="getMarkup">
>> >>> <wsdl:input message="intf:getMarkup"
>> >>> name="getMarkup"/> <wsdl:output message="intf:getMarkupResponse"
>> >>> name="getMarkupResponse"/> ...
>> >>> ---------------------------------------------------
>> >>>
>> >>>
>> >>> WSDL2Java results:
>> >>>
>> >>> AXIS generation result:
>> >>> WSRP_v2_Markup_PortType.java
>> >>> MarkupResponse
>> >>> getMarkup(org.exoplatform.services.wsrp2.type.GetMarkup...
>> >>> WSRP_v2_Markup_Binding_SOAPImpl (implements
>> >>> WSRP_v2_Markup_PortType) WSRP_v2_Markup_Binding_SOAPStub.java
>> >>> (implements
>> >>> WSRP_v2_Markup_PortType)
>> >>>
>> >>>
>> >>> CXF generation result:
>> >>> WSRPV2MarkupPortType.java
>> >>> void
>> >>> getMarkup(org.exoplatform.services.wsrp2.type.RegistrationContext
>> >>> registrationContext...
>> >>> WSRPV2MarkupPortTypeImpl (implements WSRPV2MarkupPortType)
>> >>> WSRPV2MarkupPortType_WSRPMarkupService_Client.java
>> >>> WSRPV2MarkupPortType_WSRPMarkupService_Server.java
>> >>>
>> >>> Why is WSRPV2MarkupPortType (CXF generation) not similar to
>> >>> WSRP_v2_Markup_PortType (AXIS generation)
>> >>>
>> >>> Thanks and regards,
>> >>> Alexey
>> >>
>> >> --
>> >> J. Daniel Kulp
>> >> dkulp@apache.org
>> >> http://www.dankulp.com/blog
>> >
>> > --
>> > View this message in context:
>> > http://www.nabble.com/Incorrect-code-generation--tp19860324p19864113
>> >.html Sent from the cxf-user mailing list archive at Nabble.com.
>
>
>
> --
> J. Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
Re: Incorrect code generation?
Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 08 October 2008, Alexey Zavizionov wrote:
> Thanks fo the replies!
> I understood. I will use default ("wrapper-style") behaviour.
>
> One more question:
> why generated port type's names without the underline sign?
Again, per spec. JAXWS generally maps _ to a word separator that results
in the next letter being capitalized.
That said, section 8 of the JAX-WS spec does provide more customization
things to put into the customization binding file to control that and
remap it into something else if you don't like it.
Dan
>
> Regards,
> Alexey.
>
> On Tue, Oct 7, 2008 at 9:14 PM, Glen Mazza <gl...@gmail.com>
wrote:
> > See the bottom of this page for more details:
> > http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
> >
> > Glen
> >
> > dkulp wrote:
> >> The CXF generated code is correct per jaxws spec. If the
> >> operation looks like it's in a "wrapped" doc literal form, we
> >> unwrap the elements into individual parameters. Section 2.3.1.2
> >> of the JAX-WS spec defines the rules for when an operation is
> >> considered wrapped so it gets unwrapped.
> >>
> >> That said, JAX-WS also provides a binding customization to force it
> >> to non-unwrap in which case the method will look more like the Axis
> >> 1 version. Create a file with the contents:
> >>
> >> <jaxws:bindings
> >> wsdlLocation="hello_world.wsdl"
> >> xmlns="http://java.sun.com/xml/ns/jaxws">
> >>
> >> <enableWrapperStyle>false</enableWrapperStyle>
> >>
> >> </jaxws:bindings>
> >>
> >> (update the wsdlLocation attribute) and pass that into wsdl2java
> >> with the -b flag. That should turn off the unwrapping and produce
> >> code closer to what you expect.
> >>
> >>
> >> Dan
> >>
> >> On Tuesday 07 October 2008, Alexey Zavizionov wrote:
> >>> Hello, list!
> >>>
> >>> I am in migration process to CXF from AXIS1 (v.1.4).
> >>> Let me explain my situation.
> >>>
> >>> I have a WSRP service. There are several wsdl files for generating
> >>> sources:
> >>>
> >>> wsrp-service.wsdl
> >>>
> >>> ---------------------------------------------------
> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:bind"
> >>> location="wsrp-2.0-bindings.wsdl"/>
> >>>
> >>> <wsdl:service name="WSRPService">
> >>> <wsdl:port binding="v2bind:WSRP_v2_Markup_Binding_SOAP"
> >>> name="WSRP_v2_Markup_Service">
> >>> <soap:address
> >>> location="http://my.service:8082/WSRPService"/> </wsdl:port>
> >>> ...
> >>> ---------------------------------------------------
> >>>
> >>> wsrp-2.0-bindings.wsdl
> >>>
> >>> ---------------------------------------------------
> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:intf"
> >>> location="wsrp-2.0-interfaces.wsdl"/>
> >>>
> >>> <wsdl:binding name="WSRP_v2_Markup_Binding_SOAP"
> >>> type="intf:WSRP_v2_Markup_PortType">
> >>> <soap:binding style="document"
> >>> transport="http://schemas.xmlsoap.org/soap/http"/>
> >>> <wsdl:operation name="getMarkup">
> >>> <soap:operation
> >>> soapAction="urn:oasis:names:tc:wsrp:v2:getMarkup"/> <wsdl:input
> >>> name="getMarkup">
> >>> <soap:body use="literal"/>
> >>> </wsdl:input>
> >>> <wsdl:output name="getMarkupResponse">
> >>> <soap:body use="literal"/>
> >>> </wsdl:output>
> >>> ...
> >>> ---------------------------------------------------
> >>>
> >>>
> >>> wsrp-2.0-interfaces.wsdl
> >>> ---------------------------------------------------
> >>> <import namespace="urn:oasis:names:tc:wsrp:v2:types"
> >>> schemaLocation="wsrp-2.0-types.xsd"
> >>>
> >>> <wsdl:portType name="WSRP_v2_Markup_PortType">
> >>> <wsdl:operation name="getMarkup">
> >>> <wsdl:input message="intf:getMarkup"
> >>> name="getMarkup"/> <wsdl:output message="intf:getMarkupResponse"
> >>> name="getMarkupResponse"/> ...
> >>> ---------------------------------------------------
> >>>
> >>>
> >>> WSDL2Java results:
> >>>
> >>> AXIS generation result:
> >>> WSRP_v2_Markup_PortType.java
> >>> MarkupResponse
> >>> getMarkup(org.exoplatform.services.wsrp2.type.GetMarkup...
> >>> WSRP_v2_Markup_Binding_SOAPImpl (implements
> >>> WSRP_v2_Markup_PortType) WSRP_v2_Markup_Binding_SOAPStub.java
> >>> (implements
> >>> WSRP_v2_Markup_PortType)
> >>>
> >>>
> >>> CXF generation result:
> >>> WSRPV2MarkupPortType.java
> >>> void
> >>> getMarkup(org.exoplatform.services.wsrp2.type.RegistrationContext
> >>> registrationContext...
> >>> WSRPV2MarkupPortTypeImpl (implements WSRPV2MarkupPortType)
> >>> WSRPV2MarkupPortType_WSRPMarkupService_Client.java
> >>> WSRPV2MarkupPortType_WSRPMarkupService_Server.java
> >>>
> >>> Why is WSRPV2MarkupPortType (CXF generation) not similar to
> >>> WSRP_v2_Markup_PortType (AXIS generation)
> >>>
> >>> Thanks and regards,
> >>> Alexey
> >>
> >> --
> >> J. Daniel Kulp
> >> dkulp@apache.org
> >> http://www.dankulp.com/blog
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Incorrect-code-generation--tp19860324p19864113
> >.html Sent from the cxf-user mailing list archive at Nabble.com.
--
J. Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
Re: Incorrect code generation?
Posted by Glen Mazza <gl...@gmail.com>.
I would check the JAX-WS spec (JSR 224) for your answer. That behavior is
probably predefined and the same you would get with GlassFish Metro.
Glen
Zavizionov wrote:
>
> Thanks fo the replies!
> I understood. I will use default ("wrapper-style") behaviour.
>
> One more question:
> why generated port type's names without the underline sign?
>
> Regards,
> Alexey.
>
> On Tue, Oct 7, 2008 at 9:14 PM, Glen Mazza <gl...@gmail.com> wrote:
>>
>> See the bottom of this page for more details:
>> http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
>>
>> Glen
>>
>>
>> dkulp wrote:
>>>
>>>
>>> The CXF generated code is correct per jaxws spec. If the operation
>>> looks like it's in a "wrapped" doc literal form, we unwrap the elements
>>> into individual parameters. Section 2.3.1.2 of the JAX-WS spec
>>> defines the rules for when an operation is considered wrapped so it gets
>>> unwrapped.
>>>
>>> That said, JAX-WS also provides a binding customization to force it to
>>> non-unwrap in which case the method will look more like the Axis 1
>>> version. Create a file with the contents:
>>>
>>> <jaxws:bindings
>>> wsdlLocation="hello_world.wsdl"
>>> xmlns="http://java.sun.com/xml/ns/jaxws">
>>>
>>> <enableWrapperStyle>false</enableWrapperStyle>
>>>
>>> </jaxws:bindings>
>>>
>>> (update the wsdlLocation attribute) and pass that into wsdl2java with
>>> the -b flag. That should turn off the unwrapping and produce code
>>> closer to what you expect.
>>>
>>>
>>> Dan
>>>
>>>
>>>
>>> On Tuesday 07 October 2008, Alexey Zavizionov wrote:
>>>> Hello, list!
>>>>
>>>> I am in migration process to CXF from AXIS1 (v.1.4).
>>>> Let me explain my situation.
>>>>
>>>> I have a WSRP service. There are several wsdl files for generating
>>>> sources:
>>>>
>>>> wsrp-service.wsdl
>>>>
>>>> ---------------------------------------------------
>>>> <import namespace="urn:oasis:names:tc:wsrp:v2:bind"
>>>> location="wsrp-2.0-bindings.wsdl"/>
>>>>
>>>> <wsdl:service name="WSRPService">
>>>> <wsdl:port binding="v2bind:WSRP_v2_Markup_Binding_SOAP"
>>>> name="WSRP_v2_Markup_Service">
>>>> <soap:address location="http://my.service:8082/WSRPService"/>
>>>> </wsdl:port>
>>>> ...
>>>> ---------------------------------------------------
>>>>
>>>> wsrp-2.0-bindings.wsdl
>>>>
>>>> ---------------------------------------------------
>>>> <import namespace="urn:oasis:names:tc:wsrp:v2:intf"
>>>> location="wsrp-2.0-interfaces.wsdl"/>
>>>>
>>>> <wsdl:binding name="WSRP_v2_Markup_Binding_SOAP"
>>>> type="intf:WSRP_v2_Markup_PortType">
>>>> <soap:binding style="document"
>>>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>>> <wsdl:operation name="getMarkup">
>>>> <soap:operation
>>>> soapAction="urn:oasis:names:tc:wsrp:v2:getMarkup"/> <wsdl:input
>>>> name="getMarkup">
>>>> <soap:body use="literal"/>
>>>> </wsdl:input>
>>>> <wsdl:output name="getMarkupResponse">
>>>> <soap:body use="literal"/>
>>>> </wsdl:output>
>>>> ...
>>>> ---------------------------------------------------
>>>>
>>>>
>>>> wsrp-2.0-interfaces.wsdl
>>>> ---------------------------------------------------
>>>> <import namespace="urn:oasis:names:tc:wsrp:v2:types"
>>>> schemaLocation="wsrp-2.0-types.xsd"
>>>>
>>>> <wsdl:portType name="WSRP_v2_Markup_PortType">
>>>> <wsdl:operation name="getMarkup">
>>>> <wsdl:input message="intf:getMarkup"
>>>> name="getMarkup"/> <wsdl:output message="intf:getMarkupResponse"
>>>> name="getMarkupResponse"/> ...
>>>> ---------------------------------------------------
>>>>
>>>>
>>>> WSDL2Java results:
>>>>
>>>> AXIS generation result:
>>>> WSRP_v2_Markup_PortType.java
>>>> MarkupResponse
>>>> getMarkup(org.exoplatform.services.wsrp2.type.GetMarkup...
>>>> WSRP_v2_Markup_Binding_SOAPImpl (implements WSRP_v2_Markup_PortType)
>>>> WSRP_v2_Markup_Binding_SOAPStub.java (implements
>>>> WSRP_v2_Markup_PortType)
>>>>
>>>>
>>>> CXF generation result:
>>>> WSRPV2MarkupPortType.java
>>>> void
>>>> getMarkup(org.exoplatform.services.wsrp2.type.RegistrationContext
>>>> registrationContext...
>>>> WSRPV2MarkupPortTypeImpl (implements WSRPV2MarkupPortType)
>>>> WSRPV2MarkupPortType_WSRPMarkupService_Client.java
>>>> WSRPV2MarkupPortType_WSRPMarkupService_Server.java
>>>>
>>>> Why is WSRPV2MarkupPortType (CXF generation) not similar to
>>>> WSRP_v2_Markup_PortType (AXIS generation)
>>>>
>>>> Thanks and regards,
>>>> Alexey
>>>
>>>
>>>
>>> --
>>> J. Daniel Kulp
>>> dkulp@apache.org
>>> http://www.dankulp.com/blog
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Incorrect-code-generation--tp19860324p19864113.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Incorrect-code-generation--tp19860324p19881130.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Incorrect code generation?
Posted by Alexey Zavizionov <al...@gmail.com>.
Thanks fo the replies!
I understood. I will use default ("wrapper-style") behaviour.
One more question:
why generated port type's names without the underline sign?
Regards,
Alexey.
On Tue, Oct 7, 2008 at 9:14 PM, Glen Mazza <gl...@gmail.com> wrote:
>
> See the bottom of this page for more details:
> http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
>
> Glen
>
>
> dkulp wrote:
>>
>>
>> The CXF generated code is correct per jaxws spec. If the operation
>> looks like it's in a "wrapped" doc literal form, we unwrap the elements
>> into individual parameters. Section 2.3.1.2 of the JAX-WS spec
>> defines the rules for when an operation is considered wrapped so it gets
>> unwrapped.
>>
>> That said, JAX-WS also provides a binding customization to force it to
>> non-unwrap in which case the method will look more like the Axis 1
>> version. Create a file with the contents:
>>
>> <jaxws:bindings
>> wsdlLocation="hello_world.wsdl"
>> xmlns="http://java.sun.com/xml/ns/jaxws">
>>
>> <enableWrapperStyle>false</enableWrapperStyle>
>>
>> </jaxws:bindings>
>>
>> (update the wsdlLocation attribute) and pass that into wsdl2java with
>> the -b flag. That should turn off the unwrapping and produce code
>> closer to what you expect.
>>
>>
>> Dan
>>
>>
>>
>> On Tuesday 07 October 2008, Alexey Zavizionov wrote:
>>> Hello, list!
>>>
>>> I am in migration process to CXF from AXIS1 (v.1.4).
>>> Let me explain my situation.
>>>
>>> I have a WSRP service. There are several wsdl files for generating
>>> sources:
>>>
>>> wsrp-service.wsdl
>>>
>>> ---------------------------------------------------
>>> <import namespace="urn:oasis:names:tc:wsrp:v2:bind"
>>> location="wsrp-2.0-bindings.wsdl"/>
>>>
>>> <wsdl:service name="WSRPService">
>>> <wsdl:port binding="v2bind:WSRP_v2_Markup_Binding_SOAP"
>>> name="WSRP_v2_Markup_Service">
>>> <soap:address location="http://my.service:8082/WSRPService"/>
>>> </wsdl:port>
>>> ...
>>> ---------------------------------------------------
>>>
>>> wsrp-2.0-bindings.wsdl
>>>
>>> ---------------------------------------------------
>>> <import namespace="urn:oasis:names:tc:wsrp:v2:intf"
>>> location="wsrp-2.0-interfaces.wsdl"/>
>>>
>>> <wsdl:binding name="WSRP_v2_Markup_Binding_SOAP"
>>> type="intf:WSRP_v2_Markup_PortType">
>>> <soap:binding style="document"
>>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>> <wsdl:operation name="getMarkup">
>>> <soap:operation
>>> soapAction="urn:oasis:names:tc:wsrp:v2:getMarkup"/> <wsdl:input
>>> name="getMarkup">
>>> <soap:body use="literal"/>
>>> </wsdl:input>
>>> <wsdl:output name="getMarkupResponse">
>>> <soap:body use="literal"/>
>>> </wsdl:output>
>>> ...
>>> ---------------------------------------------------
>>>
>>>
>>> wsrp-2.0-interfaces.wsdl
>>> ---------------------------------------------------
>>> <import namespace="urn:oasis:names:tc:wsrp:v2:types"
>>> schemaLocation="wsrp-2.0-types.xsd"
>>>
>>> <wsdl:portType name="WSRP_v2_Markup_PortType">
>>> <wsdl:operation name="getMarkup">
>>> <wsdl:input message="intf:getMarkup"
>>> name="getMarkup"/> <wsdl:output message="intf:getMarkupResponse"
>>> name="getMarkupResponse"/> ...
>>> ---------------------------------------------------
>>>
>>>
>>> WSDL2Java results:
>>>
>>> AXIS generation result:
>>> WSRP_v2_Markup_PortType.java
>>> MarkupResponse
>>> getMarkup(org.exoplatform.services.wsrp2.type.GetMarkup...
>>> WSRP_v2_Markup_Binding_SOAPImpl (implements WSRP_v2_Markup_PortType)
>>> WSRP_v2_Markup_Binding_SOAPStub.java (implements
>>> WSRP_v2_Markup_PortType)
>>>
>>>
>>> CXF generation result:
>>> WSRPV2MarkupPortType.java
>>> void
>>> getMarkup(org.exoplatform.services.wsrp2.type.RegistrationContext
>>> registrationContext...
>>> WSRPV2MarkupPortTypeImpl (implements WSRPV2MarkupPortType)
>>> WSRPV2MarkupPortType_WSRPMarkupService_Client.java
>>> WSRPV2MarkupPortType_WSRPMarkupService_Server.java
>>>
>>> Why is WSRPV2MarkupPortType (CXF generation) not similar to
>>> WSRP_v2_Markup_PortType (AXIS generation)
>>>
>>> Thanks and regards,
>>> Alexey
>>
>>
>>
>> --
>> J. Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Incorrect-code-generation--tp19860324p19864113.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>
Re: Incorrect code generation?
Posted by Glen Mazza <gl...@gmail.com>.
See the bottom of this page for more details:
http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
Glen
dkulp wrote:
>
>
> The CXF generated code is correct per jaxws spec. If the operation
> looks like it's in a "wrapped" doc literal form, we unwrap the elements
> into individual parameters. Section 2.3.1.2 of the JAX-WS spec
> defines the rules for when an operation is considered wrapped so it gets
> unwrapped.
>
> That said, JAX-WS also provides a binding customization to force it to
> non-unwrap in which case the method will look more like the Axis 1
> version. Create a file with the contents:
>
> <jaxws:bindings
> wsdlLocation="hello_world.wsdl"
> xmlns="http://java.sun.com/xml/ns/jaxws">
>
> <enableWrapperStyle>false</enableWrapperStyle>
>
> </jaxws:bindings>
>
> (update the wsdlLocation attribute) and pass that into wsdl2java with
> the -b flag. That should turn off the unwrapping and produce code
> closer to what you expect.
>
>
> Dan
>
>
>
> On Tuesday 07 October 2008, Alexey Zavizionov wrote:
>> Hello, list!
>>
>> I am in migration process to CXF from AXIS1 (v.1.4).
>> Let me explain my situation.
>>
>> I have a WSRP service. There are several wsdl files for generating
>> sources:
>>
>> wsrp-service.wsdl
>>
>> ---------------------------------------------------
>> <import namespace="urn:oasis:names:tc:wsrp:v2:bind"
>> location="wsrp-2.0-bindings.wsdl"/>
>>
>> <wsdl:service name="WSRPService">
>> <wsdl:port binding="v2bind:WSRP_v2_Markup_Binding_SOAP"
>> name="WSRP_v2_Markup_Service">
>> <soap:address location="http://my.service:8082/WSRPService"/>
>> </wsdl:port>
>> ...
>> ---------------------------------------------------
>>
>> wsrp-2.0-bindings.wsdl
>>
>> ---------------------------------------------------
>> <import namespace="urn:oasis:names:tc:wsrp:v2:intf"
>> location="wsrp-2.0-interfaces.wsdl"/>
>>
>> <wsdl:binding name="WSRP_v2_Markup_Binding_SOAP"
>> type="intf:WSRP_v2_Markup_PortType">
>> <soap:binding style="document"
>> transport="http://schemas.xmlsoap.org/soap/http"/>
>> <wsdl:operation name="getMarkup">
>> <soap:operation
>> soapAction="urn:oasis:names:tc:wsrp:v2:getMarkup"/> <wsdl:input
>> name="getMarkup">
>> <soap:body use="literal"/>
>> </wsdl:input>
>> <wsdl:output name="getMarkupResponse">
>> <soap:body use="literal"/>
>> </wsdl:output>
>> ...
>> ---------------------------------------------------
>>
>>
>> wsrp-2.0-interfaces.wsdl
>> ---------------------------------------------------
>> <import namespace="urn:oasis:names:tc:wsrp:v2:types"
>> schemaLocation="wsrp-2.0-types.xsd"
>>
>> <wsdl:portType name="WSRP_v2_Markup_PortType">
>> <wsdl:operation name="getMarkup">
>> <wsdl:input message="intf:getMarkup"
>> name="getMarkup"/> <wsdl:output message="intf:getMarkupResponse"
>> name="getMarkupResponse"/> ...
>> ---------------------------------------------------
>>
>>
>> WSDL2Java results:
>>
>> AXIS generation result:
>> WSRP_v2_Markup_PortType.java
>> MarkupResponse
>> getMarkup(org.exoplatform.services.wsrp2.type.GetMarkup...
>> WSRP_v2_Markup_Binding_SOAPImpl (implements WSRP_v2_Markup_PortType)
>> WSRP_v2_Markup_Binding_SOAPStub.java (implements
>> WSRP_v2_Markup_PortType)
>>
>>
>> CXF generation result:
>> WSRPV2MarkupPortType.java
>> void
>> getMarkup(org.exoplatform.services.wsrp2.type.RegistrationContext
>> registrationContext...
>> WSRPV2MarkupPortTypeImpl (implements WSRPV2MarkupPortType)
>> WSRPV2MarkupPortType_WSRPMarkupService_Client.java
>> WSRPV2MarkupPortType_WSRPMarkupService_Server.java
>>
>> Why is WSRPV2MarkupPortType (CXF generation) not similar to
>> WSRP_v2_Markup_PortType (AXIS generation)
>>
>> Thanks and regards,
>> Alexey
>
>
>
> --
> J. Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
--
View this message in context: http://www.nabble.com/Incorrect-code-generation--tp19860324p19864113.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Incorrect code generation?
Posted by Daniel Kulp <dk...@apache.org>.
The CXF generated code is correct per jaxws spec. If the operation
looks like it's in a "wrapped" doc literal form, we unwrap the elements
into individual parameters. Section 2.3.1.2 of the JAX-WS spec
defines the rules for when an operation is considered wrapped so it gets
unwrapped.
That said, JAX-WS also provides a binding customization to force it to
non-unwrap in which case the method will look more like the Axis 1
version. Create a file with the contents:
<jaxws:bindings
wsdlLocation="hello_world.wsdl"
xmlns="http://java.sun.com/xml/ns/jaxws">
<enableWrapperStyle>false</enableWrapperStyle>
</jaxws:bindings>
(update the wsdlLocation attribute) and pass that into wsdl2java with
the -b flag. That should turn off the unwrapping and produce code
closer to what you expect.
Dan
On Tuesday 07 October 2008, Alexey Zavizionov wrote:
> Hello, list!
>
> I am in migration process to CXF from AXIS1 (v.1.4).
> Let me explain my situation.
>
> I have a WSRP service. There are several wsdl files for generating
> sources:
>
> wsrp-service.wsdl
>
> ---------------------------------------------------
> <import namespace="urn:oasis:names:tc:wsrp:v2:bind"
> location="wsrp-2.0-bindings.wsdl"/>
>
> <wsdl:service name="WSRPService">
> <wsdl:port binding="v2bind:WSRP_v2_Markup_Binding_SOAP"
> name="WSRP_v2_Markup_Service">
> <soap:address location="http://my.service:8082/WSRPService"/>
> </wsdl:port>
> ...
> ---------------------------------------------------
>
> wsrp-2.0-bindings.wsdl
>
> ---------------------------------------------------
> <import namespace="urn:oasis:names:tc:wsrp:v2:intf"
> location="wsrp-2.0-interfaces.wsdl"/>
>
> <wsdl:binding name="WSRP_v2_Markup_Binding_SOAP"
> type="intf:WSRP_v2_Markup_PortType">
> <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="getMarkup">
> <soap:operation
> soapAction="urn:oasis:names:tc:wsrp:v2:getMarkup"/> <wsdl:input
> name="getMarkup">
> <soap:body use="literal"/>
> </wsdl:input>
> <wsdl:output name="getMarkupResponse">
> <soap:body use="literal"/>
> </wsdl:output>
> ...
> ---------------------------------------------------
>
>
> wsrp-2.0-interfaces.wsdl
> ---------------------------------------------------
> <import namespace="urn:oasis:names:tc:wsrp:v2:types"
> schemaLocation="wsrp-2.0-types.xsd"
>
> <wsdl:portType name="WSRP_v2_Markup_PortType">
> <wsdl:operation name="getMarkup">
> <wsdl:input message="intf:getMarkup"
> name="getMarkup"/> <wsdl:output message="intf:getMarkupResponse"
> name="getMarkupResponse"/> ...
> ---------------------------------------------------
>
>
> WSDL2Java results:
>
> AXIS generation result:
> WSRP_v2_Markup_PortType.java
> MarkupResponse
> getMarkup(org.exoplatform.services.wsrp2.type.GetMarkup...
> WSRP_v2_Markup_Binding_SOAPImpl (implements WSRP_v2_Markup_PortType)
> WSRP_v2_Markup_Binding_SOAPStub.java (implements
> WSRP_v2_Markup_PortType)
>
>
> CXF generation result:
> WSRPV2MarkupPortType.java
> void
> getMarkup(org.exoplatform.services.wsrp2.type.RegistrationContext
> registrationContext...
> WSRPV2MarkupPortTypeImpl (implements WSRPV2MarkupPortType)
> WSRPV2MarkupPortType_WSRPMarkupService_Client.java
> WSRPV2MarkupPortType_WSRPMarkupService_Server.java
>
> Why is WSRPV2MarkupPortType (CXF generation) not similar to
> WSRP_v2_Markup_PortType (AXIS generation)
>
> Thanks and regards,
> Alexey
--
J. Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog