Note that there are some explanatory texts on larger screens.

plurals
  1. POunmarshalling complex types with Jaxb2
    primarykey
    data
    text
    <p>Hi I have following XML and java classes when I unmarshall using JAXB2 processor using Spring OXM framework I am getting all null values. Any idea?</p> <pre><code>import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name="AuthentXML",namespace="http://xml.authentify.net/MessageSchema.xml") public class AuthentifyResult { private Header header; public Header getHeader() { return header; } public void setHeader(Header header) { this.header = header; } } @XmlType(name="", propOrder={"asid", "teid", "replyTo"}) public class Header { private String asid; private String teid; private String replyTo; public String getAsid() { return asid; } public void setAsid(String asid) { this.asid = asid; } public String getTeid() { return teid; } public void setTeid(String teid) { this.teid = teid; } public String getReplyTo() { return replyTo; } public void setReplyTo(String replyTo) { this.replyTo = replyTo; } } &lt;?xml version="1.0" ?&gt; &lt;AuthentXML&gt; &lt;header&gt; &lt;asid&gt;AuthenticationSubjectID&lt;/asid&gt; &lt;teid&gt;B6F997AE-FB4E-11D3-80BD-0050DA5DC7B8&lt;/teid&gt; &lt;replyTo&gt;https://r1.authentify.net/s2s/default.asp&lt;/replyTo&gt; &lt;/header&gt; &lt;/AuthentXML&gt; unmarshaling code FileInputStream is = null; is = new FileInputStream(FILE_NAME); this.authentifyResult = (AuthentifyResult) this.jaxbUnmarshaller.unmarshal(new StreamSource(is)); </code></pre> <p>I am receiving null for header in authentifyResult. Why?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload