Namespace Prefixes in Wsdl (.net)

孤者浪人 提交于 2019-12-22 00:07:09

问题


Namespace prefixes in my wsdl are automatically generated: s1:, s2:, etc, how can i put a specific prefix for my namespaces?

Can't find it anywhere...

Do i have to override the xml serialization and add them by hand (how do i do that in .net webservices?)

(i mean in .net2.0 asmx, the guys who are going to use this webservice say they need that specific prefix instead of s1: and there is nothing i can do about that..) Thank you very much!


回答1:


Sorry I don't have time for a full example, but see XmlNamespaceDeclarationsAttribute. You can include a property in the class you're returning that will define the prefixes to use.



来源:https://stackoverflow.com/questions/1271344/namespace-prefixes-in-wsdl-net

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