You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by sylvinhio sly <sy...@hotmail.com> on 2011/02/11 19:41:58 UTC

Newbie CXF user - Wrapper question

Hello,

I'm newbie using CXF.

I have generated a wsdl file from java classes.
My service implementation class has also been created
Now, I'm trying to generate server classes (server interface and other classes...) from my service implementation class.

So, when I do it, I can see that a XXXResponse and a XXXRequest classes have been generated (where XXX is my web service method name).

In these classes, I can see that the name of the Response / Request object are by default, arg0 (for Request) and return (for Response)

The problem is that these wrappers add a level to my xml message.


For exemple, if the type of my method parameter is ParamType.
The generated xml message is now :

<header>
....
</header>
<body>
   <arg0>
      <param> //ParamType
         .....
      </param>
   </arg0>
</body>


What I want is to get the following message :

<header>

....

</header>

<body>

      <param> //ParamType

         .....

      </param>

</body>


So I want to avoid this arg0 level in my exchanged message.

How can I do such a thing ?

Thanks a lot in advance,

Best regards
 		 	   		  

Re: Newbie CXF user - Wrapper question

Posted by Daniel Kulp <dk...@apache.org>.
On Saturday 12 February 2011 8:21:39 AM sylvinhio sly wrote:
> Server classes are generated from my Service implementation class.
> So I can't use this : @SOAPBinding(parameterStyle =
> SOAPBinding.ParameterStyle.BARE)
> 
> in the interface, because the interface does not exist before launching the
> generation...

You can add it to the impl as well.   

Dan



> 
> 
> Nobody knows ?
> 
> > From: sylvinhio@hotmail.com
> > To: users@cxf.apache.org
> > Subject: RE: Newbie CXF user - Wrapper question
> > Date: Fri, 11 Feb 2011 18:59:48 +0000
> > 
> > 
> > 
> > They won't be generated ?
> > Or they will be generated but not used in the structure of my message ?
> > 
> > Thanks a lot
> > 
> > > From: dkulp@apache.org
> > > To: users@cxf.apache.org
> > > Subject: Re: Newbie CXF user - Wrapper question
> > > Date: Fri, 11 Feb 2011 13:52:13 -0500
> > > CC: sylvinhio@hotmail.com
> > > 
> > > 
> > > 
> > > If you add:
> > > 
> > > @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> > > 
> > > 
> > > to the interface for the service, it should remove those.
> > > 
> > > Dan
> > > 
> > > On Friday 11 February 2011 1:41:58 pm sylvinhio sly wrote:
> > > > Hello,
> > > > 
> > > > I'm newbie using CXF.
> > > > 
> > > > I have generated a wsdl file from java classes.
> > > > My service implementation class has also been created
> > > > Now, I'm trying to generate server classes (server interface and
> > > > other classes...) from my service implementation class.
> > > > 
> > > > So, when I do it, I can see that a XXXResponse and a XXXRequest
> > > > classes have been generated (where XXX is my web service method
> > > > name).
> > > > 
> > > > In these classes, I can see that the name of the Response / Request
> > > > object are by default, arg0 (for Request) and return (for Response)
> > > > 
> > > > The problem is that these wrappers add a level to my xml message.
> > > > 
> > > > 
> > > > For exemple, if the type of my method parameter is ParamType.
> > > > The generated xml message is now :
> > > > 
> > > > <header>
> > > > ....
> > > > </header>
> > > > <body>
> > > > <arg0>
> > > > <param> //ParamType
> > > > .....
> > > > </param>
> > > > </arg0>
> > > > </body>
> > > > 
> > > > 
> > > > What I want is to get the following message :
> > > > 
> > > > <header>
> > > > 
> > > > ....
> > > > 
> > > > </header>
> > > > 
> > > > <body>
> > > > 
> > > > <param> //ParamType
> > > > 
> > > > .....
> > > > 
> > > > </param>
> > > > 
> > > > </body>
> > > > 
> > > > 
> > > > So I want to avoid this arg0 level in my exchanged message.
> > > > 
> > > > How can I do such a thing ?
> > > > 
> > > > Thanks a lot in advance,
> > > > 
> > > > Best regards

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

Re: Newbie CXF user - Wrapper question

Posted by Willem Jiang <wi...@gmail.com>.
On 2/12/11 9:21 PM, sylvinhio sly wrote:
>
>
> Server classes are generated from my Service implementation class.
> So I can't use this : @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
>
> in the interface, because the interface does not exist before launching the generation...

How do you create the interface?
Maybe you can consider add the annotation when creating the interface.
>
>
> Nobody knows ?
>
>
>> From: sylvinhio@hotmail.com
>> To: users@cxf.apache.org
>> Subject: RE: Newbie CXF user - Wrapper question
>> Date: Fri, 11 Feb 2011 18:59:48 +0000
>>
>>
>>
>> They won't be generated ?
>> Or they will be generated but not used in the structure of my message ?
>>
>> Thanks a lot
>>
>>
>>> From: dkulp@apache.org
>>> To: users@cxf.apache.org
>>> Subject: Re: Newbie CXF user - Wrapper question
>>> Date: Fri, 11 Feb 2011 13:52:13 -0500
>>> CC: sylvinhio@hotmail.com
>>>
>>>
>>>
>>> If you add:
>>>
>>> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
>>>
>>>
>>> to the interface for the service, it should remove those.
>>>
>>> Dan
>>>
>>>
>>>
>>> On Friday 11 February 2011 1:41:58 pm sylvinhio sly wrote:
>>>> Hello,
>>>>
>>>> I'm newbie using CXF.
>>>>
>>>> I have generated a wsdl file from java classes.
>>>> My service implementation class has also been created
>>>> Now, I'm trying to generate server classes (server interface and other
>>>> classes...) from my service implementation class.
>>>>
>>>> So, when I do it, I can see that a XXXResponse and a XXXRequest classes
>>>> have been generated (where XXX is my web service method name).
>>>>
>>>> In these classes, I can see that the name of the Response / Request object
>>>> are by default, arg0 (for Request) and return (for Response)
>>>>
>>>> The problem is that these wrappers add a level to my xml message.
>>>>
>>>>
>>>> For exemple, if the type of my method parameter is ParamType.
>>>> The generated xml message is now :
>>>>
>>>> <header>
>>>> ....
>>>> </header>
>>>> <body>
>>>> <arg0>
>>>> <param>  //ParamType
>>>> .....
>>>> </param>
>>>> </arg0>
>>>> </body>
>>>>
>>>>
>>>> What I want is to get the following message :
>>>>
>>>> <header>
>>>>
>>>> ....
>>>>
>>>> </header>
>>>>
>>>> <body>
>>>>
>>>> <param>  //ParamType
>>>>
>>>> .....
>>>>
>>>> </param>
>>>>
>>>> </body>
>>>>
>>>>
>>>> So I want to avoid this arg0 level in my exchanged message.
>>>>
>>>> How can I do such a thing ?
>>>>
>>>> Thanks a lot in advance,
>>>>
>>>> Best regards
>>>
>>> --
>>> Daniel Kulp
>>> dkulp@apache.org
>>> http://dankulp.com/blog
>>
>   		 	   		


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

RE: Newbie CXF user - Wrapper question

Posted by sylvinhio sly <sy...@hotmail.com>.
 
Server classes are generated from my Service implementation class.
So I can't use this : @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
 
in the interface, because the interface does not exist before launching the generation...
 
 
Nobody knows ?

 
> From: sylvinhio@hotmail.com
> To: users@cxf.apache.org
> Subject: RE: Newbie CXF user - Wrapper question
> Date: Fri, 11 Feb 2011 18:59:48 +0000
> 
> 
> 
> They won't be generated ?
> Or they will be generated but not used in the structure of my message ?
> 
> Thanks a lot
> 
> 
> > From: dkulp@apache.org
> > To: users@cxf.apache.org
> > Subject: Re: Newbie CXF user - Wrapper question
> > Date: Fri, 11 Feb 2011 13:52:13 -0500
> > CC: sylvinhio@hotmail.com
> > 
> > 
> > 
> > If you add:
> > 
> > @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> > 
> > 
> > to the interface for the service, it should remove those.
> > 
> > Dan
> > 
> > 
> > 
> > On Friday 11 February 2011 1:41:58 pm sylvinhio sly wrote:
> > > Hello,
> > > 
> > > I'm newbie using CXF.
> > > 
> > > I have generated a wsdl file from java classes.
> > > My service implementation class has also been created
> > > Now, I'm trying to generate server classes (server interface and other
> > > classes...) from my service implementation class.
> > > 
> > > So, when I do it, I can see that a XXXResponse and a XXXRequest classes
> > > have been generated (where XXX is my web service method name).
> > > 
> > > In these classes, I can see that the name of the Response / Request object
> > > are by default, arg0 (for Request) and return (for Response)
> > > 
> > > The problem is that these wrappers add a level to my xml message.
> > > 
> > > 
> > > For exemple, if the type of my method parameter is ParamType.
> > > The generated xml message is now :
> > > 
> > > <header>
> > > ....
> > > </header>
> > > <body>
> > > <arg0>
> > > <param> //ParamType
> > > .....
> > > </param>
> > > </arg0>
> > > </body>
> > > 
> > > 
> > > What I want is to get the following message :
> > > 
> > > <header>
> > > 
> > > ....
> > > 
> > > </header>
> > > 
> > > <body>
> > > 
> > > <param> //ParamType
> > > 
> > > .....
> > > 
> > > </param>
> > > 
> > > </body>
> > > 
> > > 
> > > So I want to avoid this arg0 level in my exchanged message.
> > > 
> > > How can I do such a thing ?
> > > 
> > > Thanks a lot in advance,
> > > 
> > > Best regards
> > 
> > -- 
> > Daniel Kulp
> > dkulp@apache.org
> > http://dankulp.com/blog
> 
 		 	   		  

RE: Newbie CXF user - Wrapper question

Posted by sylvinhio sly <sy...@hotmail.com>.

They won't be generated ?
Or they will be generated but not used in the structure of my message ?

Thanks a lot


> From: dkulp@apache.org
> To: users@cxf.apache.org
> Subject: Re: Newbie CXF user - Wrapper question
> Date: Fri, 11 Feb 2011 13:52:13 -0500
> CC: sylvinhio@hotmail.com
> 
> 
> 
> If you add:
> 
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> 
> 
> to the interface for the service, it should remove those.
> 
> Dan
> 
> 
> 
> On Friday 11 February 2011 1:41:58 pm sylvinhio sly wrote:
> > Hello,
> > 
> > I'm newbie using CXF.
> > 
> > I have generated a wsdl file from java classes.
> > My service implementation class has also been created
> > Now, I'm trying to generate server classes (server interface and other
> > classes...) from my service implementation class.
> > 
> > So, when I do it, I can see that a XXXResponse and a XXXRequest classes
> > have been generated (where XXX is my web service method name).
> > 
> > In these classes, I can see that the name of the Response / Request object
> > are by default, arg0 (for Request) and return (for Response)
> > 
> > The problem is that these wrappers add a level to my xml message.
> > 
> > 
> > For exemple, if the type of my method parameter is ParamType.
> > The generated xml message is now :
> > 
> > <header>
> > ....
> > </header>
> > <body>
> >    <arg0>
> >       <param> //ParamType
> >          .....
> >       </param>
> >    </arg0>
> > </body>
> > 
> > 
> > What I want is to get the following message :
> > 
> > <header>
> > 
> > ....
> > 
> > </header>
> > 
> > <body>
> > 
> >       <param> //ParamType
> > 
> >          .....
> > 
> >       </param>
> > 
> > </body>
> > 
> > 
> > So I want to avoid this arg0 level in my exchanged message.
> > 
> > How can I do such a thing ?
> > 
> > Thanks a lot in advance,
> > 
> > Best regards
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
 		 	   		  

Re: Newbie CXF user - Wrapper question

Posted by Daniel Kulp <dk...@apache.org>.

If you add:

@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)


to the interface for the service, it should remove those.

Dan



On Friday 11 February 2011 1:41:58 pm sylvinhio sly wrote:
> Hello,
> 
> I'm newbie using CXF.
> 
> I have generated a wsdl file from java classes.
> My service implementation class has also been created
> Now, I'm trying to generate server classes (server interface and other
> classes...) from my service implementation class.
> 
> So, when I do it, I can see that a XXXResponse and a XXXRequest classes
> have been generated (where XXX is my web service method name).
> 
> In these classes, I can see that the name of the Response / Request object
> are by default, arg0 (for Request) and return (for Response)
> 
> The problem is that these wrappers add a level to my xml message.
> 
> 
> For exemple, if the type of my method parameter is ParamType.
> The generated xml message is now :
> 
> <header>
> ....
> </header>
> <body>
>    <arg0>
>       <param> //ParamType
>          .....
>       </param>
>    </arg0>
> </body>
> 
> 
> What I want is to get the following message :
> 
> <header>
> 
> ....
> 
> </header>
> 
> <body>
> 
>       <param> //ParamType
> 
>          .....
> 
>       </param>
> 
> </body>
> 
> 
> So I want to avoid this arg0 level in my exchanged message.
> 
> How can I do such a thing ?
> 
> Thanks a lot in advance,
> 
> Best regards

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

Newbie CXF user - Wrapper question

Posted by sylvinhio sly <sy...@hotmail.com>.
Hello

I'm newbie using CXF.

I have generated a wsdl file from java classes.
My service implementation class has also been created
Now, I'm trying to generate server classes (server interface and other classes...) from my service implementation class.

So, when I do it, I can see that a XXXResponse and a XXXRequest classes have been generated (where XXX is my web service method name).

In these classes, I can see that the name of the Response / Request object are by default, arg0 (for Request) and return (for Response)

The problem is that these wrappers add a level to my xml message.


For exemple, if the type of my method parameter is ParamType.
The generated xml message is now :

<header>
....
</header>
<body>
   <arg0>
      <param> //ParamType
         .....
      </param>
   </arg0>
</body>


What I want is to get the following message :

<header>

....

</header>

<body>

      <param> //ParamType

         .....

      </param>

</body>


So I want to avoid this arg0 level in my exchanged message.

How can I do such a thing ?

Thanks a lot in advance,

Best regards