Wsdl (.net) 中的命名空间前缀
我的 wsdl 中的命名空间前缀是自动生成的:s1:、s2: 等,我如何为我的命名空间添加特定的前缀?
在任何地方都找不到它...
我是否必须覆盖 xml 序列化并手动添加它们(我如何在 .net webservices 中做到这一点?)
(我的意思是在 .net2.0 asmx 中,那些将要使用此网络服务说他们需要特定的前缀而不是 s1:对此我无能为力..) 非常感谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
抱歉,我没有时间查看完整示例,但请参阅 XmlNamespaceDeclarationsAttribute。您可以在要返回的类中包含一个属性,该属性将定义要使用的前缀。
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.