• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

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?

1 Solution
It would help if you post the class declaration for the class you're referring to.

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.
>>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'...
borghardAuthor Commented:
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

So my question what class does my service have to inherit from to gain access to the Url property.
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

borghardAuthor Commented:
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.Protocols.SoapHttpClientProtocol
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?
PAQed with points refunded (250)

Community Support Moderator

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now