borghard
asked on
Initialize a proxy class with a url from a C++ application
I created a C# web service application that is being consumed by a C++ application. I added the web Service as a web reference to the C++ application. I want to be able to pass in the url for the web service when I instantiate the web service in the C++ application.
I tried inheriting from the proxy class but did not have access to its Url property, so what do I have to do to gain access to the Url property of the proxy class?
Thanks
>>I tried inheriting from the proxy class but did not have access to its Url property
Seems that your non-public members in the base class are declared as 'private', not as 'protected'...
Seems that your non-public members in the base class are declared as 'private', not as 'protected'...
ASKER
The base class is the proxy class, It gets generated from my web service it seems that I don't have access to this Url porperty even within my web service.
The following is a declaration of the web service:
public class Service1 : System.Web.WebService
{
public Service1()
{
//CODEGEN: This call is required by the ASP.NET Web Services Designer
InitializeComponent();
//this.
}
}
So my question what class does my service have to inherit from to gain access to the Url property.
The following is a declaration of the web service:
public class Service1 : System.Web.WebService
{
public Service1()
{
//CODEGEN: This call is required by the ASP.NET Web Services Designer
InitializeComponent();
//this.
}
}
So my question what class does my service have to inherit from to gain access to the Url property.
WebService does not have an URL property - accodring to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebserviceswebservicememberstopic.asp
ASKER
I did see in some book an example of changing the Url property of a web service that inherits from the following class: System.Web.Services.Protoc ols.SoapHt tpClientPr otocol
when I tried inheriting from that class I was able to see the Url property but only within the service itself, it did not show up in the proxy class, so I had no access to it from the C++ application so How do I gain access to this property?
when I tried inheriting from that class I was able to see the Url property but only within the service itself, it did not show up in the proxy class, so I had no access to it from the C++ application so How do I gain access to this property?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you need to get a data member value, then you should add a method to the class, that will return the value you're trying to retrieve.