Namespace Prefixes in Wsdl (.net)

2019-04-15 15:28发布

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条回答
叼着烟拽天下
2楼-- · 2019-04-15 16:15

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.

查看更多
登录 后发表回答