axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Lalye <>
Subject Re: Session Handling and Stateful WS
Date Fri, 12 Dec 2003 21:53:02 GMT
Thanks Chris
However, I modifed it as you suggested and tried to get the value back as soon as I create
it and it still fails...
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("", "long"));
catch (Exception ex3) {
#2 )Axis registers a type mapping for the java.lang.Long.class, is your
id object of type java.lang.Long or a custom type?  If it is a custom
type, the type mapping needs to be defined, or convert the object to a
native object (for example, String or Long) and pass the simpler
representation to the SOAPHeaderElement constructor.







-----Original Message-----
From: Chetan Lalye [] 
Sent: Friday, December 12, 2003 2:09 PM
Subject: Session Handling and Stateful WS




I have a couple of questions for the axis gurus..


1. Session Handling

 I created a simple stateful webservice by using the SimpleSession
Handler and it seemed to work. However I wanted to know how this scales
to mutiple users and clients. Are there any limitations ? Are there any
other issues that I should be concerned about ?


2. adding SoapHeaders


I have written my own handler that adds a Soap Header to's the code



SOAPEnvelope    localEnvelope = msg.getSOAPEnvelope();


SOAPHeaderElement header = new SOAPHeaderElement(MYNAMESPACE,
                        MYLOCALART, id); /// id is a Long object
containing a long value


localEnvelope .addHeader(header);



during the execution, there is a exception thrown somewhere in the axis
code that

"java.lang.Exception: No deserialization context to use in


I'm assuming that somewhere its trying to obtain the value of the Header
and that must have failed...looks like the header isn't created


Any ideas what could be wrong here ??






View raw message