CXFBC Provider endpoint
parisetech May 26, 2011 10:38 AMI?m trying to route data from a JMS endpoint to a web service provider endpoint. The data from the JMS endpoint is routed fine, I verified this by printing the data to a file and using Tracing. I setup a proxy using TCP MON(http://ws.apache.org/commons/tcpmon/tcpmontutorial.html) In the Tracer output below it seem the JMS data is routed to the CXFBC Provider endpoint however a message is never passed over the network. The CXFBC Provider does not seem to attempt to contact the external web service. Anybody have any ideas? Thank you.
CXFBC Provider Configuration:
Route to Webservice Provider Endpoint:
public class MyRouteBuilder extends RouteBuilder {
/*
jbi:service:serviceNamespace[sep]serviceName[?options]
jbi:endpoint:serviceNamespace[sep]serviceName[sep]endpointName[?options]
jbi:name:endpointName[?options](non-Javadoc)
http://servicemix.396122.n5.nabble.com/Problems-to-create-a-cxfbc- provider-consumer-proxy-bridge-td3966576.html
http://fusesource.com/forums/thread.jspa?messageID=9698◢
*/
@Override
public void configure() throws Exception {
System.out.println("Start configure");
RouteDefinition the_route = from("jbi:endpoint:http://servicemix.apache.org/samples/bridge/jms/endpoint");
the_route.tracing();
the_route.to("jbi:endpoint:http://www.webserviceX.NET/StockQuote/StockQuoteSoap?operation={http://www.webserviceX.NET}GetQuote").
to("file://C:/temp//to");
System.out.println("End configure");
}
}
/* Endpoints depolyed and registered:
{javax.jbi.servicedesc.ServiceEndpoint=org.apache.servicemix.common.ExternalEndpoint@1463340, NAME={http://servicemix.apache.org/samples/bridge}http:endpoint, UNTARGETABLE=true, ENDPOINT_NAME=endpoint, SERVICE_NAME=http, jbi.external=true, objectClass=[Ljava.lang.String;@1cecd26, service.id=411}
{jbi.internal=true, NAME={http://servicemix.apache.org/samples/bridge}pipeline:endpoint, ENDPOINT_NAME=endpoint, SERVICE_NAME=pipeline, objectClass=[Ljava.lang.String;@1bbe9f, service.id=413}
{jbi.internal=true, NAME={http://camel.apache.org/schema/jbi}camelcontext:bridge-camel-su-controlbus, ENDPOINT_NAME=bridge-camel-su-controlbus, SERVICE_NAME=camelcontext, objectClass=[Ljava.lang.String;@11c5809, service.id=415}
{jbi.internal=true, NAME={http://servicemix.apache.org/samples/bridge}jms:endpoint, ENDPOINT_NAME=endpoint, SERVICE_NAME=jms, objectClass=[Ljava.lang.String;@1e9a867, service.id=417}
{jbi.internal=true, WSDL_URL=document:5, NAME={http://www.webserviceX.NET/}StockQuote:StockQuoteSoap, INTERFACE_NAME=StockQuoteSoap, ENDPOINT_NAME=StockQuoteSoap, SERVICE_NAME=StockQuote, objectClass=[Ljava.lang.String;@150ad73, service.id=419}
*/
Tracer output:
16:15:01,822 | INFO | rovider-thread-4 | Tracer | 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-09 | ID-pyorkexp-4643-1306354420806-1-49468 >>> (route1) from(endpoint:http://servicemix.apache.org/samples/bridge/jms/endpoint) --> endpoint:http://www.webserviceX.NET/StockQuote/StockQuoteSoap <<< Pattern:InOnly, BodyType:org.apache.camel.converter.jaxp.StringSource, Body:<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://www.webserviceX.NET/">
<env:Body>
<tns:GetQuoteSoapIn>
<tns:GetQuote>
<tns:symbol>
GOUUUUU
</tns:symbol>
</tns:GetQuote>
</tns:GetQuoteSoapIn>
</env:Body>
</env:Envelope>
WDSL:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:tns="http://www.webserviceX.NET/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.webserviceX.NET/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.webserviceX.NET/">
<s:element name="GetQuote">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="symbol" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetQuoteResponse">
<s:complexType>
<s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="GetQuoteResult" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="string" nillable="true" type="s:string"/>
</s:schema>
</wsdl:types>
<wsdl:message name="GetQuoteSoapIn">
<wsdl:part element="tns:GetQuote" name="parameters"/>
</wsdl:message>
<wsdl:message name="GetQuoteSoapOut">
<wsdl:part element="tns:GetQuoteResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="GetQuoteHttpGetIn">
<wsdl:part name="symbol" type="s:string"/>
</wsdl:message>
<wsdl:message name="GetQuoteHttpGetOut">
<wsdl:part element="tns:string" name="Body"/>
</wsdl:message>
<wsdl:message name="GetQuoteHttpPostIn">
<wsdl:part name="symbol" type="s:string"/>
</wsdl:message>
<wsdl:message name="GetQuoteHttpPostOut">
<wsdl:part element="tns:string" name="Body"/>
</wsdl:message>
<wsdl:portType name="StockQuoteSoap">
<wsdl:operation name="GetQuote">
<wsdl:documentation>Get Stock quote for a company Symbol</wsdl:documentation>
<wsdl:input message="tns:GetQuoteSoapIn"/>
<wsdl:output message="tns:GetQuoteSoapOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="StockQuoteHttpGet">
<wsdl:operation name="GetQuote">
<wsdl:documentation>Get Stock quote for a company Symbol</wsdl:documentation>
<wsdl:input message="tns:GetQuoteHttpGetIn"/>
<wsdl:output message="tns:GetQuoteHttpGetOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="StockQuoteHttpPost">
<wsdl:operation name="GetQuote">
<wsdl:documentation>Get Stock quote for a company Symbol</wsdl:documentation>
<wsdl:input message="tns:GetQuoteHttpPostIn"/>
<wsdl:output message="tns:GetQuoteHttpPostOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="StockQuoteSoap" type="tns:StockQuoteSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetQuote">
<soap:operation soapAction="http://www.webserviceX.NET/GetQuote" 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="StockQuoteSoap12" type="tns:StockQuoteSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetQuote">
<soap12:operation soapAction="http://www.webserviceX.NET/GetQuote" 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="StockQuoteHttpGet" type="tns:StockQuoteHttpGet">
<http:binding verb="GET"/>
<wsdl:operation name="GetQuote">
<http:operation location="/GetQuote"/>
<wsdl:input>
<http:urlEncoded/>
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="StockQuoteHttpPost" type="tns:StockQuoteHttpPost">
<http:binding verb="POST"/>
<wsdl:operation name="GetQuote">
<http:operation location="/GetQuote"/>
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded"/>
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="StockQuote">
<wsdl:port binding="tns:StockQuoteSoap" name="StockQuoteSoap">
<soap:address location="http://localhost:8094/MDMS_Web_Service/services/StockQuoteSoap"/>
</wsdl:port>
<!-- <wsdl:port binding="tns:StockQuoteSoap12" name="StockQuoteSoap12">
<soap12:address location="http://www.webservicex.net/stockquote.asmx"/>
</wsdl:port>
<wsdl:port binding="tns:StockQuoteHttpGet" name="StockQuoteHttpGet">
<http:address location="http://www.webservicex.net/stockquote.asmx"/>
</wsdl:port>
<wsdl:port binding="tns:StockQuoteHttpPost" name="StockQuoteHttpPost">
<http:address location="http://www.webservicex.net/stockquote.asmx"/>
</wsdl:port> -->
</wsdl:service>
</wsdl:definitions>
Web Service info From Tomcat:
Web Services
Endpoint Information
Service Name: StockQuoteSoapImplService
Port Name: StockQuoteSoapPort
Address: http://localhost:8094/MDMS_Web_Service/MeterReadData
WSDL: http://localhost:8094/MDMS_Web_Service/MeterReadData?wsdl
Implementation class: net.webservicex.StockQuoteSoapImpl