Please help urgently.

Discussion in 'ASP .Net' started by Steven, Jan 22, 2004.

  1. Steven

    Steven Guest

    Hi all

    My problem is a little lengthy. But please help me. In my application,
    ADO.NET DataSet object is not getting constructed in the Web Service Web

    Method called by the Windows Application passing an ADO.NET DataSet Object
    as a parameter to the Web Method in Web Service

    Debugging using the Soap Extensions, clearly shows that the Serialized
    DataSet is passed to the Web Service, but the Web Service Web Method is not
    able to construct the ADO.NET DataSet from the Serialized Data.

    I am hereby giving a brief overview of what I am doing.

    We're developing a WindowsForms based distributed application. All our

    WindowsForms clients connect to the business components layers using Web

    Service. Therefore, the front-end only talks to the Web Service and Web

    Service calls the Business and Data Layer components. Since the Web Service

    Layer acts as a gateway between the WindowsForms clients and the business

    components, We pass all the data using DataSets.

    Here is the code snippet,

    private void LoadGroup(string ticker)

    {

    //We're creating an object of a stronly typed

    DataSet

    EquityPeerCriteriaSet equityPeerCriteriaSet = new

    EquityPeerCriteriaSet();


    //We're setting the properties of the strongly typed

    DataSet

    equityPeerCriteriaSet.CriteriaType ="Ticker";

    equityPeerCriteriaSet.CriteriaValue =m_ticker;


    //We're creating the Web Service's proxy object


    WebReferences.EquityPeerListService.EquityPeerListMgmtService

    equityPeerListService= new

    WebReferences.EquityPeerListService.EquityPeerListMgmtService();

    //We're calling the web method and passing the

    DataSet from

    Dataset DspeerListsSet =

    equityPeerListService.GetPeerList(equityPeerCriteriaSet);

    ....

    ....

    }



    Our Web Method looks like this,

    [WebMethod]

    [TraceExtension]

    public DataSet GetPeerList(DataSet dsEquityPeerCriteriaSet)

    {

    try

    {

    //Creating an object type of the Business

    Layer

    EquityPeerListManager equityPeerListManager

    =new EquityPeerListManager();

    ....

    ....

    return peerListsSet.DataSet;

    }

    catch(Exception ex)

    {

    SoapException Se = new SoapException

    (ex.Message,SoapException.ClientFaultCode,ex.InnerException);

    throw Se;

    }

    }

    The problem is that, the DataSet object comes as undefined when entering the

    Web Method. We've also created a SOAP Extension class and debugged the SOAP

    message chain. The data is present in both

    SoapMessageStage.BeforeDeserialize and SoapMessageStage.AfterDeserialize

    stages and we're able to see the data in the log file.

    This behavior looks very strange. If you can provide a pointer, that would

    help us a lot.

    Thanks and appreciate your response.

    Thanks again.
    Steven, Jan 22, 2004
    #1
    1. Advertising

  2. Steven

    Alvin Bruney Guest

    Did you get help on this?

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "Steven" <> wrote in message
    news:...
    > Hi all
    >
    > My problem is a little lengthy. But please help me. In my application,
    > ADO.NET DataSet object is not getting constructed in the Web Service Web
    >
    > Method called by the Windows Application passing an ADO.NET DataSet Object
    > as a parameter to the Web Method in Web Service
    >
    > Debugging using the Soap Extensions, clearly shows that the Serialized
    > DataSet is passed to the Web Service, but the Web Service Web Method is

    not
    > able to construct the ADO.NET DataSet from the Serialized Data.
    >
    > I am hereby giving a brief overview of what I am doing.
    >
    > We're developing a WindowsForms based distributed application. All our
    >
    > WindowsForms clients connect to the business components layers using Web
    >
    > Service. Therefore, the front-end only talks to the Web Service and Web
    >
    > Service calls the Business and Data Layer components. Since the Web

    Service
    >
    > Layer acts as a gateway between the WindowsForms clients and the business
    >
    > components, We pass all the data using DataSets.
    >
    > Here is the code snippet,
    >
    > private void LoadGroup(string ticker)
    >
    > {
    >
    > //We're creating an object of a stronly typed
    >
    > DataSet
    >
    > EquityPeerCriteriaSet equityPeerCriteriaSet = new
    >
    > EquityPeerCriteriaSet();
    >
    >
    > //We're setting the properties of the strongly typed
    >
    > DataSet
    >
    > equityPeerCriteriaSet.CriteriaType ="Ticker";
    >
    > equityPeerCriteriaSet.CriteriaValue =m_ticker;
    >
    >
    > //We're creating the Web Service's proxy object
    >
    >
    > WebReferences.EquityPeerListService.EquityPeerListMgmtService
    >
    > equityPeerListService= new
    >
    > WebReferences.EquityPeerListService.EquityPeerListMgmtService();
    >
    > //We're calling the web method and passing the
    >
    > DataSet from
    >
    > Dataset DspeerListsSet =
    >
    > equityPeerListService.GetPeerList(equityPeerCriteriaSet);
    >
    > ...
    >
    > ...
    >
    > }
    >
    >
    >
    > Our Web Method looks like this,
    >
    > [WebMethod]
    >
    > [TraceExtension]
    >
    > public DataSet GetPeerList(DataSet dsEquityPeerCriteriaSet)
    >
    > {
    >
    > try
    >
    > {
    >
    > //Creating an object type of the Business
    >
    > Layer
    >
    > EquityPeerListManager equityPeerListManager
    >
    > =new EquityPeerListManager();
    >
    > ...
    >
    > ...
    >
    > return peerListsSet.DataSet;
    >
    > }
    >
    > catch(Exception ex)
    >
    > {
    >
    > SoapException Se = new SoapException
    >
    > (ex.Message,SoapException.ClientFaultCode,ex.InnerException);
    >
    > throw Se;
    >
    > }
    >
    > }
    >
    > The problem is that, the DataSet object comes as undefined when entering

    the
    >
    > Web Method. We've also created a SOAP Extension class and debugged the

    SOAP
    >
    > message chain. The data is present in both
    >
    > SoapMessageStage.BeforeDeserialize and SoapMessageStage.AfterDeserialize
    >
    > stages and we're able to see the data in the log file.
    >
    > This behavior looks very strange. If you can provide a pointer, that would
    >
    > help us a lot.
    >
    > Thanks and appreciate your response.
    >
    > Thanks again.
    >
    >
    Alvin Bruney, Jan 24, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Catherine Jones

    Please help urgently

    Catherine Jones, Dec 23, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    596
    Willy Denoyette [MVP]
    Dec 24, 2003
  2. Kelly G.
    Replies:
    1
    Views:
    489
    Mark Alexander Bertenshaw
    Jan 9, 2004
  3. Luis Esteban Valencia
    Replies:
    3
    Views:
    1,643
    Thomas Dodds
    Sep 7, 2004
  4. KK
    Replies:
    2
    Views:
    556
    Big Brian
    Oct 14, 2003
  5. sunshine82

    please help for my exam ??? urgently

    sunshine82, Nov 11, 2007, in forum: C Programming
    Replies:
    0
    Views:
    320
    sunshine82
    Nov 11, 2007
Loading...

Share This Page