Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Initialize a proxy class with a url from a C++ application

Posted on 2004-10-27
Medium Priority
Last Modified: 2010-04-01

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?

Question by:borghard
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 30

Expert Comment

ID: 12421833
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.
LVL 86

Expert Comment

ID: 12422440
>>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'...

Author Comment

ID: 12424597
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.
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

LVL 86

Expert Comment

ID: 12424636

Author Comment

ID: 12424795
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?

Accepted Solution

modulo earned 0 total points
ID: 12723906
PAQed with points refunded (250)

Community Support Moderator

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question