Daniel, Nafis, Thank you very much... now my another problem why the JAXB annotations are not taken by CXF... do you have an idea? (I cannot test :( )
Thanks for your help -----Original Message----- From: Nafis Zebarjadi [mailto:[EMAIL PROTECTED] Sent: 09 October 2008 19:55 To: [email protected] Subject: RE: Hide/Ignore a pojo field Max, Take a look at JAXB's @XmlAccessorType which controls whether to marshal fields (i.e. public/private members) or properties (via getter/setter methods). Another option is to force explicit control over what gets included in the output using XmlAccessType.NONE: @XmlAccessorType(XmlAccessType.NONE) public class MyDefinedPojo { // include this in the generated XML @XmlElement protected String left; // since we set access type to XmlAccessType.NONE, // we can leave out @XmlElement and this field will not be marshalled protected String right; ... } JavaDoc for the JAXB package (javax.xml.bind.annotation) has more details. /n > -----Original Message----- > From: Daniel Kulp [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 09, 2008 1:34 PM > To: [email protected] > Cc: Maxime Orain > Subject: Re: Hide/Ignore a pojo field > > > > Max, > > You MAY need to put the @XmlTransient annotation on the getter and > setter as > well. I'm not really sure where JAXB is going to look for it. > > Dan > > > On Thursday 09 October 2008 4:35:43 am Maxime Orain wrote: > > Hello Dan, (and others of course ;) ) > > > > Thanks for your help! > > > > I tried to use the @XmlTransient but it didn't work I think I've got > > problem with JAXB annotations. Is there restrictions? Is it > compatible > > with CXF 2.1.1? Is more configuration needs to be written? > > > > Thanks again > > > > Max. > > > > -----Original Message----- > > From: Daniel Kulp [mailto:[EMAIL PROTECTED] > > Sent: 08 October 2008 22:02 > > To: [email protected] > > Subject: Re: Hide/Ignore a pojo field > > > > > > > > There is an @XmlTransient annotation to mark fields as transient from > a > > jaxb > > standpoint. > > > > Dan > > > > On Wednesday 08 October 2008 2:06:19 pm Maxime Orain wrote: > > > Hello > > > > > > > > > > > > Another question... how it's possible to hide a pojo field? > > > > > > > > > > > > I don't want that right field appears on the generated WSDL. Is a > > > > method > > > > > exists to hide or to ignore a field? > > > > > > > > > > > > public class MyDefinedPojo > > > > > > { > > > > > > protected String left; > > > > > > protected String right; > > > > > > > > > > > > public MyDefinedPojo() {} > > > > > > > > > > > > public String getLeft() { return this.left; } > > > > > > > > > public void setLeft(String data) { this.left=data; } > > > > > > public String getRight() { return this.right; > > > > } > > > > > public void setRight(String data) { this.right=data; } > > > > > > } > > > > > > > > > > > > > > > > > > Thanks for your help! > > > > > > > > > > > > > > > > > > This email was sent to you by Thomson Reuters, the global news and > > > information company. Any views expressed in this message are those > of > > > > the > > > > > individual sender, except where the sender specifically states them > to > > > > be > > > > > the views of Thomson Reuters. > > > > -- > Daniel Kulp > [EMAIL PROTECTED] > http://dankulp.com/blog This email was sent to you by Thomson Reuters, the global news and information company. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters.
