You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by mudcat <sc...@mckesson.com> on 2008/07/14 17:23:51 UTC

Routing web service call through servicemix-http consumer -> provider

I'm trying to route a web service call through servicemix using the
servicemix-http component. I have a consumer and provider configured in one
su which includes the wsdl file. I been trying to get this working for a
week or so and have made some progress with eliminating the deployment
errors I was seeing, but can still not connect to the external web service.

I can connect to the web service when I call it directly from the client
instead of routing the client through servicemix.

Please review my setup and let me know what I'm doing wrong.

Thank you so much,
Scott


=======================================================
xbean.xml

<beans xmlns:http="http://servicemix.apache.org/http/1.0"
       xmlns:tns="http://www.scottlab.org/translator">

<classpath>
   <location>.</location>
</classpath>

<http:endpoint service="tns:TranslatorService" 
		endpoint="TranslatorInterfacePort"
		soap="true" 
		role="provider" 
		locationURI="http://localhost:8080/translator/service"
		wsdlResource="classpath:TranslatorService.wsdl"
		soapAction="">
</http:endpoint>

<http:endpoint service="tns:ITranslatorService" 
                endpoint="TranslatorInterface"
                soap="true" 
                role="consumer" 
                defaultMep="http://www.w3.org/2004/08/wsdl/in-out" 
               
locationURI="http://localhost:9090/services/TranslatorService" 							               
wsdlResource="classpath:TranslatorService.wsdl"
                targetService="tns:TranslatorService"
		targetEndpoint="TranslatorInterfacePort">
</http:endpoint>           

</beans>

=======================================================
TranslatorService.wsdl

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="TranslatorService"
targetNamespace="http://www.scottlab.org/translator"
xmlns:tns="http://www.scottlab.org/translator"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
  <types>
  </types>
  <message name="TranslatorInterface_translate">
    <part name="arg0" type="xsd:string">
    </part>
  </message>
  <message name="TranslatorInterface_translateResponse">
    <part name="return" type="xsd:string">
    </part>
  </message>
  <portType name="TranslatorInterface">
    <operation name="translate" parameterOrder="arg0">
      <input message="tns:TranslatorInterface_translate">
    </input>
      <output message="tns:TranslatorInterface_translateResponse">
    </output>
    </operation>
  </portType>
  <binding name="TranslatorInterfaceBinding" type="tns:TranslatorInterface">
    <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="translate">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal"
namespace="http://www.scottlab.org/translator"/>
      </input>
      <output>
        <soap:body use="literal"
namespace="http://www.scottlab.org/translator"/>
      </output>
    </operation>
  </binding>
  <service name="TranslatorService">
    <port name="TranslatorInterfacePort"
binding="tns:TranslatorInterfaceBinding">
      <soap:address location="http://0.0.0.0:8080/translator/service"/>
    </port>
  </service>
</definitions>


-- 
View this message in context: http://www.nabble.com/Routing-web-service-call-through-servicemix-http-consumer--%3E-provider-tp18446300p18446300.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Routing web service call through servicemix-http consumer -> provider

Posted by Freeman Fang <fr...@gmail.com>.
Hi Scott,

Do you get any exception? If so please append the stack trace.

Regards
Freeman

mudcat wrote:
> I'm trying to route a web service call through servicemix using the
> servicemix-http component. I have a consumer and provider configured in one
> su which includes the wsdl file. I been trying to get this working for a
> week or so and have made some progress with eliminating the deployment
> errors I was seeing, but can still not connect to the external web service.
>
> I can connect to the web service when I call it directly from the client
> instead of routing the client through servicemix.
>
> Please review my setup and let me know what I'm doing wrong.
>
> Thank you so much,
> Scott
>
>
> =======================================================
> xbean.xml
>
> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>        xmlns:tns="http://www.scottlab.org/translator">
>
> <classpath>
>    <location>.</location>
> </classpath>
>
> <http:endpoint service="tns:TranslatorService" 
> 		endpoint="TranslatorInterfacePort"
> 		soap="true" 
> 		role="provider" 
> 		locationURI="http://localhost:8080/translator/service"
> 		wsdlResource="classpath:TranslatorService.wsdl"
> 		soapAction="">
> </http:endpoint>
>
> <http:endpoint service="tns:ITranslatorService" 
>                 endpoint="TranslatorInterface"
>                 soap="true" 
>                 role="consumer" 
>                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out" 
>                
> locationURI="http://localhost:9090/services/TranslatorService" 							               
> wsdlResource="classpath:TranslatorService.wsdl"
>                 targetService="tns:TranslatorService"
> 		targetEndpoint="TranslatorInterfacePort">
> </http:endpoint>           
>
> </beans>
>
> =======================================================
> TranslatorService.wsdl
>
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="TranslatorService"
> targetNamespace="http://www.scottlab.org/translator"
> xmlns:tns="http://www.scottlab.org/translator"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns="http://schemas.xmlsoap.org/wsdl/">
>   <types>
>   </types>
>   <message name="TranslatorInterface_translate">
>     <part name="arg0" type="xsd:string">
>     </part>
>   </message>
>   <message name="TranslatorInterface_translateResponse">
>     <part name="return" type="xsd:string">
>     </part>
>   </message>
>   <portType name="TranslatorInterface">
>     <operation name="translate" parameterOrder="arg0">
>       <input message="tns:TranslatorInterface_translate">
>     </input>
>       <output message="tns:TranslatorInterface_translateResponse">
>     </output>
>     </operation>
>   </portType>
>   <binding name="TranslatorInterfaceBinding" type="tns:TranslatorInterface">
>     <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>     <operation name="translate">
>       <soap:operation soapAction=""/>
>       <input>
>         <soap:body use="literal"
> namespace="http://www.scottlab.org/translator"/>
>       </input>
>       <output>
>         <soap:body use="literal"
> namespace="http://www.scottlab.org/translator"/>
>       </output>
>     </operation>
>   </binding>
>   <service name="TranslatorService">
>     <port name="TranslatorInterfacePort"
> binding="tns:TranslatorInterfaceBinding">
>       <soap:address location="http://0.0.0.0:8080/translator/service"/>
>     </port>
>   </service>
> </definitions>
>
>
>