简体   繁体   中英

Best approach for setting ASMX Namespace for multiple services

I have a number of different ASMX services running on a single domain. Is the best approach to set a different namespaces for each service ?

[WebService(Namespace = "http://www.mydomain.com/MyXmlService/")]
[WebService(Namespace = "http://www.mydomain.com/MyTestService/")]
[WebService(Namespace = "http://www.mydomain.com/MyBookingService/")]

Is the following a recommended approach, even though the url http://www.mydomain.com/MyXmlService/ doesn't point to the actual service which in this case is

http://www.mydomain.com/MyXmlService/Xml.asmx

I would just use:

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

And if you're building these in a large organisation:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM