473,395 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Web Service Namespace Issue

I need opinions regarding Web Service Namespace usage and/or suggestions
regarding how to handle deployment.

Our web service application will exist in two different domains and is
likely to exist in multiple domains. There is a prevailing opinion here at
my office that the Web Service Namespace should match the domain where it is
installed. From what I have read, the Namespace simply needs to be unique
and does not necessarily need to match the domain name where the service
resides. Regardless, the decision has been made that the Namespace is to
match the domain it is installed.

Given that edict, our department has directed me to figure out how to
configure the Namespace dependent upon its installed domain name. For
example, they would like to put an entry into the Web.config file that would
determine the Namespace for the Web Service. Ideally, the Web Service
application could read the Web.config file to obtain the Namespace value and
assign this to the WebService() attribute.

[WebService(Namespace="http://www.mydomain.com/myws")]
[WebService(Namespace="http://www.myotherdomain.com/myws")]

Despite the edict, I have no idea how to do this. As far as I can tell, the
Attribute for the Namespace is hardcoded, it is a constant that is compiled
into the service, it is static and unchanging once the application is built.
I did try to assign a variable to the attribute—from a value which I tried to
retrieve from the Web.config file with the following statement:
[WebService(Namespace=ConfigurationSettings.AppSett ings["ServiceNamespace"])].
However (and not too surprisingly), I received an error from Visual Studio
that it expected a constant.

My questions are:

1. Is there anyway to base the namespace name upon a value that is only
defined at run time?
2. Are there any other suggestions regarding how to handle this issue?

The only other way I can think of handling this is to make separate builds,
one for each domain it is installed, which management has ruled is out of the
question. Any help regarding this matter will be greatly appreciated.

Thanks.

--Charles Leonard

Nov 21 '05 #1
0 2809

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Nathan Kovac | last post by:
I have a feeling I am missing something simple, but I just can't find it. Perhaps someone can give me a lead on where to look. I will describe the issue then post my code to the web service. My...
3
by: Paul Michaud | last post by:
Consider the following: Class A { .... } Class B:A { ....
7
by: Railinc | last post by:
Hi... I'm trying to write a web service client and am running into a problem with getting a response back from the server. I know that a full xml message is being returned (thanks to a tcp/ip...
2
by: Richard Collette | last post by:
Hi, I have a service, that runs perfectly when executed outside of the web service environment. When called as a web service I get the exception listed below sporadically. A call to the web...
0
by: ben | last post by:
OK so there are a few things going on. I succesfully created a SOAP webreference in VS IDE which when built works fine under small amounts of load, however under heavy amounts of load we start to...
11
by: David R | last post by:
This is a repost, with additional information. I have a Net 2.0 client (C# Winform) calling an Axis web service. The .NET client can authenticate, create requested objects, serialize the objects...
8
by: Doogie | last post by:
You know they say there is no such thing as a dumb question? This might be the exception...I'm not sure. :) In VS.NET 2003, if you create a web service it is namespaced like so: namespace...
3
by: =?Utf-8?B?UGllcnJl?= | last post by:
Hello, I have a .NET 2.0 web service that is consumed by a Delphi application. The Delphi application calls a method from the .NET web service with parameters. Theses parameters are in the...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.