如果我向枚举类型添加新的可能值,这会改变我的 wsdl 吗?
我有一个网络服务,并且在其中使用枚举类型。我对代码进行了一些更改,并向枚举类型添加了新值。这会改变我的 wsdl 声明吗?这会破坏所有使用我的网络服务的客户端吗?我使用 .NET
提前致谢!
I have a web service and I'm using an enum type in it. I have made some changes in my code and i added a new value to my enum type. Is this going to change my wsdl declaration ? And is that going to break all the clients that use my web service ? I use .NET
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它将改变您的 WSDL。
然而,它很可能不会“破坏”您的客户。
OTOH,如果您不希望客户端看到新的枚举值,那么您不应该包含它:创建两种枚举类型:一种在内部使用,一种从 Web 服务返回。从一种转换为另一种。
It will change your WSDL.
However, it won't "break" your clients, in all likelihood.
OTOH, if you don't want clients to see the new enum value, then you should not include it: create two enum types: one to be used internally, and one to be returned from the web service. Convert from one to the other.
是的,它会更改您的 wsdl,但只要将新的枚举值添加到枚举的末尾,就会以不间断的方式更改。新客户将无法提交该枚举,除非他们更新其服务引用。
Yes, it changes your wsdl, but in a non-breaking way as long as the new enum value is added to the end of the enum. Newer clients won't be able to submit that enum unless they update their service references.