madhairsilence
madhairsilence

Reputation: 3870

Camel with Spring JAX-WS

I have a Spring WS - JAX-WS application. It is exposing a Webservice.

Now I want to wrapper a Camel endpoint in front of it.

Such that, when the webservice is called, it should be routed by camel. i.e.

Currently an able to hit the webservice using the URL localhost/MyApp/appService?wsdl

Which endpoint scheme should be used??

Upvotes: 0

Views: 2032

Answers (1)

Pith
Pith

Reputation: 3794

Your JAX-WS application provides a SOAP Web service.

So you can use camel-soap or camel-cxf, depending on your need.

SOAP

SOAP is a Data Format which uses JAXB2 and JAX-WS annotations to marshal and unmarshal SOAP payloads. It provides the basic features of Apache CXF without need for the CXF Stack.

Here is a short exemple of use:

SoapJaxbDataFormat soap = new SoapJaxbDataFormat("com.example.customerservice", new ServiceInterfaceStrategy(CustomerService.class));
soap.setVersion("1.2");
from("direct:start")
  .marshal(soap)
  .to("jms:myQueue");

CXF

The cxf: component provides integration with Apache CXF for connecting to JAX-WS services hosted in CXF.

I will not provide an example for CXF because there is a lot more options. If you don't need them use SOAP, otherwise go see the doc.

Upvotes: 1

Related Questions