You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Bruno Melloni <Br...@chickasaw.net> on 2009/07/06 19:16:56 UTC

Passing POJOs in contract last

First, I am aware of the benefits of the 'contract first' approach.  Still, at this time I must use contract last.

Having said that... how do I pass a POJO as a parameter?

I believe I need to define some 'JAXB binding' information 'somewhere' so that it can interpret the POJOs... but search as I might I can't find the documentation.  I know it must exist and that it is probably trivial.

Could someone either point me to a good tutorial or example, or explain how to do it?

Thanks,

B.

Re: Passing POJOs in contract last

Posted by Daniel Kulp <dk...@apache.org>.
On Mon July 6 2009 1:16:56 pm Bruno Melloni wrote:
> First, I am aware of the benefits of the 'contract first' approach.  Still,
> at this time I must use contract last.
>
> Having said that... how do I pass a POJO as a parameter?

You should be able to just pass it as long as the POJO's meet the JAXB 
requirements which would basically be:
1) Have a default/no-arg constructor

2) Bean style properties.  (getter/setter or public fields)

The result may not be the best schema for the wsdl.   That's where most of the 
JAXB annotations come in.   You can add annotations for the type names, the 
element names, etc... to make the generated schema more palatable. 

Dan


>
> I believe I need to define some 'JAXB binding' information 'somewhere' so
> that it can interpret the POJOs... but search as I might I can't find the
> documentation.  I know it must exist and that it is probably trivial.
>
> Could someone either point me to a good tutorial or example, or explain how
> to do it?
>
> Thanks,
>
> B.

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