http //tempuri.org/ in Web services?

僤鯓⒐⒋嵵緔 提交于 2021-02-08 10:00:26

问题


I am working on webservices. but i dont understand why does http://tempuri.org exist.i have go through some of the articles and came to know that it is used for uniqueness. when i click on that link it is redirecting to bing.

Plese explain how does it works? why it is not used in WCF?


回答1:


From Wikipedia

Each XML Web service needs a unique namespace in order for client applications to distinguish it from other services on the Web. tempuri.org is the test default namespace URI used by Microsoft development products, like Visual Studio. It is available for XML Web services that are under development, but published XML Web services should use a more permanent namespace. The term is strictly a placeholder and all instances of it should be replaced with a more meaningful URI in production systems.

Since Microsoft owns tempuri.org, but it's only intended as a placeholder, they figured they would redirect it to a site they actually want you to use.




回答2:


Setting Namespace on WorkflowServiceBehavior should definetly work,unless someother part of code is resetting it to null through servicedescription.Namespace but I will validate it. But to unblock you please try the following.

workflowServiceHost.Description.Namespace = "";; and see it works for you?

Nazim Ali




回答3:


It's the default namespace used for schema and metadata documents when you do not explicitly specify one yourself. For example, when u mark a class with the DataContract attribute bur don't supply a value for the Namespace property. Same goes for an OperationContract, MessageContract, etc.



来源:https://stackoverflow.com/questions/21771072/http-tempuri-org-in-web-services

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!