6

I would like to do something like this:

<jaxws:endpoint id="AbcEsbHTTPEndpoint" 
    implementor="com.abc.esb.ABCWSServiceImpl"
    address="/ABCWSServiceService"
    wsdlLocation="wsdl/ABCWSService.wsdl"
    endpointName="e:ABCWSService"
    serviceName="s:ABCWSServiceService"
    xmlns:e="http://com.abc.esb/abcesb/services/ABCWSService"
    xmlns:s="http://com.abc.esb/abcesb/services/ABCWSService">
</jaxws:endpoint>


<camelContext xmlns="http://camel.apache.org/schema/spring">
    <route>
        <from uri="cxf:bean://ABCWSServiceService"/>
        <to uri="cxf:bean:decodeClient"/>
    </route>
</camelContext>    

<jaxws:client id="decodeClient" 
    address="http://ESB-DEV1:9081/abcesb/services/Decoder"
    wsdlLocation="http://ESB-DEV1:9081/abcesb/services/Decoder?wsdl" 
    serviceClass="com.abc.esb.ABCServiceInterface" 
    abstract="true" > 
</jaxws:client>  

I don't understand how to configure the camel route from the <jaxws:endpoint> to the <jaxws:client> What is the syntax to use?? I know you can use <cxf:cxfEndpoint> but I don't want to use that if I don't have to.

I know how to do this with JBI, but I'm wanting to deploy this into servicemix using a OSGI bundle, not JBI.

рüффп
  • 5,172
  • 34
  • 67
  • 113
guido
  • 61
  • 1
  • 2

2 Answers2

2

The jaxws:client you have in your configuration is an endpoint as is the jaxws:endpoint and could be connected using the bean component:

<camelContext xmlns="http://camel.apache.org/schema/spring">
    <route>
        <from uri="bean:AbcEsbHTTPEndpoint"/>
        <to uri="bean:decodeClient"/>
    </route>
</camelContext>

Usually there's a need to do something in between - say to adapt the message in some way - but the above will achieve the routing at least.

chrisjleu
  • 4,329
  • 7
  • 42
  • 55
-4

See some of the cxf examples from the examples in the camel distribution. They show how to setup cxf, not as jbi.

Claus Ibsen
  • 56,060
  • 7
  • 50
  • 65
  • Thanks for the response. Yeah, I've looked through those quite a bit. I think the example (camel-example-cxf-proxy) is exact use case. Based on this example I can use a camel route from a "cxf:cxfEndpoint" configured end point. I was curious if I could use a camel route to from a "jaxws:endpoint" end point. I didn't know the syntax in the camel route to reference the jaxws:endpoint. Thanks for your help! – guido Mar 03 '11 at 12:04
  • Guido, i am also try to install camel-example-cxf-proxy into serviceMix 4.3.0. The installation is fine (install -s wrap:file:/c:/...jar). But it looks like the example doesn't work. I am not able to access the WSDL when using SOAPUI to test. Could you please let me know how to make it work in ServiceMix – David Mar 07 '12 at 18:38
  • 2
    Claus ... I know you are brilliant because you invented Camel. But can we see some actual code? I've been searching for an actual example of routing to/from a jax-ws endpoint but cannot find one. You being the primary creator of Camel would be the BEST person to give an example (or even a link, something?). I will remove my downvote of this answer if you post an example. Cheers. – Jack Jul 19 '12 at 15:22