Wsdl (.net) 中的命名空间前缀

发布于 2024-08-02 05:01:39 字数 219 浏览 1 评论 0原文

我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

妥活 2024-08-09 05:01:39

抱歉,我没有时间查看完整示例,但请参阅 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文