Return Dataset from Workflow driven web service

Last post 11-07-2009 9:29 PM by leroylll. 2 replies.

Sort Posts:

  • Return Dataset from Workflow driven web service

    11-07-2009, 12:36 PM
    • Member
      41 point Member
    • leroylll
    • Member since 05-23-2007, 4:36 AM
    • Posts 126

    Hi All,

    I was wondering, is it possible to return a dataset from a Windows Workflow Foundation driven web service?

    If so, wat should i do?

    Currently, my webservice is only able to return a parameter of type String only.

    Thank you for you help in advance.

    Best Regards,

    leroylll


  • Re: Return Dataset from Workflow driven web service

    11-07-2009, 1:05 PM
    Answer
    • Participant
      1,641 point Participant
    • vishwaraj1
    • Member since 11-07-2008, 7:44 PM
    • India
    • Posts 424


    yes it can be done like this...
        [WebMethod]
        public DataSet combo(int userid)
        {
            if (con.State == ConnectionState.Open)
            {
                con.Close();
            }
            con.Open();
            DataSet ds = new DataSet();
            SqlDataAdapter adapter = new SqlDataAdapter("select sessname from sessionrecord where 
    userid='" + userid + "' order by sessid desc", con); adapter.Fill(ds); con.Close(); return ds; } . if still it not return dataset then delete old webreference and add new webreference again... if still face the problem then please let me know...




    Regards:

    Vishwaraj Malik

    VB to C# Converter


    Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
  • Re: Return Dataset from Workflow driven web service

    11-07-2009, 9:29 PM
    • Member
      41 point Member
    • leroylll
    • Member since 05-23-2007, 4:36 AM
    • Posts 126

    hi vishwaraj,

    I'm currently using Windows Workflow foundation to create the code for the webservice.

    There is no such place in the code file where i can put this at the moment.

    The WebServiceOutputActivity does not allow me to define the returnValue to anything other than a parameter of type String.

    Please kindly assist.

    Best Regards,

    leroylll

Page 1 of 1 (3 items)