我已經嘗試了PassThroughu代理教程,並且都使用構建目標Web服務部署在Axis(Apache CFX)上的示例。源代碼和代理Web服務很好地在WSO2 ESB上使用「TryIt」進行測試。在WebLogic(Spring)Web服務上使用WSO2 ESB PassThrough代理
現在不同的故事 - 我試圖達到同樣的使用非常簡單的Weblogic的Spring Web服務(我不相信春天的使用和自下而上的方法和說明問題)。它部署在WebLogic服務器上(與WSO2 ESB在同一主機上運行)。沒有包含任何特殊的WS- *擴展。這幾乎是你好世界的Web服務。我可以輕鬆測試SoapUi,UniversalTestClient(WebLogic)並在瀏覽器中查看WSDL。
關於產生代理傳遞Web服務(隨後從教程相同的步驟),我還可以看到生成的WSDL:
http://localhost:8280/services/WebServiceAServicePassThroughProxy?wsdl
但是沒有了SoapUI也不TryIt工作,都返回FaultString:
The endpoint reference (EPR) for the Operation not found is /services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpSoap11Endpoint and the WSA Action = . If this EPR was previously reachable, please contact the server administrator.
這裏是我用於測試「findContactById」的函數:
<body>
<p:findContactById xmlns:p="http://webservicea.testtoold.xx.yy.zz.eu/">
<!--Exactly 1 occurrence-->
<arg0>1</arg0>
</p:findContactById>
</body>
wh它在代理Web服務上運行。我試着在代理Web服務生成的所有端點,誤差同上,除非如果我嘗試從httpEndpoint下拉:
http://localhost:8280/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpEndpoint
然後我得到不支持的媒體類型爲TryItProxyError。
任何人都請幫助,我越來越堅果與此...應該是簡單的,而不是噩夢。搜索所有的網絡,我看到幾個沒有答案的類似問題。
的WebLogic服務WSDL:
<?xml version='1.0' encoding='UTF-8'?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.8-b13937 svn-revision#13942. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.8-b13937 svn-revision#13942. --><definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservicea.testtoold.xx.yy.zz.eu/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://webservicea.testtoold.xx.yy.zz.eu/" name="WebServiceAService">
<types>
<xsd:schema>
<xsd:import namespace="http://webservicea.testtoold.xx.yy.zz.eu/" schemaLocation="http://localhost:7001/TestToolD/WebServiceAService?xsd=1"/>
</xsd:schema>
</types>
<message name="findContactById">
<part name="parameters" element="tns:findContactById"/>
</message>
<message name="findContactByIdResponse">
<part name="parameters" element="tns:findContactByIdResponse"/>
</message>
<message name="Exception">
<part name="fault" element="tns:Exception"/>
</message>
<message name="findAllContacts">
<part name="parameters" element="tns:findAllContacts"/>
</message>
<message name="findAllContactsResponse">
<part name="parameters" element="tns:findAllContactsResponse"/>
</message>
<portType name="WebServiceA">
<operation name="findContactById">
<input wsam:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findContactByIdRequest" message="tns:findContactById"/>
<output wsam:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findContactByIdResponse" message="tns:findContactByIdResponse"/>
<fault message="tns:Exception" name="Exception" wsam:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findContactById/Fault/Exception"/>
</operation>
<operation name="findAllContacts">
<input wsam:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findAllContactsRequest" message="tns:findAllContacts"/>
<output wsam:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findAllContactsResponse" message="tns:findAllContactsResponse"/>
<fault message="tns:Exception" name="Exception" wsam:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findAllContacts/Fault/Exception"/>
</operation>
</portType>
<binding name="WebServiceAPortBinding" type="tns:WebServiceA">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="findContactById">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="Exception">
<soap:fault name="Exception" use="literal"/>
</fault>
</operation>
<operation name="findAllContacts">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="Exception">
<soap:fault name="Exception" use="literal"/>
</fault>
</operation>
</binding>
<service name="WebServiceAService">
<port name="WebServiceAPort" binding="tns:WebServiceAPortBinding">
<soap:address location="http://localhost:7001/TestToolD/WebServiceAService"/>
</port>
</service>
</definitions>
WSO ESB生成PassThroughProxy.wsdl
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:tns="http://webservicea.testtoold.xx.yy.zz.eu/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://webservicea.testtoold.xx.yy.zz.eu/">
<wsdl:types>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified">
<xsd:import namespace="http://webservicea.testtoold.xx.yy.zz.eu/" schemaLocation="WebServiceAServicePassThroughProxy?xsd=http://localhost:7001/TestToolD/WebServiceAService?xsd=1.xsd"></xsd:import>
</xsd:schema>
</wsdl:types>
<wsdl:message name="findContactById">
<wsdl:part name="parameters" element="tns:findContactById"></wsdl:part>
</wsdl:message>
<wsdl:message name="findContactByIdResponse">
<wsdl:part name="parameters" element="tns:findContactByIdResponse"></wsdl:part>
</wsdl:message>
<wsdl:message name="findAllContacts">
<wsdl:part name="parameters" element="tns:findAllContacts"></wsdl:part>
</wsdl:message>
<wsdl:message name="findAllContactsResponse">
<wsdl:part name="parameters" element="tns:findAllContactsResponse"></wsdl:part>
</wsdl:message>
<wsdl:portType name="WebServiceAServicePassThroughProxyPortType">
<wsdl:operation name="findContactById">
<wsdl:input message="tns:findContactById"></wsdl:input>
<wsdl:output message="tns:findContactByIdResponse" wsaw:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findContactByIdResponse"></wsdl:output>
<wsdl:fault message="tns:Exception" name="Exception" wsaw:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findContactById/Fault/Exception"></wsdl:fault>
</wsdl:operation>
<wsdl:operation name="findAllContacts">
<wsdl:input message="tns:findAllContacts"></wsdl:input>
<wsdl:output message="tns:findAllContactsResponse" wsaw:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findAllContactsResponse"></wsdl:output>
<wsdl:fault message="tns:Exception" name="Exception" wsaw:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findAllContacts/Fault/Exception"></wsdl:fault>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WebServiceAServicePassThroughProxySoap11Binding" type="tns:WebServiceAServicePassThroughProxyPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
<wsdl:operation name="findContactById">
<soap:operation soapAction="" style="document"></soap:operation>
<wsdl:input>
<soap:body use="literal"></soap:body>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"></soap:body>
</wsdl:output>
<wsdl:fault name="Exception">
<soap:fault use="literal" name="Exception"></soap:fault>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="findAllContacts">
<soap:operation soapAction="" style="document"></soap:operation>
<wsdl:input>
<soap:body use="literal"></soap:body>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"></soap:body>
</wsdl:output>
<wsdl:fault name="Exception">
<soap:fault use="literal" name="Exception"></soap:fault>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="WebServiceAServicePassThroughProxySoap12Binding" type="tns:WebServiceAServicePassThroughProxyPortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap12:binding>
<wsdl:operation name="findContactById">
<soap12:operation soapAction="" style="document"></soap12:operation>
<wsdl:input>
<soap12:body use="literal"></soap12:body>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"></soap12:body>
</wsdl:output>
<wsdl:fault name="Exception">
<soap12:fault use="literal" name="Exception"></soap12:fault>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="findAllContacts">
<soap12:operation soapAction="" style="document"></soap12:operation>
<wsdl:input>
<soap12:body use="literal"></soap12:body>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"></soap12:body>
</wsdl:output>
<wsdl:fault name="Exception">
<soap12:fault use="literal" name="Exception"></soap12:fault>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="WebServiceAServicePassThroughProxyHttpBinding" type="tns:WebServiceAServicePassThroughProxyPortType">
<http:binding verb="POST"></http:binding>
<wsdl:operation name="findContactById">
<http:operation location="findContactById"></http:operation>
<wsdl:input>
<mime:content type="text/xml" part="parameters"></mime:content>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="parameters"></mime:content>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="findAllContacts">
<http:operation location="findAllContacts"></http:operation>
<wsdl:input>
<mime:content type="text/xml" part="parameters"></mime:content>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="parameters"></mime:content>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WebServiceAServicePassThroughProxy">
<wsdl:port name="WebServiceAServicePassThroughProxyHttpsSoap11Endpoint" binding="tns:WebServiceAServicePassThroughProxySoap11Binding">
<soap:address location="https://supercomputer:8243/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpsSoap11Endpoint"></soap:address>
</wsdl:port>
<wsdl:port name="WebServiceAServicePassThroughProxyHttpSoap11Endpoint" binding="tns:WebServiceAServicePassThroughProxySoap11Binding">
<soap:address location="http://supercomputer:8280/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpSoap11Endpoint"></soap:address>
</wsdl:port>
<wsdl:port name="WebServiceAServicePassThroughProxyHttpSoap12Endpoint" binding="tns:WebServiceAServicePassThroughProxySoap12Binding">
<soap12:address location="http://supercomputer:8280/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpSoap12Endpoint"></soap12:address>
</wsdl:port>
<wsdl:port name="WebServiceAServicePassThroughProxyHttpsSoap12Endpoint" binding="tns:WebServiceAServicePassThroughProxySoap12Binding">
<soap12:address location="https://supercomputer:8243/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpsSoap12Endpoint"></soap12:address>
</wsdl:port>
<wsdl:port name="WebServiceAServicePassThroughProxyHttpsEndpoint" binding="tns:WebServiceAServicePassThroughProxyHttpBinding">
<http:address location="https://supercomputer:8243/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpsEndpoint"></http:address>
</wsdl:port>
<wsdl:port name="WebServiceAServicePassThroughProxyHttpEndpoint" binding="tns:WebServiceAServicePassThroughProxyHttpBinding">
<http:address location="http://supercomputer:8280/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpEndpoint"></http:address>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
一些小備註:
- 差異本地主機和超級計算機不能的原因 - 教程與這種差異很好地工作
- 我嘗試了很多東西(在註冊表中或本地創建端點,在創建代理等時提供WSDL或不提供,但我總是得到相同的錯誤)。
- 我已經削減了30%的代碼行來簡化WSDL(保存和刪除功能)以達到允許的帖子大小。
- 嘗試添加動作的名稱,但無明顯差異(沒有他們保持例子)
HTTP更換
<handler class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher" name="SOAPMessageBodyBasedDispatcher"/>
: //stackoverflow.com/questions/18049942/the-endpoint-reference-epr-for-the-operation-not-found –