spring-integration icon indicating copy to clipboard operation
spring-integration copied to clipboard

XML Aggregator [INT-571]

Open spring-operator opened this issue 16 years ago • 4 comments

David Geary opened INT-571 and commented

A simple XML aggregator that combines several XML documents into one with simple wrapper elements eg

<spring-integration-aggregated-document> <aggregated-part> document 1 contents </aggregated-part> <aggregated-part> document 2 contents </aggregated-part> <aggregated-part> document 3 contents </aggregated-part> <spring-integration-aggregated-document>

Example usage:

An XML message need to be transformed and forwarded to an endpoint, but as part of the transformation requires extra information from a web service call.

The XML message could be split into two copies, one copy transformed and sent to the web service endpoint, the result of this could then be recombined with the other copy (using the xml aggregator) before a final transformation (making use of all the data now available) and sent to the final endpoint

Similarly this could be used to aggregate information from multiple web service calls.

This would work with both string and node/document payloads and produce the same payload type on the output channel (assuming all input messages are of the same type)

This would also include spring integration namespace support for simple configuration.


No further details from INT-571

spring-operator avatar Feb 04 '09 01:02 spring-operator

David Geary commented

Should be XML component, affects 1.0.1

spring-operator avatar Feb 04 '09 01:02 spring-operator

Jonas Partner commented

My view is that XQuery will provide a much more flexible solution to XML aggregation. I have added a new feature to JIRA, INT-581.

spring-operator avatar Feb 18 '09 03:02 spring-operator

David Geary commented

I agree - XQuery would be more powerful

spring-operator avatar Feb 18 '09 20:02 spring-operator

David Thomas Hume commented

Won't an XQuery based aggregator still have to implement the basic functionality described above before it passes the message list to the query for processing? If so, IMO an XQuery transformer, along with an XMLAggregator with an optional transformer property might be more flexible:

<si-xml:aggregator input-channel="in" output-channel="out" transformer="SomeXSLorXQueryTransformer" />

...with the aggregator producing a message similar to the one originally suggested, then applying the transformer.

spring-operator avatar Mar 30 '09 06:03 spring-operator