Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / January 2007

Tip: Looking for answers? Try searching our database.

changing the web service namespace at runtime

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jonathan Eggert - 26 Mar 2005 01:02 GMT
Does anyone have a method for using a dynamically-generated namespace in a
web service?  

Scenario: suppose you're deploying the web service to mulitple servers and
you want the namespace to be generated at run-time to reflect the server or
domain where it resides.
Manohar Kamath - 26 Mar 2005 14:54 GMT
Question: Why would you want to do that? The reason you have namespace is to
distinctly identify the service. If two services are identical, regardless
of the server they run in, they should have the same namespace. Besides, the
namespace does not have to do with the URL, although URLs make good
"distinguishers" for similar services.

That said, I don't think there is a way to have a dynamic namespace
(although I am not certain). First of all, the WSDL is generated not at
run-time -- it is upon reflection of the wev service assembly. Second, the
proxies contain a reference namespace, and you may have to create one proxy
for each server, to account for different namespaces.

Signature

Manohar Kamath
Editor, .netWire
www.dotnetwire.com

> Does anyone have a method for using a dynamically-generated namespace in a
> web service?
>
> Scenario: suppose you're deploying the web service to mulitple servers and
> you want the namespace to be generated at run-time to reflect the server or
> domain where it resides.
Jonathan Eggert - 28 Mar 2005 17:19 GMT
I realize the purpose of namespaces but the convention is to use the URL to
distinguish services. If I would like to adhere to that rule, how could I
do that?  It appears that you can use a Constant or Enumeration to change
the value of the Namespace attribute, but not a value generated on the fly
(returned by a method). Does anyone have any experience with this?

I have two domains this.server.com and another.server.com

I want the namespace for the same service on a different server to be
reflected at runtime.

Example:

http://this.server.com/webservice/service.asmx

and

http://another.server.com/webservice/service.asmx

I want to generate the namespace depending on which server/domain the
service resides.
Squark - 11 Jan 2007 13:15 GMT
Hi

I have the same problem. I'm developing webservices and for this, I have 3 platforms: Development, Integration and Production. Now I want to set the namespace for the Services to [platform].[myCompanyName].[WebserviceName]. This is because the same webservice may be different between each platform. And when I want to promote it for ex. from int to prod I don't want to recompile the service. (Because this is a working build)

Is there really no possibility to do this?

Thx for your help!

From http://www.developmentnow.com/g/16_2005_3_0_0_370396/changing-the-web-service-na
mespace-at-runtime.ht


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.