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

x
?
Solved

dynamically reference a web service

Posted on 2010-11-15
4
Medium Priority
?
753 Views
Last Modified: 2012-06-21
let's say i have a console app written in c#, and part of the command line argument is the url of a web service (e.g. xxx.asmx) that i need to call.  would it be possible to dynamically reference the web service (WS) upon retrieving the url?  or do you must first do a service reference first?  
0
Comment
Question by:mmingfeilam
[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
  • 2
4 Comments
 
LVL 3

Expert Comment

by:JamesAperta
ID: 34141906
yes you can do that.  check out the following....

http://www.codeproject.com/KB/webservices/Dynamic_Invoke_webservice.aspx
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 34144001
you need to first add the web reference and at run time you replace the URL property of your reference. this exactly the same process as switching from development to production.
0
 

Author Comment

by:mmingfeilam
ID: 34151436
i  am sorry, the CTO had a change of heart, we are now using WCF services.  the method in the codeproject website doesn't work for WCF services.
0
 
LVL 3

Accepted Solution

by:
JamesAperta earned 2000 total points
ID: 34151540
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

650 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