cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tli (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-305) Unsupport handling of schema which will have @XmlElementRef & JAXBElement in type code generated by JAXB
Date Thu, 14 Dec 2006 10:09:26 GMT
Unsupport handling of schema which will have @XmlElementRef & JAXBElement in type code
generated by JAXB
--------------------------------------------------------------------------------------------------------

                 Key: CXF-305
                 URL: http://issues.apache.org/jira/browse/CXF-305
             Project: CXF
          Issue Type: Bug
          Components: JAXB Databinding
    Affects Versions: 2.0
            Reporter: tli
             Fix For: 2.0


When a element in a anoymous complex type specified minOccurs="0" and nillable="true",
the generated type code use JAXBElement<String> not String

Schema Sample:

    <xs:element name="EchoStringAsBinary">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="s" minOccurs="0" nillable="true" type="xs:string" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="EchoStringAsBinaryResponse">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="EchoStringAsBinaryResult" minOccurs="0" nillable="true"
                    type="xs:base64Binary" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>

JAXBCode generated:

    @XmlElementRef(name = "s", namespace = "http://xmlsoap.org/Ping", type = JAXBElement.class)
    protected JAXBElement<String> s;

    /**
     * Gets the value of the s property.
     * 
     * @return
     *     possible object is
     *     {@link JAXBElement }{@code <}{@link String }{@code >}
     *     
     */
    public JAXBElement<String> getS() {
        return s;
    }

    /**
     * Sets the value of the s property.
     * 
     * @param value
     *     allowed object is
     *     {@link JAXBElement }{@code <}{@link String }{@code >}
     *     
     */
    public void setS(JAXBElement<String> value) {
        this.s = ((JAXBElement<String> ) value);
    }



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message