如何使用 wsimport 忽略 BP1.1 合规性错误?
我正在尝试使用 wsimport
(JDK 6) 导入 WSDL。
然而,这失败了,告诉我:
关闭 BP 1.1 一致性警告
如何在 wsimport
中配置这些警告?
我尝试使用以下命令运行 wsimport:
wsimport http://tripauthority.com/hotel.asmx?WSDL
但它只回复:
它不符合 WS-I BP 1.1:wsdl 绑定具有混合样式,它必须是 rpc-literal 或 document-literal 操作。尝试使用 -extension 开关运行 wsimport。
我尝试添加标志 -extension
但 wsimport 仍然无法完成(也许我做错了?):
wsimport http://tripauthority.com/hotel.asmx?WSDL -extension
任何人都可以帮忙吗?谢谢
。我无法使用 Eclipse 的向导来使用 WSDL 创建 Web 客户端,因为这将在不允许 rmi
包的 Google App Engine 上运行。除非有办法告诉这个向导不要使用 RMI,我也对此感兴趣。
更新
供应商另外推荐了这一点,但同样,我不知道需要做什么这:
建议:为了使其一致,请更改 服务使用“rpc-literal”或“document-literal”SOAP 消息。你 需要向所有添加显式 Use=SoapBindingUse.Literal 属性 服务和方法级别属性:SoapRpcService、SoapRpcMethod、 SoapDocumentService、SoapDocumentMethod。
建议:要使绑定一致,请添加显式 SoapRpcMethod 或 SoapDocumentMethod 属性到此绑定的所有 WebMethod。
I'm trying to import a WSDL using wsimport
(JDK 6).
This fails, however, telling me to:
turn off BP 1.1 conformance warnings
How can I configure these in wsimport
?
I've tried running wsimport using:
wsimport http://tripauthority.com/hotel.asmx?WSDL
But it only replies:
its not WS-I BP 1.1 compliant: the wsdl binding has mixed style, it must be rpc-literal or document-literal operation. try running wsimport with -extension switch.
And I've tried adding the flag -extension
but wsimport still won't complete (maybe I'm doing it wrong?):
wsimport http://tripauthority.com/hotel.asmx?WSDL -extension
Can anyone help? Thanks
P.s. I can't use Eclipse's Wizard for creating web clients using a WSDL, since this will run on Google App Engine which doesn't allow the rmi
package. Unless there's a way to tell this Wizard not to use RMI, which I'd also be interested in.
Update
The supplier additionally recommends this, but again, I don't know what needs to be done for this:
Recommendation: To make it conformant change the implementation of the
service to use 'rpc-literal' or 'document-literal' SOAP messages. You
need to add explicit Use=SoapBindingUse.Literal property to all
service and method level attributes: SoapRpcService, SoapRpcMethod,
SoapDocumentService, SoapDocumentMethod.Recommendation: To make binding conformant add explicit SoapRpcMethod
or SoapDocumentMethod attribute to all WebMethods of this binding.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将 WSDL 下载到本地磁盘,并从绑定元素中删除名称为“SubmitRequestRpc”的操作(如果您不使用它们)。然后尝试使用本地修改的文件进行 wsimport。
You could download the WSDL to your local disk and from the binding elements remove the operations whose names are "SubmitRequestRpc", if you're not using them. Then try wsimport with the local modified file.