WSO2 API Manager版本:2.6.0
此链接建议可以从SOAP端点生成REST API:https://docs.wso2.com/display/AM260/Generate+REST+APIs+from+SOAP+Backends
但是当我选择Generate REST APIs选项时,WSO2 APIM不会按照wso2文档中的说明在Design API部分的API Definitions下生成操作,相反,此API部分使用Test URI按钮
显示WSDL URL当我单击“开始创建”按钮,显示为]时,我会看到INFO日志。
INFO-SOAPOperationBindingUtils在WSDL中找不到SOAP操作
请提供有关如何使用SOAP wsdl生成REST API的建议
下面是用于生成REST API的WSDL
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://www.r2services.com" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.r2services.com" name="CompanyService">
<types>
<xsd:schema>
<xsd:import namespace="http://www.r2services.com" schemaLocation="http://localhost:8080/r2ws/updateCompany?xsd=1" />
</xsd:schema>
</types>
<message name="updateCompany">
<part name="parameters" element="tns:updateCompany" />
</message>
<message name="updateCompanyResponse">
<part name="parameters" element="tns:updateCompanyResponse" />
</message>
<message name="R2Exception">
<part name="fault" element="tns:R2Exception" />
</message>
<message name="Exception">
<part name="fault" element="tns:Exception" />
</message>
<portType name="CompanyService">
<operation name="updateCompany">
<input wsam:Action="http://www.r2services.com/updateCompany" message="tns:updateCompany" />
<output wsam:Action="http://www.r2services.com/CompanyService/updateCompanyResponse" message="tns:updateCompanyResponse" />`enter code here`
<fault message="tns:R2Exception" name="R2Exception" wsam:Action="http://www.r2services.com/CompanyService/updateCompany/Fault/R2Exception" />
<fault message="tns:Exception" name="Exception" wsam:Action="http://www.r2services.com/CompanyService/updateCompany/Fault/Exception" />
</operation>
</portType>
<binding name="UpdateCompanyServicePortBinding" type="tns:CompanyService">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="updateCompany">
<soap12:operation soapAction="http://www.r2services.com/updateCompany" />
<input>
<soap12:body use="literal" />
</input>
<output>
<soap12:body use="literal" />
</output>
<fault name="R2Exception">
<soap12:fault name="R2Exception" use="literal" />
</fault>
<fault name="Exception">
<soap12:fault name="Exception" use="literal" />
</fault>
</operation>
</binding>
<service name="CompanyService">
<port name="UpdateCompanyServicePort" binding="tns:UpdateCompanyServicePortBinding">
<soap12:address location="http://localhost:8080/r2ws/updateCompany" />
</port>
</service>
</definitions>
WSO2 API Manager版本:2.6.0。此链接建议可以从SOAP端点生成REST API:https://docs.wso2.com/display/AM260/Generate+REST+APIs+from+SOAP+后端,但是当...
如果您选择Pass Through
选项,可能会发生这种情况。确保已选择Generate REST APIs
选项。