WSDL 更改后 Apache Axis 失败
我有一个由 .net 应用程序提供的 SOAP Web 服务。有时我们会添加一些对象定义,但这些定义始终是可选的,并且从 XML/HTTP 的角度来看,表示这些字段的 xml 标记可以被省略,并且可以正常工作。这应该可以让 Web 服务的现有用户继续工作。
这正是它对几乎每个人都有效的方式。使用.net、python、ruby等的客户端都没有问题。但任何改变似乎都会让任何在 Java 中使用 Apache Axis2 的人崩溃。
似乎在每次请求时,Axis 都会检查端点 WSDL 并验证它是否与它所拥有的存根完全一样。如果不是,那么它会抛出异常。 (意外的子元素)
Axis 中是否有任何选项可以关闭此功能并让 Axis 假设其当前存根是正确的?
更新: 我还应该注意到,这对于使用 ColdFusion 的客户端来说是一个问题,因为它使用 Axis2
I have a SOAP web service served from a .net app. Sometimes we add to some of the object definitions but these are always optional and from a XML/HTTP standpoint the xml tags that represent those fields could be left out and it works fine. This should let existing users of the web services keep working.
and this is exactly how it does work for almost everyone. Clients using .net, python, ruby etc all have no problem with this. But any change at all seems to break anyone using Apache Axis2 in Java.
It seems that on every request Axis checkes the endpoints WSDL and verifies that it is EXACTLY like the stubs it has. If not then it throws an exception. (unexpected subelement)
Is there any option in Axis to turn this feature off and have Axis just assume it's current stubs are correct?
UPDATE:
I should also note that this is a problem for clients using ColdFusion since it uses Axis2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于 Apache CXF,默认情况下,它也可能会由于它不理解的元素而引发异常。但是,您可以将“set-jaxb-validation-event-handler”的属性设置为“false”
在端点上,它将被忽略。
With Apache CXF, by default, it would also likely throw an exception due to an element it doesn't understand. However, you can set a property of "set-jaxb-validation-event-handler" to "false"
on the endpoint and it would be ignored.
因此,我从客户的角度对此进行远程调试。我一切都已启动并运行,并且能够使用旧版本的 Axis2 (1.2) 重现该错误。我拥有的最新版本(1.5.4)似乎没有这个问题(使用 ADB 绑定),因此对于直接使用 Axis 的客户来说,升级是一个很好的解决方法。不幸的是,我们的许多客户正在使用内置了旧版本的 ColdFusion,因此我必须弄清楚如何处理它们。
So, I'm kind of remote debugging this from our clients perspective. I Got everything up and running and was able to reproduce the error with an older version of Axis2 (1.2). The newest version I have (1.5.4) does not seem to have this problem (using ADB bindings) So upgrading is a good workaround for our clients using Axis straight up. Unfortunately a number of our clients are using ColdFusion which has the older version built in so I'll have to figure out what to do about them.