我对 Web 服务相对较新,但我需要在我的应用程序中集成对现有服务的调用。理想情况下,我希望使用 JAX-WS,因为我正在寻找最简单、开发最快的解决方案,并且 MyEclipse 能够从 WSDL 生成 JAX-WS 客户端。不幸的是,我继承的 WSDL 似乎是使用 RPC 从 Axis 构建的。这仍然有效吗?当尝试生成代码时,我收到这些错误,并且我发现的网络搜索似乎表明它是需要升级的服务端:
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="impl:MyTypeList[]" />
</restriction>
-
WS-I:(BP2108)数组声明使用 - 限制或extends - 在类型声明中使用soapEnc:Array 类型或wsdl:arrayType 属性
WS-I:(BP2122) wsdl:types 元素包含不是 XML 模式定义的数据类型定义
<块引用>
WS-I:( BP2122
-
WS-I:(BP2406)soapbind:body、soapbind:fault、soapbind:header 和soapbind:headerfault 的 use 属性没有“literal”值。
WS-
I'm relatively new to web services, but I need to integrate a call to an existing service in my application. Ideally, I'd like to use JAX-WS because I'm looking for the simplest, quickest-to-develop solution on my end, and MyEclipse is able to generate a JAX-WS client from a WSDL. Unfortunately, the WSDL I've inherited was built from what appears to be Axis using RPC. Will this still work? When trying to generate the code, I get these errors, and the web searches I've found seem to say that it's the service end that needs to upgrade:
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="impl:MyTypeList[]" />
</restriction>
-
WS-I: (BP2108) An Array declaration uses - restricts or extends - the soapEnc:Array type, or the wsdl:arrayType attribute is used in the type declaration
-
WS-I: (BP2122) A wsdl:types element contained a data type definition that is not an XML schema definition
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://ws.host.com" use="encoded" />
-
WS-I: (BP2406) The use attribute of a soapbind:body, soapbind:fault, soapbind:header and soapbind:headerfault does not have value of "literal".
发布评论
评论(1)
您知道该服务使用的 Axis 版本是什么?
最好的选择是使用与服务所使用的相同版本的 Axis 生成客户端。这绝对是开发最快的解决方案。使用 JAX-WS 将不起作用。
Do you know what version of Axis was used by the service?
Your best bet is to generate a client using the same version of Axis that was used by the service. This is definitely the quickest-to-develop solution. Using JAX-WS will not work.