• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • 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?

Thanks
 
0
borghard
Asked:
borghard
1 Solution
 
AxterCommented:
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.
0
 
jkrCommented:
>>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'...
0
 
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
                  InitializeComponent();
                  //this.
            }
}

So my question what class does my service have to inherit from to gain access to the Url property.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
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?
0
 
moduloCommented:
PAQed with points refunded (250)

modulo
Community Support Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

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