axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stadelmann Josef" <>
Subject AW: Axis2 soapsession Example
Date Tue, 14 Jun 2011 08:17:04 GMT
100% true what Deeplal said!
What has said sop far is true. Scope="soapsession" in service.xml, engagement of addressing
at server and client; stop, you develop a .NET client and that's where the nightmar begins.
So develop first a axi2/j client enage addressing and learn all about scope0"soapsession"
including the timeout value to be set in axis2.xml big enought for your long lasting sessions.
Implement init() and destroy() to your service providing class.

THEN: at your .Net client using WCF 3.5 at least, you need to intercept the 1. response-message
from the server and catch out and store away the servicegroupId. Then you need to intercept
each outgoing request-message and add the soap-header with the servicegroupId in exact the
same way as a java-axis2-client does it. Also you need to sniff in the proper html data, ContentType,
userAgent and TransferEncoding; exact the same way as axis2-java-client does it. You have
to fake the axis2 server. For that to work on .NET you need WCF 3.5 or better. DO NOT USE
ASP.NET or you run into a trap as the mustUnderstand bit/value of the soap header carring
the servicegroupId is set wrong by the ASP.NET code and can only be read but not set with
your own ASP.NET code. But with WCF you can set even this bit right. With WCF 3.5 you develope
some classes and you define your custome binding, which allows you to add a behavior class.
It is this behavior class which triggers your client-side-interceptor-class for outgoing and
incomming messages.

Here for all that we have developed the code, and it works fine with one exception, this is
regarding the inabillity of axis2/j to adjust the timeout value set in axis2.xml on the fly,
to allow for a rais down and destroy() the service providing object; AND we still do not master
this using a WSDL first approach!

As a suggestion: I havn't checked it, I would also look at the WSIT toolkit from Sun which
aims at intereoperable web services between .NET and AXIS2 environment and between and Axis2
and .NET environment; never tried it but at least there you can find some interop commitments
from MS, SUN, as well as other providers.

If you still one go the hard way, as I did, I'l have to do some work and publish the code
for .NET and Axis2 service.

-----Urspr√ľngliche Nachricht-----
Von: Deepal Jayasinghe [] 
Gesendet: Montag, 13. Juni 2011 19:41
Betreff: Re: Axis2 soapsession Example

Hi Mahesh,

SOAPSession only works withing Axis2 (not even with Axis1), so you
will have hard time trying to get that working with .Net. You probably
need to write custom code to handle required SOAP header. However,
transport session should work, b'coz in Axis2 transport session works
using cookies. As long as .Net client sends the cookies you will be
able to stay in the same session.


On Thu, Jun 9, 2011 at 2:30 PM, Mahesh kumar <> wrote:
> Hi,
> I'm new to axis2 webservice. Can anyone provide me example for soapsession.
> A .net application is going to consume my service. In this case which
> session type is appropriate. Transport session or soap session. Sorry for my
> ignorance


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message