users@jaxb.java.net

JAXBElment correct creation inside a POJO

From: Davide Gesino <williamkidd_at_libero.it>
Date: Mon, 12 Nov 2007 02:16:19 -0800 (PST)

I have the following question. Starting from the WSDL and XSD defined in
MTOSI specification shipped inside Apache CXF I have the generation of the
following class.


@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ManagedElement_T", propOrder = {

})
public class ManagedElementT {

    @XmlElementRef(name = "name", namespace = "tmf854.v1", type =
JAXBElement.class)
    protected JAXBElement<NamingAttributesT> name;

    public void setName(JAXBElement<NamingAttributesT> value) {
        this.name = ((JAXBElement<NamingAttributesT> ) value);
    }
}

of course the class has many more fields accessed with getters and setters.
How can I create the JAXBElement to oass to the setName method??
What is the right Qname() String to pass in the constructor?

There is a way to generate the setter having a setName(NamigAttributedT
value), that wraps inside the implementation the content in a JAXBElement
object?

-- 
View this message in context: http://www.nabble.com/JAXBElment-correct-creation-inside-a-POJO-tf4790071.html#a13702960
Sent from the java.net - jaxb users mailing list archive at Nabble.com.