|
Page Edited :
SM :
Marshalers
Marshalers has been edited by Bruce Snyder (Jun 10, 2008). Content:An Overview of Marshalers in ServiceMixMarshalers in ServiceMix are used to convert messages to/from the JBI normalised messages. For example, the JBI spec requires that the payload of a normalized message be XML. So when non-XML messages are sent through a binding component (BC) those messages must be normalized into XML and when a message leave a BC it may need to be denormalized to be compatible with the external service to which it is being sent. For information on this see message normalization Because ServiceMix doesn't provide the ability to handle message normalization for every conceivable message format out there, ServiceMix provides classes for implementing your own custom marshalers. Existing Marshalers in ServiceMixAs shown in the image below, the MarshalerSupport
However, there are many other marshalers besides those in the image above. These include the following list but there are many more as well: servicemix-http
servicemix-jmsservicemix-mailservicemix-quartzCreating a Custom MarshalerCreating a custom marshaler is actually a pretty easy task. Depending on what kind of marshaler you need to create, you may take a different approach. For example, when creating a custom marshaler for the servicemix-http, you might just need to extend the DefaultHttpConsumerMarshaler or the DefaultHttpProviderMarshaler to override the createExchange() and sendOut() methods. Because the servicemix-http component provides its own base classes in HttpConsumerMarshaler and HttpProviderMarshaler which are specifically designed for use with the HTTP protocol. Oftentimes it's easier to extend one of these existing marshalers, but this is certainly not the only approach. You can also create a custom marshaler from scratch by extending the MarshalerSupport class. Older stuffQuestions:
– PS Notes [19/12]:
Update [20/12]:
Class diagram showing ServiceMix 2.0.2 marshalers |
Unsubscribe or edit your notifications preferences
