2 Replies Latest reply on Oct 21, 2011 6:52 AM by Ravi Challapalli

    Soap with attachments

    Ravi Challapalli Newbie


      I am using HTTP endpoint with SOAP enabled. My soap messages contain attachments as mime multiparts which are XML aswell. ServiceMix parses the message and gives the root part as XML but the attachments are in binary format. Can this behaviour be changed  through some settings and get the attachments too in XML?


      Thanks in advance!!



        • 1. Re: Soap with attachments
          Freeman(Yue) Fang Master



          Do you mean you're using servicemix-http JBI component?

          If so I suggest you use servicemix-cxf-bc JBI component instead to handle soap request, which also have better SOAP/MTOM support.


          Or you  can consider to use camel router if you start a new project, not use JBI at all.



          • 2. Re: Soap with attachments
            Ravi Challapalli Newbie

            Thanks Freeman.


            Yes, I use a servicemix-http BC to which a Camel SU is bound to. The http-consumer BC consumes the message and the camel routes the soap message to a jms provider BC.

            On the amq queue I see the mime message but the soap attachments are in binary format.

            s/w using: apache-servicemix-4.4.0-fuse-00-43, apache-activemq-5.5.0-fuse-00-27.


            servicemix-cxf-bc JBI component: The messages are hl7 and does not have a WSDL. SO don't need WSDL capabilities which is mandatory for cxf bc.


            My PoC requirement is: consume soap messages (MIME multipart/related) with attachments (type: xml) over Http parse the MIME parts convert them to a common internal xml format and route them to appropriate queues based on the message type and achnowledge the sender. No business logic to implement - just routing to appropriate JMS destinations after converting to common internal xml format.


            Kindly advise accordingly.


            Thanks in advance!