473,473 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Dynamic switch web service at runtime

1 New Member
Hi all,

I am consuming two web services that are identical but on different servers. The WSDL is the same except for URL and namespace.

Normally I could just add a web reference and swap URL at runtime but I cant do this because namespace is different in my situation.

So what I tried was this: I created 3 classes from the wsdl.exe tool.
1. class generated from 1st service.
2. class generated from 2nd service.
3. interface created using /serverinterface flag from passing in 1st service wsdl.
I then modified the 2 auto generated proxy classes to implement the interface.

The SoapRpcMethodAttribute in the interface has the 1nd service's namespace.

When i'm switching at runtime, using the interface to call the 2nd service, would it use the SoapRpcMethodAttribute defined in the 2nd service class or the one defined in my interface?
Aug 16 '08 #1
0 1003

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Demetri | last post by:
Is it possible to add a web service reference during runtime? If so, how? -- -Demetri
15
by: rwf_20 | last post by:
I just wanted to throw this up here in case anyone smarter than me has a suggestion/workaround: Problem: I have a classic producer/consumer system which accepts 'commands' from a socket and...
5
by: Kimba | last post by:
Hi. Using VStudio I have developed a WebService which I placed onto several servers. However my application can only access one on server. During runtime, I tried to change the URL of the...
2
by: Luis Arvayo | last post by:
Hi, In c#, I need to dynamically create types at runtime that will consist of the following: - inherits from a given interface - will have a constructor with an int argument
4
by: Zark3 | last post by:
Hi all, I was wondering if anybody could enlighten me on the possibility of dynamic casting. Or, well, whether or not I'm actually trying to do this the right way. What I have is a base class...
2
by: James | last post by:
Hello, I have an existing MFC C++ project which I need to add the ability of sending WSDL calls out to a web service. When this project is deployed the web service URL will always change...
3
by: cwertman | last post by:
I have a question regarding dynamic properties. I have an Object say Account --Id --Prefix --Fname --Lname --Suffix
13
by: DaTurk | last post by:
Hi, This is a question brought about by a solution I came up with to another question I had, which was "Dynamic object creation". So, I'm curious if you can dynamically cast an object. If you...
1
by: webServiceHelp | last post by:
hi... I have deployed a web service ..generated wsdl. but i can't understand how to do my ultimate job. I want to do the following.. 1) The Requestor would find "the Service" from the "UDDI...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.