Groups | Blog | Home
all groups > dotnet web services > february 2006 >

dotnet web services : Centralised NameSpace for WSs



Pierre
2/9/2006 7:11:06 AM
Hi everybody,

I'm trying to clean my code a bit and I couldn't manage to centralise
the location of my services' namespace.

I tried that:
[WebService(Namespace =
(string)ConfigurationSettings.AppSettings["Namespace"])]

Here is the error I get in VS 2005:
Error 74 An attribute argument must be a constant expression, typeof
expression or array creation
expression C:\Inetpub\wwwroot\Hss.Com.WebServices\Manage_Employee.asmx

If somebody has managed to do something like that or see how this would
be possible, I'd appreciate a litle help.

Thank you for your comment, remarks and help.

Reguards,
Robert Wilczynski
2/9/2006 3:57:36 PM
Hi,

Try doing this:

public static class Namespaces
{
public const string WebService = "urn:anything:com";
}

[WebService(Namespace = Namespaces.Webservice)]

Best regards,
Robert Wilczynski.

[quoted text, click to view]

Pierre
2/22/2006 2:28:26 AM
Hi,

Thank you very much for that wonderfull piece of code Robert.

Best regards,
Pierre
Pierre
2/22/2006 2:28:37 AM
Hi,

Thank you very much for that wonderfull piece of code Robert.

Best regards,
Pierre
AddThis Social Bookmark Button