Link to home
Start Free TrialLog in
Avatar of sweoff
sweoff

asked on

Consuming and creating a webservice refernce WITHOUT using the VS Studio option “Add Reference”?

I'm trying to create class/object and have it consume a web service from within the class/object WITHOUT using the VS Studio option “Add Reference”?
 
I’m trying to create a dll that developers can add to their project without having to add a web reference. I want my object/class to do it without them having to deal with it.
 
VB.NET syntax, but I would take C# example as well.
ASKER CERTIFIED SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sweoff
sweoff

ASKER

Thanks!
Avatar of sweoff

ASKER

Can I make a parameter within the class to pass the URL for the web Reference?
I would make it part of your constructor.

so Class MyWebServiceClass
{
  private string _URL;
  public string URL {get return _URL; }
  public MyWebService ws;

  MyWebService()
{
   ws = new MyWebService();
   _URL =  "defaulturl";
   ws.Url =  _URL
}

  MyWebService (string theUrl)
 {
   _URL = theUrl;
    ws = new MyWebService();
   ws.URL = _URL;
}
     
}

something like that . ..  all pseduo code.