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

x
?
Solved

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

Posted on 2004-10-27
8
Medium Priority
?
212 Views
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?

Thanks
 
0
Comment
Question by:borghard
[X]
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
8 Comments
 
LVL 30

Expert Comment

by:Axter
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.
0
 
LVL 86

Expert Comment

by:jkr
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'...
0
 

Author Comment

by:borghard
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
                  InitializeComponent();
                  //this.
            }
}

So my question what class does my service have to inherit from to gain access to the Url property.
0
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

by:jkr
ID: 12424636
0
 

Author Comment

by:borghard
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?
0
 

Accepted Solution

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

modulo
Community Support Moderator
0

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