Announcement Announcement Module
Collapse
No announcement yet.
how to add attachments provided by multiple channels in a soap message with SI Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to add attachments provided by multiple channels in a soap message with SI

    Hi guys,

    I'm trying to create a soap message that contains an rdf and a datastream of an xml data.
    I have the rdf as result of an channel and also a datastream as the result of another process in another channel

    How can I aggregate those files and put them inside my soap message?
    Is there something as out of box inside SI that i can use?

    This is the soap message:
    <soap:saveResource> -->
    <!-- <rdf-content>?</rdf-content> -->
    <!-- <rdf-mimeType>?</rdf-mimeType> -->
    <!-- <replace-if-exists>?</replace-if-exists> -->
    <!-- Optional: -->
    <!-- <datastreams> -->
    <!-- 1 or more repetitions: -->
    <!-- <datastream name="?" language="?" mimeType="?" src="?"> -->
    <!-- Optional: -->
    <!-- <dataHandler>cid:620806603524</dataHandler> -->
    <!-- </datastream> -->
    <!-- </datastreams> -->
    <!-- Optional: -->
    <!-- <parameters> -->
    <!-- Zero or more repetitions: -->
    <!-- <parameter> -->
    <!-- Optional: -->
    <!-- <name>?</name> -->
    <!-- Optional: -->
    <!-- <value>?</value> -->
    <!-- </parameter> -->
    <!-- </parameters> -->
    <!-- </soap:saveResource> -->

    Any suggestion will be appreciated.
    Thank you.
    Mariateresa

  • #2
    Hello

    Try to use this one:
    HTML Code:
    <int-ws:outbound-gateway id="wsGateway"
                         request-channel="wsChannel"
                         uri="http://some.uri"
                         marshaller="mtomMarshaller"/>
    
    <bean id="mtomMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"
              p:mtomEnabled="true"
              p:classesToBeBound="com.my.mode.MtomRequest"/>
    Where MtomRequest is some POJO with JAXB annotations and contains fields for your 'rdf' & 'datastream'.
    The <aggregator> should return this POJO inside custom method with @Aggregator and sends a Message into <int-ws:outbound-gateway> where will work marshaller with MTOM-Enabled. In the end your SoapMessage will be with attachements.
    By the way: Spring Integration WS fully delegates to Spring-WS, but automatic MTOM now is supported only via JAXB Marshaller.

    Is it what are you looking for?

    We have an issue about this one: https://jira.springsource.org/browse/INT-1800. If you have some thoughts how to bring MTOM into Spring Integration, please, share them there.

    Take care,
    Artem Bilan

    Comment

    Working...
    X