axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Lalye <cla...@sbcglobal.net>
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("http://www.w3.org/2001/XMLSchema", "long"));
}
catch (Exception ex3) {
     ex3.printStackTrace();
}
 
 
Chetan
 
 
-----------------------
 
#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.

 

Cheers,

 

/Chris

http://cvs.apache.org/~haddadc

 

 

-----Original Message-----
From: Chetan Lalye [mailto:clalye@sbcglobal.net] 
Sent: Friday, December 12, 2003 2:09 PM
To: axis-user@ws.apache.org
Subject: Session Handling and Stateful WS

 

Hi,

 

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
Envelope...here's the code

snippet.

 

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
MessageElement.getValueAsType()!"

 

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
correctly...  

 

Any ideas what could be wrong here ??

 

 

 

thanks

Chetan


Mime
View raw message