You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by HeJam <ta...@hotmail.com> on 2010/04/23 11:14:44 UTC

Using wsdl2java of cxf to generate set method of List attribute of POJO

Hi All,

 

Does any one know ways to generate the set mothed of List attribute of POJO when using the wsdl2java funciton of cxf?

 

Thanks!

Jam
 		 	   		  
_________________________________________________________________
想知道明天天气如何?必应告诉你!
http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5&form=MICHJ2

RE: Using wsdl2java of cxf to generate set method of List attribute of POJO

Posted by HeJam <ta...@hotmail.com>.
Hi Glen,

 

Thanks for help. BTW, here is the URL: https://jaxb2-commons.dev.java.net/collection-setter-injector/ that comes from Daniel Kulp(dkulp@apache.org), it shows how to use xjc to generate the setter.

 

Jam
 
> Date: Fri, 23 Apr 2010 05:07:34 -0700
> From: glen.mazza@gmail.com
> To: dev@cxf.apache.org
> Subject: Re: Using wsdl2java of cxf to generate set method of List attribute of POJO
> 
> 
> Hmmm...I don't think that's allowed. If I recall the JAXB spec correctly,
> you're supposed to get() the list and add elements to it. CXF uses Sun's
> JAXB library, so that's the way it works.
> 
> Glen
> 
> 
> HeJam wrote:
> > 
> > Hi All,
> > 
> > Does any one know ways to generate the set mothed of List attribute of
> > POJO when using the wsdl2java funciton of cxf?
> > 
> > Thanks!
> > Jam
> > 
> 
> -- 
> View this message in context: http://old.nabble.com/Using-wsdl2java-of-cxf-to-generate-set-method-of-List-attribute-of-POJO-tp28339078p28340486.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
> 
 		 	   		  
_________________________________________________________________
约会说不清地方?来试试微软地图最新msn互动功能!
http://ditu.live.com/?form=TL&swm=1

Re: Using wsdl2java of cxf to generate set method of List attribute of POJO

Posted by Glen Mazza <gl...@gmail.com>.
Hmmm...I don't think that's allowed.  If I recall the JAXB spec correctly,
you're supposed to get() the list and add elements to it.  CXF uses Sun's
JAXB library, so that's the way it works.

Glen


HeJam wrote:
> 
> Hi All,
> 
> Does any one know ways to generate the set mothed of List attribute of
> POJO when using the wsdl2java funciton of cxf?
> 
> Thanks!
> Jam
> 

-- 
View this message in context: http://old.nabble.com/Using-wsdl2java-of-cxf-to-generate-set-method-of-List-attribute-of-POJO-tp28339078p28340486.html
Sent from the cxf-dev mailing list archive at Nabble.com.


RE: Using wsdl2java of cxf to generate set method of List attribute of POJO

Posted by HeJam <ta...@hotmail.com>.
Hi Daniel,

 

Thanks for the advice, I will try it later.

 

Jam
 
> From: dkulp@apache.org
> To: dev@cxf.apache.org
> Subject: Re: Using wsdl2java of cxf to generate set method of List attribute of POJO
> Date: Fri, 23 Apr 2010 14:30:13 -0400
> CC: tang_haih@hotmail.com
> 
> 
> There is an xjc plugin that would do it:
> 
> https://jaxb2-commons.dev.java.net/collection-setter-injector/
> 
> Never tried it though.
> 
> Dan
> 
> 
> On Friday 23 April 2010 5:14:44 am HeJam wrote:
> > Hi All,
> > 
> > 
> > 
> > Does any one know ways to generate the set mothed of List attribute of POJO
> > when using the wsdl2java funciton of cxf?
> > 
> > 
> > 
> > Thanks!
> > 
> > Jam
> > 
> > _________________________________________________________________
> > 想知道明天天气如何?必应告诉你!
> > http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5&form=MICHJ
> > 2
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
 		 	   		  
_________________________________________________________________
SkyDrive电子画册,带你领略精彩照片,分享“美”时“美”刻!
http://www.windowslive.cn/campaigns/e-magazine/ngmchina/?a=c

Re: Using wsdl2java of cxf to generate set method of List attribute of POJO

Posted by Daniel Kulp <dk...@apache.org>.
There is an xjc plugin that would do it:

https://jaxb2-commons.dev.java.net/collection-setter-injector/

Never tried it though.

Dan


On Friday 23 April 2010 5:14:44 am HeJam wrote:
> Hi All,
> 
> 
> 
> Does any one know ways to generate the set mothed of List attribute of POJO
> when using the wsdl2java funciton of cxf?
> 
> 
> 
> Thanks!
> 
> Jam
> 
> _________________________________________________________________
> 想知道明天天气如何?必应告诉你!
> http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5&form=MICHJ
> 2

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