I'm trying to forward a soap request to a http-provider-bc from a
http-consumer-bc. The http-provider-bc will then invoke an external
webservice and send the result back to the http-consumer-bc which will send
it  back to the client.

           SOAP Request
         ---------------------->                           ------>              
         
------>
Client                               Http-Consumer-BC        
Http-Provider-BC        External WebService
        <----------------------                            <------              
        
<-------
         SOAP response

This is not working. Please let me know if it is possible to simply forward
the soap request to
http-provider-bc from http-consumer-bc?

Following are the xbean.xml files for provider/consumer and wsdl file for
external webservice.

Thanks.
-Dan

************************************************************************
Consumer xbean.xml

<beans xmlns:http="http://servicemix.apache.org/http/1.0";
           xmlns:ts="http://nec.com";
       xmlns:py="http://servicemix.apache.org/proxy";>

  <http:endpoint service="py:ProxyService"
                 endpoint="proxy"
                 targetService="ts:Hello"
                 targetEndpoint="HelloSOAP12port_http"
                
wsdlResource="http://localhost:8081/axis2/services/Hello?wsdl";
                 role="consumer" 
                 locationURI="http://localhost:8192/simpleconsumer/";
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out";
                 soap="true" />             

</beans>

************************************************************************
Provider xbean.xml

<beans xmlns:http="http://servicemix.apache.org/http/1.0";
       xmlns:hs="http://nec.com";>

  <http:endpoint service="hs:Hello"
                 endpoint="HelloSOAP12port_http"
                 role="provider" 
                 locationURI="http://localhost:8081/axis2/services/Hello";
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out";
                 soap="true" />             

</beans>

************************************************************************

External webservice wsdl

        <wsdl:definitions targetNamespace="http://nec.com";>
<wsdl:documentation>Hello</wsdl:documentation>

        <wsdl:types>

        <xs:schema attributeFormDefault="qualified" 
elementFormDefault="qualified"
targetNamespace="http://nec.com/xsd";>

        <xs:element name="sayHello">

        <xs:complexType>

        <xs:sequence>
<xs:element name="req" nillable="true" type="ns:HelloRequest"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="HelloRequest" type="ns:HelloRequest"/>

        <xs:complexType name="HelloRequest">

        <xs:sequence>
<xs:element name="text" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>

        <xs:element name="sayHelloResponse">

        <xs:complexType>

        <xs:sequence>
<xs:element name="return" nillable="true" type="ns:HelloResponse"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="HelloResponse" type="ns:HelloResponse"/>

        <xs:complexType name="HelloResponse">

        <xs:sequence>
<xs:element name="text" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>

        <wsdl:message name="sayHelloMessage">
<wsdl:part name="part1" element="ns0:sayHello"/>
</wsdl:message>

        <wsdl:message name="sayHelloResponse">
<wsdl:part name="part1" element="ns0:sayHelloResponse"/>
</wsdl:message>

        <wsdl:portType name="HelloPortType">

        <wsdl:operation name="sayHello">
<wsdl:input message="axis2:sayHelloMessage" wsaw:Action="urn:sayHello"/>
<wsdl:output message="axis2:sayHelloResponse"/>
</wsdl:operation>
</wsdl:portType>

        <wsdl:binding name="HelloSOAP11Binding" type="axis2:HelloPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http";
style="document"/>

        <wsdl:operation name="sayHello">
<soap:operation soapAction="urn:sayHello" 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="HelloSOAP12Binding" type="axis2:HelloPortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http";
style="document"/>

        <wsdl:operation name="sayHello">
<soap12:operation soapAction="urn:sayHello" 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="HelloHttpBinding" type="axis2:HelloPortType">
<http:binding verb="POST"/>

        <wsdl:operation name="sayHello">
<http:operation location="sayHello"/>

        <wsdl:input>
<mime:content type="text/xml"/>
</wsdl:input>

        <wsdl:output>
<mime:content type="text/xml"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>

        <wsdl:service name="Hello">

        <wsdl:port name="HelloSOAP11port_http" 
binding="axis2:HelloSOAP11Binding">
<soap:address location="http://138.15.107.42:8081/axis2/services/Hello"/>
</wsdl:port>

        <wsdl:port name="HelloSOAP12port_http" 
binding="axis2:HelloSOAP12Binding">
<soap12:address location="http://138.15.107.42:8081/axis2/services/Hello"/>
</wsdl:port>

        <wsdl:port name="HelloHttpport" binding="axis2:HelloHttpBinding">
<http:address location="http://138.15.107.42:8081/axis2/services/Hello"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>





-- 
View this message in context: 
http://www.nabble.com/Can-I-forward-a-soap-request-to-http-provider-bc-from-http-consumer-bc-directly--if-so-then-why-the-following-example-is-not-working--tf3842012s12049.html#a10879384
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to