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. Josef -----Ursprüngliche Nachricht----- Von: Deepal Jayasinghe [mailto:deep...@gmail.com] Gesendet: Montag, 13. Juni 2011 19:41 An: java-user@axis.apache.org 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. Deepal On Thu, Jun 9, 2011 at 2:30 PM, Mahesh kumar <mmahesh...@gmail.com> 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 -- http://blogs.deepal.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org For additional commands, e-mail: java-user-h...@axis.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org For additional commands, e-mail: java-user-h...@axis.apache.org