[jboss-dev-forums] [Design of JBoss ESB] - Re: Webservice - SOAP - JAXB Introductions

Sylvia Isler do-not-reply at jboss.com
Fri Aug 10 16:28:47 EDT 2007


Thanks for the response and the very useful debugging suggestions. I ended up getting the UnitPrice class implementation below to work in example to work in JAXB-proper.

without the @XmlTransient tag on getValue() I observed an illegal annotations error indicating that the attribute value and the method getValue() are somehow duplicating eachother as far as JAXB is concerned.

Now, I am wondering whether XmlRootElement and XmlTransient are necessary annotations in JaxbIntros to make this sort of example work?

@XmlRootElement(name="UnitPrice")
  | public class UnitPrice {
  | 	
  | 	@XmlAttribute private double value;
  | 	UnitPrice(double value){
  | 		this.value=value;
  | 	}
  | 	UnitPrice()
  | 	{
  | 		
  | 	}
  |  
  | 	@XmlTransient
  | 	public double getValue()
  | 	{
  | 		return this.value;
  | 	}
  |     public void setValue(double v){
  |     	this.value = v;
  |     }
  | }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073200#4073200

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073200



More information about the jboss-dev-forums mailing list