client ----> .NET class libray-----> Secured Web Services

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dorandoran
    New Member
    • Feb 2007
    • 145

    client ----> .NET class libray-----> Secured Web Services

    1. Created a WebService
    2. Create a Class Library and add web reference (#1)
    I did this in the Class Library
    public class MyWebServiceWra pper
    {
    private MyWebService obj = new MyWebService();

    public MyWebServiceWra pper()
    {
    obj.Url = ConfigurationMa nager.AppSettin gs["MyUrl"];
    }

    public void WebMethodA() //same name as in the web services
    {
    obj.WebMethodA( );
    }
    }


    I did this in the client (test client is winform). (by the way, system.web.serv ices is deleted from reference)

    MyWebServiceWra pper obj = new MyWebServiceWra pper();
    datagridview.da tasource = obj.WebMethodA( ); - GETTTING THIS ERROR "cannot implicitly convert void to object

    What to do????????????? ??????????????? ?????
  • dorandoran
    New Member
    • Feb 2007
    • 145

    #2
    ust noticed that. I guess when you are too busy you tend miss small stuff. here is the new code
    class library code (added namespace using System.Data;)
    public dataset MethodA()
    {
    return myWebServices.M ethodA()
    }
    Now it's working.

    Comment

    Working...