how is stub created?
string url = "http://hostname/webservices/services/MyWSService";
stub.CookieContainer = new CookieContainer();
stub.Timeout = 1000 * 60 * 60;
stub.Url = url;thanks,
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung.
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est
interdite. Ce message sert à l'information seulement et n'aura pas n'importe
quel effet légalement obligatoire. Étant donné que les email peuvent facilement
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité
pour le contenu fourni.
Subject: RE: Session Managment using .net client..
Date: Mon, 22 Jun 2009 06:49:21 -0700
From: [email protected]
To: [email protected]
HI Amardeep,
Here
is how you do it in C#.net
string url = "http://hostname/webservices/services/MyWSService";
stub.CookieContainer = new CookieContainer();
stub.Timeout = 1000 * 60 * 60;
stub.Url = url;
Thanks
Raghu
From: amardeep singh
khera [mailto:[email protected]]
Sent: Monday, June 22, 2009 4:00 AM
To: [email protected]
Subject: Session Managment using .net client..
Hi All,
I am facing
an issue with managing session between an axis2 java service and C#.net
console client. I am able to manage session between the same axis2 java service
and java client(axis client) by using following code in my java client:
Service Client client = stub._getServiceClient();
Options
opt = client.getOptions();
opt.setTimeOutInMilliSeconds(600000);
opt.setManageSession(true);
client.setOptions(opt);
And in my service implementation class I store user details into
axis session using following code
MessageContext msgContext = MessageContext.getCurrentMessageContext();
ServiceContext
serviceContext = msgContext.getServiceContext();
serviceContext.setProperty("ROLE_ID",
roleId.toString());
serviceContext.setProperty("AUTHENTICATION_STATUS",
authenticationStatus);
serviceContext.setProperty("USER_ID", userId);
msgContext.setServiceContext(serviceContext);
This is all working fine for me as long as I am using java client.
Now my other
requirement is to develop a C# .net console client for the same service. So I
have generated the proxy class using Microsoft visual studio from wsdl and
written C#.net console client which is working fine. But now I want to
implement session management in a similar way as I am able to do so in java
client. Can anyone please suggest me a way to do so.
Thanks
Amardeep
Singh
_________________________________________________________________
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009