axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Lalye <cla...@sbcglobal.net>
Subject adding SOAP Headers : Deserialization errors
Date Mon, 15 Dec 2003 04:40:13 GMT
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 while retreiving the value,
so I wrote a some test code 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();
}

The above code fails with the following exception...
"java.lang.Exception: No deserialization context to use in
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 ? Have I missed out something ? 
 
Chetan


Mime
View raw message