You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Philipp, Karl" <Ka...@danet.de> on 2007/03/09 13:27:30 UTC

Unexpected creaton of an intermediate layer (wrapper class) by using Axis v1.1.1

Hi,

Using the invocation

 %AXIS2_HOME%\bin\wsdl2java -uri addServicePort.wsdl -p danet -d adb -s

I created the stub AddServicePortServiceStub.java. Surprisingly an
additional intermediate layer represented by the class 
AddService0(...) has been created. This class is needed for a proper
call of the service:

 public AddServiceResponse addService(AddService0 param) {

   EIMessageContext context =
param.getAddService().getEiMessageContext();
   ...
 }

That is, the AddService0 wraps the original AddService class I'm
interested in. But why is this wrapping needed?

If I try the Axis2UserGuideService example

 
http://ws.apache.org/axis2/1_1_1/userguide-creatingclients.html#createcl
ients

such intermediate layers will be not created. For example there is no
TwoWayOneParameterEchoRequest0 class:

 TwoWayOneParameterEchoResponse
TwoWayOneParameterEcho(TwoWayOneParameterEchoRequest param) {
 ...
 }

At the present time we plan to migrate our connector from JBossWS to
Axis2. But the additional AddService0 class is a migration issue.

Is there an approach to avoid this "wrapper class"?

Because I used the same invocation as for the Axis2UserGuideService
example I guess it depends on the entries of the WSDL. 

--
Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Unexpected creaton of an intermediate layer (wrapper class) by using Axis v1.1.1

Posted by Paul Fremantle <pz...@gmail.com>.
Thanks for the clarification Dennis. I assumed it was generic - my bad.

Paul

On 3/9/07, Dennis Sosnoski <dm...@sosnoski.com> wrote:
> Just to clarify, the limitation on unwrapping only parameters and not
> responses in 1.1.1 applies to ADB. Using JiBX data binding gives full
> unwrapping of both parameters and responses. XMLBeans doesn't support
> unwrapping at all, AFAIK.
>
>   - Dennis
>
> Dennis M. Sosnoski
> SOA and Web Services in Java
> Training and Consulting
> http://www.sosnoski.com - http://www.sosnoski.co.nz
> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
>
>
>
> Paul Fremantle wrote:
> > Karl
> >
> > The wrapping is basically part of how many toolkits create WSDLs these
> > days. Its based on an approach from Microsoft.
> >
> > The simple answer is add "-uw" (unwrap) to your WSDL2Java command line.
> >
> > In 1.1.1 this only unwraps parameters not responses but in 1.2 its
> > fixed to do both.
> >
> > If you want to understand the convention more, this explanation from
> > Anne Thomas Manes is probably the clearest available:
> > http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html
> >
> >
> > Paul
> >
> > On 3/9/07, Philipp, Karl <Ka...@danet.de> wrote:
> >> Hi,
> >>
> >> Using the invocation
> >>
> >>  %AXIS2_HOME%\bin\wsdl2java -uri addServicePort.wsdl -p danet -d adb -s
> >>
> >> I created the stub AddServicePortServiceStub.java. Surprisingly an
> >> additional intermediate layer represented by the class
> >> AddService0(...) has been created. This class is needed for a proper
> >> call of the service:
> >>
> >>  public AddServiceResponse addService(AddService0 param) {
> >>
> >>    EIMessageContext context =
> >> param.getAddService().getEiMessageContext();
> >>    ...
> >>  }
> >>
> >> That is, the AddService0 wraps the original AddService class I'm
> >> interested in. But why is this wrapping needed?
> >>
> >> If I try the Axis2UserGuideService example
> >>
> >>
> >> http://ws.apache.org/axis2/1_1_1/userguide-creatingclients.html#createcl
> >> ients
> >>
> >> such intermediate layers will be not created. For example there is no
> >> TwoWayOneParameterEchoRequest0 class:
> >>
> >>  TwoWayOneParameterEchoResponse
> >> TwoWayOneParameterEcho(TwoWayOneParameterEchoRequest param) {
> >>  ...
> >>  }
> >>
> >> At the present time we plan to migrate our connector from JBossWS to
> >> Axis2. But the additional AddService0 class is a migration issue.
> >>
> >> Is there an approach to avoid this "wrapper class"?
> >>
> >> Because I used the same invocation as for the Axis2UserGuideService
> >> example I guess it depends on the entries of the WSDL.
> >>
> >> --
> >> Karl
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Unexpected creaton of an intermediate layer (wrapper class) by using Axis v1.1.1

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
Just to clarify, the limitation on unwrapping only parameters and not 
responses in 1.1.1 applies to ADB. Using JiBX data binding gives full 
unwrapping of both parameters and responses. XMLBeans doesn't support 
unwrapping at all, AFAIK.

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Paul Fremantle wrote:
> Karl
>
> The wrapping is basically part of how many toolkits create WSDLs these
> days. Its based on an approach from Microsoft.
>
> The simple answer is add "-uw" (unwrap) to your WSDL2Java command line.
>
> In 1.1.1 this only unwraps parameters not responses but in 1.2 its
> fixed to do both.
>
> If you want to understand the convention more, this explanation from
> Anne Thomas Manes is probably the clearest available:
> http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html 
>
>
> Paul
>
> On 3/9/07, Philipp, Karl <Ka...@danet.de> wrote:
>> Hi,
>>
>> Using the invocation
>>
>>  %AXIS2_HOME%\bin\wsdl2java -uri addServicePort.wsdl -p danet -d adb -s
>>
>> I created the stub AddServicePortServiceStub.java. Surprisingly an
>> additional intermediate layer represented by the class
>> AddService0(...) has been created. This class is needed for a proper
>> call of the service:
>>
>>  public AddServiceResponse addService(AddService0 param) {
>>
>>    EIMessageContext context =
>> param.getAddService().getEiMessageContext();
>>    ...
>>  }
>>
>> That is, the AddService0 wraps the original AddService class I'm
>> interested in. But why is this wrapping needed?
>>
>> If I try the Axis2UserGuideService example
>>
>>
>> http://ws.apache.org/axis2/1_1_1/userguide-creatingclients.html#createcl
>> ients
>>
>> such intermediate layers will be not created. For example there is no
>> TwoWayOneParameterEchoRequest0 class:
>>
>>  TwoWayOneParameterEchoResponse
>> TwoWayOneParameterEcho(TwoWayOneParameterEchoRequest param) {
>>  ...
>>  }
>>
>> At the present time we plan to migrate our connector from JBossWS to
>> Axis2. But the additional AddService0 class is a migration issue.
>>
>> Is there an approach to avoid this "wrapper class"?
>>
>> Because I used the same invocation as for the Axis2UserGuideService
>> example I guess it depends on the entries of the WSDL.
>>
>> -- 
>> Karl
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Unexpected creaton of an intermediate layer (wrapper class) by using Axis v1.1.1

Posted by Paul Fremantle <pz...@gmail.com>.
Karl

The wrapping is basically part of how many toolkits create WSDLs these
days. Its based on an approach from Microsoft.

The simple answer is add "-uw" (unwrap) to your WSDL2Java command line.

In 1.1.1 this only unwraps parameters not responses but in 1.2 its
fixed to do both.

If you want to understand the convention more, this explanation from
Anne Thomas Manes is probably the clearest available:
http://atmanes.blogspot.com/2005/03/wrapped-documentliteral-convention.html

Paul

On 3/9/07, Philipp, Karl <Ka...@danet.de> wrote:
> Hi,
>
> Using the invocation
>
>  %AXIS2_HOME%\bin\wsdl2java -uri addServicePort.wsdl -p danet -d adb -s
>
> I created the stub AddServicePortServiceStub.java. Surprisingly an
> additional intermediate layer represented by the class
> AddService0(...) has been created. This class is needed for a proper
> call of the service:
>
>  public AddServiceResponse addService(AddService0 param) {
>
>    EIMessageContext context =
> param.getAddService().getEiMessageContext();
>    ...
>  }
>
> That is, the AddService0 wraps the original AddService class I'm
> interested in. But why is this wrapping needed?
>
> If I try the Axis2UserGuideService example
>
>
> http://ws.apache.org/axis2/1_1_1/userguide-creatingclients.html#createcl
> ients
>
> such intermediate layers will be not created. For example there is no
> TwoWayOneParameterEchoRequest0 class:
>
>  TwoWayOneParameterEchoResponse
> TwoWayOneParameterEcho(TwoWayOneParameterEchoRequest param) {
>  ...
>  }
>
> At the present time we plan to migrate our connector from JBossWS to
> Axis2. But the additional AddService0 class is a migration issue.
>
> Is there an approach to avoid this "wrapper class"?
>
> Because I used the same invocation as for the Axis2UserGuideService
> example I guess it depends on the entries of the WSDL.
>
> --
> Karl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org