4 Replies Latest reply on Jan 25, 2008 7:20 AM by Bernd Ruecker

    SOAPClient imports binding with wrong Port

    Bernd Ruecker Master

      Hi!

      We have a very strange problem. We want to invoke a WebService with the ESB (4.2.1 GA), here is the action:

      <action name="CallCounter" class="org.jboss.soa.esb.actions.soap.SOAPClient">
       <property name="wsdl" value="http://192.168.1.107:8088/axis2/services/TestService1?wsdl" />
       <property name="operation" value="add"/>
       <property name="SOAPAction" value="http://test/add"/>
       <property name="responseAsOgnlMap" value="true" />
      </action>
      


      The Binding in the WSDL is quite easy:
       <wsdl:port name="TestService1SOAP11port_http" binding="ns0:TestService1SOAP11Binding">
       <soap:address location="http://192.168.1.107:8088/axis2/services/TestService1"/>
       </wsdl:port>
      


      But when the ESB arrives at the webservice, the WSDL is queries correctly. But the endpoints are imported with the wrong port here:

      [WsdlImporter] Finding importer for {http://test}TestService1SOAP11Binding
      [WsdlImporter] Importing binding {http://test}TestService1SOAP11Binding
      [Soap11HttpBindingImporter] importing endpoint http://192.168.1.107:80/axis2/services/TestService1
      


      So obviously the endpoint is not reachable:
      Failed to invoke SOAP Endpoint: 'http://192.168.1.107:80/axis2/services/TestService1 ' - 'http://test/add'.

      What is wrong here? The BPEL Example works fine with a different port and we cannot find any difference...

      Thanks a lot for any hint!
      Cheers
      Bernd

      P.S: Here the whole WSDL:
      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions
       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
       xmlns:ns1="http://org.apache.axis2/xsd"
       xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
       xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
       xmlns:ns0="http://test"
       xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
       xmlns:xs="http://www.w3.org/2001/XMLSchema"
       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
       xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
       xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
       targetNamespace="http://test">
       <wsdl:documentation>TestService1</wsdl:documentation>
       <wsdl:types>
       <xs:schema xmlns:ns="http://test" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://test">
       <xs:element name="add">
       <xs:complexType>
       <xs:sequence>
       <xs:element minOccurs="0" name="summand" type="xs:int"/>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       <xs:element name="addResponse">
       <xs:complexType>
       <xs:sequence>
       <xs:element minOccurs="0" name="return" type="xs:int"/>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       <xs:element name="reverse">
       <xs:complexType>
       <xs:sequence>
       <xs:element minOccurs="0" name="in" nillable="true" type="xs:string"/>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       <xs:element name="reverseResponse">
       <xs:complexType>
       <xs:sequence>
       <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       </xs:schema>
       </wsdl:types>
       <wsdl:message name="addRequest">
       <wsdl:part name="parameters" element="ns0:add"/>
       </wsdl:message>
       <wsdl:message name="addResponse">
       <wsdl:part name="parameters" element="ns0:addResponse"/>
       </wsdl:message>
       <wsdl:message name="reverseRequest">
       <wsdl:part name="parameters" element="ns0:reverse"/>
       </wsdl:message>
       <wsdl:message name="reverseResponse">
       <wsdl:part name="parameters" element="ns0:reverseResponse"/>
       </wsdl:message>
       <wsdl:binding name="TestService1SOAP11Binding" type="ns0:TestService1PortType">
       <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
       <wsdl:operation name="add">
       <soap:operation soapAction="urn:add" style="document"/>
       <wsdl:input>
       <soap:body use="literal"/>
       </wsdl:input>
       <wsdl:output>
       <soap:body use="literal"/>
       </wsdl:output>
       </wsdl:operation>
       <wsdl:operation name="reverse">
       <soap:operation soapAction="urn:reverse" style="document"/>
       <wsdl:input>
       <soap:body use="literal"/>
       </wsdl:input>
       <wsdl:output>
       <soap:body use="literal"/>
       </wsdl:output>
       </wsdl:operation>
       </wsdl:binding>
       <wsdl:binding name="TestService1SOAP12Binding" type="ns0:TestService1PortType">
       <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
       <wsdl:operation name="add">
       <soap12:operation soapAction="urn:add" style="document"/>
       <wsdl:input>
       <soap12:body use="literal"/>
       </wsdl:input>
       <wsdl:output>
       <soap12:body use="literal"/>
       </wsdl:output>
       </wsdl:operation>
       <wsdl:operation name="reverse">
       <soap12:operation soapAction="urn:reverse" style="document"/>
       <wsdl:input>
       <soap12:body use="literal"/>
       </wsdl:input>
       <wsdl:output>
       <soap12:body use="literal"/>
       </wsdl:output>
       </wsdl:operation>
       </wsdl:binding>
       <wsdl:binding name="TestService1HttpBinding" type="ns0:TestService1PortType">
       <http:binding verb="POST"/>
       <wsdl:operation name="add">
       <http:operation location="TestService1/add"/>
       <wsdl:input>
       <mime:content type="text/xml" part="add"/>
       </wsdl:input>
       <wsdl:output>
       <mime:content type="text/xml" part="add"/>
       </wsdl:output>
       </wsdl:operation>
       <wsdl:operation name="reverse">
       <http:operation location="TestService1/reverse"/>
       <wsdl:input>
       <mime:content type="text/xml" part="reverse"/>
       </wsdl:input>
       <wsdl:output>
       <mime:content type="text/xml" part="reverse"/>
       </wsdl:output>
       </wsdl:operation>
       </wsdl:binding>
       <wsdl:service name="TestService1">
       <wsdl:port name="TestService1SOAP11port_http" binding="ns0:TestService1SOAP11Binding">
       <soap:address location="http://192.168.1.107:8088/axis2/services/TestService1"/>
       </wsdl:port>
       <wsdl:port name="TestService1SOAP12port_http" binding="ns0:TestService1SOAP12Binding">
       <soap12:address location="http://192.168.1.107:8088/axis2/services/TestService1"/>
       </wsdl:port>
       <wsdl:port name="TestService1Httpport" binding="ns0:TestService1HttpBinding">
       <http:address location="http://192.168.1.107:8088/axis2/services/TestService1"/>
       </wsdl:port>
       </wsdl:service>
      
       <wsdl:portType name="TestService1PortType">
       <wsdl:operation name="add">
       <wsdl:input message="ns0:addRequest" wsaw:Action="urn:add"/>
       <wsdl:output message="ns0:addResponse" wsaw:Action="urn:addResponse"/>
       </wsdl:operation>
       <wsdl:operation name="reverse">
       <wsdl:input message="ns0:reverseRequest" wsaw:Action="urn:reverse"/>
       <wsdl:output message="ns0:reverseResponse" wsaw:Action="urn:reverseResponse"/>
       </wsdl:operation>
       </wsdl:portType>
      
      
       <plnk:partnerLinkType name="TestServicePLT">
       <plnk:role name="TestServiceRole" portType="ns0:TestService1PortType" />
       </plnk:partnerLinkType>
      
      </wsdl:definitions>