You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Jim Ma (JIRA)" <ji...@apache.org> on 2018/08/22 03:31:00 UTC

[jira] [Created] (CXF-7823) JAXBEncoderDecoder doesn't respect @XmlType's propOrder in Exception class

Jim Ma created CXF-7823:
---------------------------

             Summary: JAXBEncoderDecoder doesn't respect @XmlType's propOrder in Exception class
                 Key: CXF-7823
                 URL: https://issues.apache.org/jira/browse/CXF-7823
             Project: CXF
          Issue Type: Bug
          Components: JAXB Databinding
    Affects Versions: 3.2.6
            Reporter: Jim Ma
            Assignee: Jim Ma
             Fix For: 3.3.0, 3.2.7


Property order is ignored when marshal this exception class by JAXBEncoderDecoder:

@XmlRootElement(name = "fault")
@XmlType(name = "", propOrder = {
   "message", "data"
}, namespace = "")
public class PropertyOrderException extends Exception implements java.io.Serializable {
    private static final long serialVersionUID = 1L;

    @XmlElement(name = "message", required = true, nillable = true)
    public String message;

    @XmlElement(name = "data", required = true, nillable = true)
    public ErrorData data;

    public PropertyOrderException() {
        this.data = new ErrorData();
        this.message = null;
    }

    public PropertyOrderException(ErrorData data) {
        this.data = data;
        this.message = null;
    }

    public PropertyOrderException(String message) {
        this.data = null;
        this.message = message;
    }

    @Override
    @XmlTransient
    public String getMessage() {
        return this.message;
    }

}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)