Hi all,
In my test web service implementation, I have a handler that adds a header to the SOAP Envelope. During execution it fails in some axis code, so I wrote a small test to retrieve the value of the soap header....Here's the code snippet.
long longval= 9912345678L
java.lang.Long id2 = new Long(longval);
// and add it
SOAPHeaderElement header = new SOAPHeaderElement("http://mywork.test.session",
"sessionID", id2);
try {
Long id3 = (Long) header.getValueAsType(new \
QName("http://www.w3.org/2001/XMLSchema", "long")); }
catch (Exception ex3) {
ex3.printStackTrace();
}
java.lang.Long id2 = new Long(longval);
// and add it
SOAPHeaderElement header = new SOAPHeaderElement("http://mywork.test.session",
"sessionID", id2);
try {
Long id3 = (Long) header.getValueAsType(new \
QName("http://www.w3.org/2001/XMLSchema", "long")); }
catch (Exception ex3) {
ex3.printStackTrace();
}
The above code fails with the following exception...
"java.lang.Exception: No deserialization context to use in
MessageElement.getValueAsType()!"
MessageElement.getValueAsType()!"
Since I am using a java Long object, i didn't think i would require to use a custom deserializer...
Any ideas what could be wrong ?
Chetan
