Simon,
Comments inline...
Simon Laws wrote:
<snip>
OASIS now has a concept of wire format. In theory the specification of a
wire format in Tuscany can configure the binding interface and hence
have an impact on the databinding transformations that take place. Is
there an equivalent in the eventing code where the event catalog is managed?
The real problem at the moment is in dealing with 2 related things:
- given an event arriving at the consumer end, what does this get transformed
into?
- if we want a consumer to have a "generic" event handler method, what (Java) type should be used as
the parameter of that method?
If we have a consumer method with a specific event type as its parameter, things are not too bad,
since we can ask the transformations to target that type. It would be useful to extend the
databinding code to accept a set of possible target types and for that code to pick the appropriate
type to generate. I believe that JAXB itself can do this, but Tuscany databinding use of JAXB is
limited to a single target type at the moment.
For the case where we have a generic type, we need the databinding code to deliver all the event
data in the form of such a generic (Java) type. I am still working on this. java.lang.Object will
not work - so I think we're going to need a suitable org.oasis.GeneralEvent type, which would be
capable of holding any event data and allowing dynamic extraction of the contents - a suitable SDO
might be the answer, one that corresponds to a type:
<complexType>
<any/>
</complexType>
I've toyed with various ideas including delivering "raw" XML in the form of a DOM tree, but none of
them have felt very good from the perspective of the programmer.
- any good thoughts in this area would be much appreciated.
<snip>
Ant did some work in trunk to create a binding.sca.jms which might be of
interest.