質問

I have tried PassThroughu proxy tutorials and all works with build in example where Target Web Service is deployed on Axis (Apache CFX). Source and Proxy Web Service nicely gets tested using "TryIt" on WSO2 ESB.

Now different story - I try to achieve the same using very simple Weblogic Spring Web Service (i don't believe usage of Spring and bottom-up approach and annotations matter). It's deployed on the WebLogic server (running on the same host as WSO2 ESB). No any special WS-* extension included. It's almost hello world web service. I can easily test test it SoapUi, UniversalTestClient (WebLogic) and see WSDL in browser.

Regarding generated proxy PassThrough Web Service (followed same steps from tutorial) I can also see generated WSDL:

http://localhost:8280/services/WebServiceAServicePassThroughProxy?wsdl

However neither SoapUI nor TryIt work and both return 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.

Here is function I used for testing "findContactById":

 <body>
   <p:findContactById xmlns:p="http://webservicea.testtoold.xx.yy.zz.eu/">
      <!--Exactly 1 occurrence-->
      <arg0>1</arg0>
   </p:findContactById>
</body>

which operates on Proxy Web Service. I tried all endpoints that were generated in proxy web service, error is same as above unless if I try httpEndpoint from drop down:

http://localhost:8280/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpEndpoint 

then I get Unsupported Media Type as TryItProxyError.

Anyone please help, I am getting nuts with this... should be simple, not the nightmare. Searched all web i saw few similar questions with no answers.

WebLogic Service 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 Generated 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>

Few minor remarks:

  • differences in localhost and supercomputer can't be the cause - tutorials work well with such diffs
  • i tried lots of things (creating endpoint in registry, or locally, providing WSDL or not when creating proxy, etc etc, but I always get the identical error).
  • i have cut out 30% lines of code to simplify WSDL (save and delete functions) to reach allowed size of post.
  • tried adding action names but no difference (kept example without them)
役に立ちましたか?

解決

Since ESB 4.6, pass-through transport is enabled by default : The message body is not build so, SOAP Body based dispatching is not supported (can't use the first child node of SOAP body element to determine the operation).

The error in this case is The endpoint reference (EPR) for the Operation not found is...

In your case, you can't use SOAPAction (it's blank), but you can :

  • append the operation name to the endpoint URL

Or, since ESB 4.8 :

  • add this parameter in the proxy conf : <parameter name="disableOperationValidation" locked="false">true</parameter>

  • modify axis2.xml conf in repository/conf/axis2 replacing

    <handler class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher" name="SOAPMessageBodyBasedDispatcher"/>

    with

    <handler class="org.apache.synapse.core.axis2.SynapseSOAPMessageBodyBasedDispatcher" name="SOAPMessageBodyBasedDispatcher"/>

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top