我需要为后端使用旧式RPC /编码的WSDL Web服务.起初我尝试使用Apache CXF和JAX-WS,但JAX-WS wsimport工具不使用rpc/enoded WSDL.
[错误] JAXWS 2.0不支持rpc/encoded wsdls.
我也对使用JAX-RPC做这项工作有疑问,因为它已经过时了.Axis 1.4是5年的工具.
目前我看到这三个选项:
javax.xml.ws.Dispatch来发送和接收SOAP和某种方式解析它,一个例子这些都听起来不太好,所以如果你能提供一些好的线索,想要做什么以及如何解决它,我将不胜感激.
我有WSDL以下格式的网址,似乎是正确的.使用后,wsimport在终端解析,我得到一个错误:
从终端运行:
tux-world@alachiq:~/Desktop/Project/java > wsimport -keep -s wsdl/ example.com/wsdl/wsdl.php?wsdl
parsing WSDL...
[ERROR] "Use of SOAP Encoding is not supported.
SOAP extension element on line 59 in example.com/wsdl/wsdl.php?wsdl has use="encoded" "
Failed to parse the WSDL.
Run Code Online (Sandbox Code Playgroud)
解析的WSDL:
<?xml version="1.0" encoding="ISO-8859-1"?>
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:tsmswsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:tsmswsdl">
<types>
<xsd:schema targetNamespace="urn:tsmswsdl"
>
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
<xsd:complexType name="outGetMessages">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:string[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
</types>
<message name="GetMessagesRequest"> …Run Code Online (Sandbox Code Playgroud)