Maintaining Object state in XML WS problem.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martin

    #1

    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(openC onnectionWS();s endMsgWS();clos eConnectionWS() ), therefore, I
    will have to presist the myObj throughout the application lifecycle untill
    someone call the myObj.close() (in closeConnection WS() webmethod);

    I have tried to do Application("my Session",myObj) ; to presiste myObj across
    the WebServices after i called the openConnectionW S() 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

Working...