SOAPPage edited by Glen Mazza
Comment:
Christian and Glen search for a textual compromise...
Changes (1)
Full ContentSOAP DataFormatAvailable as of Camel 2.3 SOAP is a Data Format which uses JAXB2 and JAX-WS to marshal and unmarshal SOAP payloads. It provides the basic features of Apache CXF without need for the CXF Stack. ElementNameStrategyAn element name strategy is used for two purposes. The first is to find a xml element name for a given object and soap action when marshalling the object into a SOAP message. The second is to find an Exception class for a given soap fault name.
If you have generated the web service stub code with cxf-codegen or a similar tool then you probably will want to use the ServiceInterfaceStrategy. In the case you have no annotated service interface you should use QNameStrategy or TypeNameStrategy. Using the Java DSLThe following example uses a named DataFormat of soap which is configured with the package com.example.customerservice to initialize the JAXBContext. The second parameter is the ElementNameStrategy. The route is able to marshal normal objects as well as exceptions. (Note the below just sends a SOAP Envelope to a queue. A web service provider would actually need to be listening to the queue for a SOAP call to actually occur, in which case it would be a one way SOAP request. If you need request reply then you should look at the next example.) SoapJaxbDataFormat soap = new SoapJaxbDataFormat("com.example.customerservice", new ServiceInterfaceStrategy(CustomerService.class)); from("direct:start") .marshal(soap) .to("jms:myQueue");
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache Camel > SOAP confluence
- [CONF] Apache Camel > SOAP confluence
- [CONF] Apache Camel > SOAP confluence
- [CONF] Apache Camel > SOAP confluence
- [CONF] Apache Camel > SOAP confluence
- [CONF] Apache Camel > SOAP confluence
- [CONF] Apache Camel > SOAP confluence
- [CONF] Apache Camel > SOAP confluence
- [CONF] Apache Camel > SOAP confluence
- [CONF] Apache Camel > SOAP confluence
- [CONF] Apache Camel > SOAP confluence
- [CONF] Apache Camel > SOAP confluence