diff options
author | Abhishek Koneru <akoneru@redhat.com> | 2014-03-03 21:06:43 -0500 |
---|---|---|
committer | Abhishek Koneru <akoneru@redhat.com> | 2014-03-03 21:28:39 -0500 |
commit | c91f7fd25477dd6f519c141bbe820ab256ab24da (patch) | |
tree | ada88a99f5db027bbe48a882c555ca690b54b827 /base/common | |
parent | d6d197d1a4513a3262a59c3989845f69285a38ad (diff) | |
download | pki-c91f7fd25477dd6f519c141bbe820ab256ab24da.tar.gz pki-c91f7fd25477dd6f519c141bbe820ab256ab24da.tar.xz pki-c91f7fd25477dd6f519c141bbe820ab256ab24da.zip |
Cannot unmarshall *Request objects to ResourceMessage object.
When using XML for communicating with the server, the JAXBContext is not
able to unmarshall KeyArchivalRequest,KeyRecoveryRequest, SymKeyGenerationRequest objects
as it does not recognize them to be subclasses of ResourceMessage. Adding a
@XmlSeeAlso attribute to the ResourceMessage class will let the JAXBContext to know that
the subclasses are binded to the super class and unmarshalls the *Request objects.
No problems were found when using JSON to communicate with the server.
Diffstat (limited to 'base/common')
-rw-r--r-- | base/common/src/com/netscape/certsrv/base/ResourceMessage.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/base/ResourceMessage.java b/base/common/src/com/netscape/certsrv/base/ResourceMessage.java index e7ef44f4b..65f978ecc 100644 --- a/base/common/src/com/netscape/certsrv/base/ResourceMessage.java +++ b/base/common/src/com/netscape/certsrv/base/ResourceMessage.java @@ -18,14 +18,20 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlValue; import javax.xml.bind.annotation.adapters.XmlAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import com.netscape.certsrv.key.KeyArchivalRequest; +import com.netscape.certsrv.key.KeyRecoveryRequest; +import com.netscape.certsrv.key.SymKeyGenerationRequest; + /** * @author Ade Lee */ @XmlRootElement(name="ResourceMessage") +@XmlSeeAlso({KeyArchivalRequest.class, KeyRecoveryRequest.class, SymKeyGenerationRequest.class, PKIException.Data.class}) @XmlAccessorType(XmlAccessType.NONE) public class ResourceMessage { |