gpt4 book ai didi

java - 如何使用 wsimport 忽略 BP1.1 合规性错误?

转载 作者:太空宇宙 更新时间:2023-11-04 08:23:38 26 4
gpt4 key购买 nike

我正在尝试使用 wsimport (JDK 6) 导入 WSDL。

然而,这失败了,告诉我:

turn off BP 1.1 conformance warnings

如何在 wsimport 中配置这些?

我尝试使用以下方式运行 wsimport:

wsimport http://tripauthority.com/hotel.asmx?WSDL 

但它只回复:

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.

我尝试添加标志 -extension 但 wsimport 仍然无法完成(也许我做错了?):

wsimport http://tripauthority.com/hotel.asmx?WSDL -extension

有人可以帮忙吗?谢谢

P.s.我无法使用 Eclipse 的向导来使用 WSDL 创建 Web 客户端,因为这将在不允许 rmi 包的 Google App Engine 上运行。除非有办法告诉这个向导不要使用 RMI,我对此也很感兴趣。

更新

供应商还建议这样做,但同样,我不知道为此需要做什么:

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.

最佳答案

您可以将 WSDL 下载到本地磁盘,并从绑定(bind)元素中删除名称为“SubmitRequestRpc”的操作(如果您不使用它们)。然后尝试使用本地修改的文件进行 wsimport。

关于java - 如何使用 wsimport 忽略 BP1.1 合规性错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9021240/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com