Apache Axis WSDL2Java 错误 - 缺少;元素
我们正在我们的应用程序中集成第三方 SOAP Web 服务。 WSDL 与 SOAPUI 工具一起使用,示例请求和响应工作正常。
当我们尝试与 apache Axis 1.3 集成时,我们尝试了 WSDL2JAVA 与 WSDL。我们收到以下错误
java.io.IOException:错误:在绑定 saveRegistration 操作“serviceFault”中缺少元素 inFault“serviceFault” 在 org.apache.axis.wsdl.symbolTable.SymbolTable.faultsFromSOAPFault(SymbolTable.java:2858) 在 org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.java:2549) 在 org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:744) 在 org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:543) 在 org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518) 在 org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495) 在 org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361) 在 java.lang.Thread.run(未知来源)
有人已经遇到过这个问题并解决了吗?
We are integrating a third party SOAP web services in our application. The WSDL is used with SOAPUI tool, where sample requests and responses worked fine.
When we try to integrate with apache Axis 1.3, where we tried WSDL2JAVA with the WSDL. We received the following error
java.io.IOException: ERROR: Missing element inFault "serviceFault" in operation "serviceFault", in binding saveRegistration
at org.apache.axis.wsdl.symbolTable.SymbolTable.faultsFromSOAPFault(SymbolTable.java:2858)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.java:2549)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:744)
at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:543)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Unknown Source)
Anyone already faced this issue and solved?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信有一个针对此开放的 JIRA 。
描述:
当你有一个soap 1.2与soap错误绑定时,错误元素没有被正确提取,导致错误
他们的临时建议是添加一行代码并重新编译Axis1......不。
就个人而言,我刚刚下载了 wsdl 文件(它是 Axis 2 服务,我有一个 Axis 1.5 客户端)并编辑了以下所有行的命名空间: 到
:
正如建议的 此处。
然而,升级到 Axis2 是最佳的长期解决方案。解决此问题后,我在 WSDL2JAVA 生成的代码中发现了更多错误。
I believe that there is a JIRA open for this one.
Description:
When you have a soap 1.2 binding with soap fault, the fault element is not correctly extracted, resulting in error
Their temporary recommendation is adding a line of code and recompiling Axis1... Nahh.
Personally, I've just downloaded the wsdl file (it's an Axis 2 service and I have an Axis 1.5 client) and edited the namespace for all of the following lines from:
to:
As suggested here.
Upgrading to Axis2, however, is the best long term solution. After resolving this issue, I have found yet more errors in the code that WSDL2JAVA has generated.
我通过更改 XML 命名空间解决了这个问题,如下所示:
更改此
到
仅删除末尾的 12 。
I solved this problem by changing XML namespace as below:
Change this
to
only 12 at the end is removed.