passing a dataset through a webservice

Hi,
I'm a really a newby in .NET webservices technologies. I've just started in.

I want to pass a typed dataset from my client app to the webserver application.
To start, I created a webmethod and passed a dataset parameter to it. For instance:

<WebMethod>
Public Function PassDataSet(ByVal orderDataSet As OrderDataSet) As Integer
_orderDataSet = orderDataSet
Return 0
End Function


_orderDataSet is an attribute of the webservice class. The problem I have is that my _orderDataSet is not stored as persistent, so It becomes empty when I try to call it from an other method.

I don't have any idea about how to perform that. I heard about XML serialization, but I don't know how to apply it in this simple practical case.

Excuse my language style. English is not my mother tongue.

Thanks




Answer this question

passing a dataset through a webservice

  • NoSTaBoNN

    Hi,
    Web Service application, as any other web application is stateless by default.
    In order to achieve stateful logic you will have to store _orderDataSet in Session or as a static attibute of the Global.asax class (in case static is ok for you)

    Hope it helps,
    Rgds,
    Rodrigo

  • xie tianmin

    Hi Rodrigo,
    So grateful !
    I tried to add a Session container to store my objects and it works.

    Thanks

    Simurg

  • passing a dataset through a webservice