synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Fremantle" <>
Subject Re: Adding support for Payload data types into MessageContext and actually deeper into Axiom
Date Mon, 17 Sep 2007 14:46:37 GMT
Another reason to do this at the Axiom level - I think we can build
support into the Jaxen XPath helper so that it efficiently computes
XPaths on Beans/Rowsets/recursive Maps.


On 9/14/07, Paul Fremantle <> wrote:
> I recently added a PayloadHelper class to Synapse.
>  It can help get/set the following datatypes from a MessageContext:
> XML (OMElement)
> XML (StAX)
> Binary (DataHandler)
> Text (String)
> Map (I created a class called SimpleMap which only allows certain
> simple datatypes as parameters - e.g. Int, Double, etc). see
> The map needs to have SimpleMap as a further data type allowing some
> recursion. This would also allow Beans and JSON to be handled.
> You can also find out what payload type the message is. These messages
> are all stored as XML in the Body element using various tags.
> for example binary data is always stored as: <ax:binary
> xmlns:ax="">MTOM
> here</ax:binary>
> I'd like to move this support directly into the MessageContext class,
> which will make it much easier to write mediators.
> Secondly, I'd like to convert the Map model to use an OMSourcedElement
> which would allow us to be more efficient about handling this type. In
> other words, if I put in a Map and get it as a Map, no XML processing
> happens. If someone remotely sends in an XML Map then I can access it
> as a Map object, etc.
> Thirdly, I'd like to add a Rowset object (also based on
> OMSourcedElement) which allows us to pass around tabular data (JBDC
> tables, etc)
> So in summary, I'd like to be able to store and retrieve "natively"
> the following datatypes:
> * XML (obviously) but with access via: OM, DOM, StaX and String
> * Text access via String/StringBuffer
> * Bean/JSON/Map
> * Binary access via DataHandler and byte[]
> * Rowset
> I *really* think this support should be in the base Axiom library.
> Here are three reasons:
> 1) It means everyone will use the same code, eg. Axis2 JMS transport
> will put a Map in and Synapse mediator will get it in the same way
> 2) If I just put it in Synapse then I have a problem syncing with
> Axis2 transports. If I put it in Axis2 then I add a new dependency to
> the public API of Synapse (which currently doesn't expose Axis2 - only
> Axiom), or I do a lot of work to hide it.
> 3) I think this would be a really cool addition to Axiom!
> Thoughts? Also, who is willing to work with me on coding this?
> Paul

Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2


"Oxygenating the Web Service Platform",

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message