alessio.soldano wrote: anonymous wrote : Could you please post the code where you're using the XmlAccessorType annotation? | I mean, are you using this | Code: | | @XmlAccessorType(XmlAccessType.FIELD) | | | or something different? (like an array of AccessType.FIELD) | | You might also start from the classes generated by wsconsume.
I have generated the classes from JAXB 2.0 . these classes are using this @XmlAccessorType(XmlAccessType.FIELD) and sample code for this | // | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b26-ea3 | // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> | // Any modifications to this file will be lost upon recompilation of the source schema. | // Generated on: 2007.10.22 at 10:28:58 AM IST | // | | | package com.covad.xsd.smo.vendororder; | | import java.util.ArrayList; | import java.util.List; | import javax.xml.bind.annotation.AccessType; | import javax.xml.bind.annotation.XmlAccessorType; | import javax.xml.bind.annotation.XmlElement; | import javax.xml.bind.annotation.XmlType; | import javax.xml.datatype.XMLGregorianCalendar; | import com.covad.xsd.smo.vendororder.Client; | import com.covad.xsd.smo.vendororder.LineItem; | import com.covad.xsd.smo.vendororder.VendorOrder; | | | /** | * <p>Java class for VendorOrder complex type. | * | * <p>The following schema fragment specifies the expected content contained within this class. | * | * <pre> | * <complexType name="VendorOrder"> | * <complexContent> | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> | * <sequence> | * <element name="orderID" type="{http://www.w3.org/2001/XMLSchema}int"/> | * <element name="vendorID" type="{http://www.w3.org/2001/XMLSchema}int"/> | * <element name="vendorOrderID" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> | * <element name="orderReceivedDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/> | * <element name="contractAcceptedFlag" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> | * <element name="contractAcceptedDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/> | * <element name="productLanguageCode" type="{http://www.w3.org/2001/XMLSchema}string"/> | * <element name="client" type="{http://smo.xsd.covad.com/vendororder}Client" minOccurs="0"/> | * <element name="lineItem" type="{http://smo.xsd.covad.com/vendororder}LineItem" maxOccurs="unbounded" minOccurs="0"/> | * </sequence> | * </restriction> | * </complexContent> | * </complexType> | * </pre> | * | * | */ | @XmlAccessorType(AccessType.FIELD) | @XmlType(name = "VendorOrder", propOrder = { | "orderID", | "vendorID", | "vendorOrderID", | "orderReceivedDate", | "contractAcceptedFlag", | "contractAcceptedDate", | "productLanguageCode", | "client", | "lineItem" | }) | public class VendorOrder { | | @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder", type = Integer.class) | protected int orderID; | @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder", type = Integer.class) | protected int vendorID; | @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder") | protected String vendorOrderID; | @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder") | protected XMLGregorianCalendar orderReceivedDate; | @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder") | protected Boolean contractAcceptedFlag; | @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder") | protected XMLGregorianCalendar contractAcceptedDate; | @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder") | protected String productLanguageCode; | @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder") | protected Client client; | @XmlElement(namespace = "http://smo.xsd.covad.com/vendororder") | protected List<LineItem> lineItem; | | /** | * Gets the value of the orderID property. | * | */ | public int getOrderID() { | return orderID; | } | | /** | * Sets the value of the orderID property. | * | */ | public void setOrderID(int value) { | this.orderID = value; | } | | /** | * Gets the value of the vendorID property. | * | */ | public int getVendorID() { | return vendorID; | } | | /** | * Sets the value of the vendorID property. | * | */ | public void setVendorID(int value) { | this.vendorID = value; | } | | /** | * Gets the value of the vendorOrderID property. | * | * @return | * possible object is | * [EMAIL PROTECTED] String } | * | */ | public String getVendorOrderID() { | return vendorOrderID; | } | | /** | * Sets the value of the vendorOrderID property. | * | * @param value | * allowed object is | * [EMAIL PROTECTED] String } | * | */ | public void setVendorOrderID(String value) { | this.vendorOrderID = value; | } | | /** | * Gets the value of the orderReceivedDate property. | * | * @return | * possible object is | * [EMAIL PROTECTED] XMLGregorianCalendar } | * | */ | public XMLGregorianCalendar getOrderReceivedDate() { | return orderReceivedDate; | } | | /** | * Sets the value of the orderReceivedDate property. | * | * @param value | * allowed object is | * [EMAIL PROTECTED] XMLGregorianCalendar } | * | */ | public void setOrderReceivedDate(XMLGregorianCalendar value) { | this.orderReceivedDate = value; | } | | /** | * Gets the value of the contractAcceptedFlag property. | * | * @return | * possible object is | * [EMAIL PROTECTED] Boolean } | * | */ | public Boolean isContractAcceptedFlag() { | return contractAcceptedFlag; | } | | /** | * Sets the value of the contractAcceptedFlag property. | * | * @param value | * allowed object is | * [EMAIL PROTECTED] Boolean } | * | */ | public void setContractAcceptedFlag(Boolean value) { | this.contractAcceptedFlag = value; | } | | /** | * Gets the value of the contractAcceptedDate property. | * | * @return | * possible object is | * [EMAIL PROTECTED] XMLGregorianCalendar } | * | */ | public XMLGregorianCalendar getContractAcceptedDate() { | return contractAcceptedDate; | } | | /** | * Sets the value of the contractAcceptedDate property. | * | * @param value | * allowed object is | * [EMAIL PROTECTED] XMLGregorianCalendar } | * | */ | public void setContractAcceptedDate(XMLGregorianCalendar value) { | this.contractAcceptedDate = value; | } | | /** | * Gets the value of the productLanguageCode property. | * | * @return | * possible object is | * [EMAIL PROTECTED] String } | * | */ | public String getProductLanguageCode() { | return productLanguageCode; | } | | /** | * Sets the value of the productLanguageCode property. | * | * @param value | * allowed object is | * [EMAIL PROTECTED] String } | * | */ | public void setProductLanguageCode(String value) { | this.productLanguageCode = value; | } | | /** | * Gets the value of the client property. | * | * @return | * possible object is | * [EMAIL PROTECTED] Client } | * | */ | public Client getClient() { | return client; | } | | /** | * Sets the value of the client property. | * | * @param value | * allowed object is | * [EMAIL PROTECTED] Client } | * | */ | public void setClient(Client value) { | this.client = value; | } | | /** | * Gets the value of the lineItem property. | * | * <p> | * This accessor method returns a reference to the live list, | * not a snapshot. Therefore any modification you make to the | * returned list will be present inside the JAXB object. | * This is why there is not a <CODE>set</CODE> method for the lineItem property. | * | * <p> | * For example, to add a new item, do as follows: | * <pre> | * getLineItem().add(newItem); | * </pre> | * | * | * <p> | * Objects of the following type(s) are allowed in the list | * [EMAIL PROTECTED] LineItem } | * | * | */ | public List<LineItem> getLineItem() { | if (lineItem == null) { | lineItem = new ArrayList<LineItem>(); | } | return this.lineItem; | } | | } | Please suggest on this. Thanks in Advance. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099124#4099124 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099124 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
