Maintaining Object state in XML WS problem.



Hi All,
I am writing a WS to Web-enable a 3-rd party .Net custome object(myObj),
which does three things:

1. Make a socket connection to Server - myObj.open()
2. Send a msg to the Server - myObj.send()
3. Close socket connection - myObj.close()

Because of some reasons I have to do these three action in 3 different
webMethod(openConnectionWS();sendMsgWS();closeConnectionWS()), therefore, I
will have to presist the myObj throughout the application lifecycle untill
someone call the myObj.close() (in closeConnectionWS() webmethod);

I have tried to do Application("mySession",myObj); to presiste myObj across
the WebServices after i called the openConnectionWS() webmethod. However,
when I tried to make a call to myObj.sendMsg() in sendMsgWS() webmethod after
getting myObj back from Application["mySession"], the socket connection seems
to have dropped but everything else like myObj.username and
myObj.password...etc still presisted(I am sure because I can still get all my
value from the watch windows in the VS.NET debugger.

Does anyone see anything wrong here?
Is there any special thing i need to handle in presisting an object in WS?

Please kindly advise.

Martin

.



Relevant Pages

  • Re: bug with sending null elements of DataSet[] ?
    ... On client side, call webmethod like this: ... So, on server side, I expected to see a DataSet array with one element, where that element contains null. ... This should have been a big hint to the client, but apparently, it was not. ... public int ID ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: TCP receive too many small packets
    ... I have a client / server application that communicates with each other ... thru a socket connection. ... Is something wrong with sending small TCP packets? ...
    (microsoft.public.win32.programmer.networks)
  • Re: Problem with XML-RPC, possibly with SOAP too
    ... >> communication protocol amoing client apps and server. ... >> The third problem was since a new connection is needed on each call, ... >> second), no more socket connection can be made, and communication just ...
    (comp.lang.java.programmer)
  • Problem in sending data through Socket in Pocket PC
    ... I've an application that is using socket connection over TCP/IP for sending ... 58-59 kb all the data is send succesfully from Pocket PC to server. ... LingerOption lingerOption = new LingerOption ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Problem with XML-RPC, possibly with SOAP too
    ... >> communication protocol amoing client apps and server. ... >> The third problem was since a new connection is needed on each call, ... >> second), no more socket connection can be made, and communication just ...
    (comp.lang.java)