Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Definition of the namespace
Message
De
15/04/2009 04:30:09
 
 
À
15/04/2009 02:05:13
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01394903
Message ID:
01394911
Vues:
53
>On top of each Web Service, I have something like that:
>
>
>Imports System.Web.Services
>Imports System.Web.Services.Protocols
>Imports System.ComponentModel
>Imports System.IO
>Imports System.XML
>Imports System.Data
>
>Namespace MyNamespaceHere
>
>    ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
>    ' <System.Web.Script.Services.ScriptService()> _
>    <System.Web.Services.WebService(Namespace:="http://www.myWebSite.com/WebService/MyWebService")> _
>    <System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
>    <ToolboxItem(False)> _
>    Public Class MyClass
>        Inherits Framework.Framework.LXWebService
>
>
>So far, the namespace was the default one when we create a Web Service. This has worked ok and still works ok when we use the Web Service on all of our five servers (Development, Acceptance, Test, Production, Backup). However, because of an issue, a client has requested to have the namespace to be adjusted to the site URL, the one from the production. So, I adjusted it. But, one client wishes to have the namespace definition to be adjusted dynamically to each server. We are talking about the System.Web.Services.WebService(Namespace:= line here. But, this is hardcoded as is in the code. Is there a way to have this value to be read from a configuration file? Because, otherwise, they have asked that we have a version for each server, which doesn't make any sense to me.

Using different XML namespaces for a web service depending on the server it is running from sounds like a potential nightmare. Can you explain why they want this ?

Regards,
Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform