4 Replies Latest reply on Nov 17, 2009 9:58 AM by lyfe

    create soap messages

    lyfe

      In servicemix, what's the best way to convert request and response msgs btwn XML and SOAP formats?

       

      I've seen examples for translating the structure of XML msgs but nothing involving SOAP.

        • 1. Re: create soap messages
          martinmurphy

          What do you mean by XML to SOAP? Do you mean picking up an XML doc from a folder and sending this to a SOAP/HTTP WebService for example? If you want to do something like this, just use the file component to pick up the doc and then send this to a CXF component that has a WSDL that conforms to the schema for the XML doc and a SOAP binding with a HTTP port for the destination WebService.

          • 2. Re: create soap messages
            lyfe

            Sorry for being unclear.

             

            I would like to take an XML over HTTP request and create a SOAP msg to send to another endpoint over HTTP...and vice versa.

             

            I can probably write a SAX parser or use SAAJ for reading through a SOAP msg and probably use a SAX parser for reading through XML msgs..from there, I'll have to do a bit of manual coding to translate.

             

            I want to know if there was an easier way of achieving this.  Maybe to bypass writing the parsers..writing any code to translate is unavoidable.

             

            I'm wondering your suggestion may work for XML --> SOAP..only instead of reading an XML file from the file system, just listen for a request that sending XML.  Now, there's still the SOAP --> XML part.

            • 3. Re: create soap messages
              martinmurphy

              Can you confirm what version of FUSE ESB you are using?

              • 4. Re: create soap messages
                lyfe

                4.1.0.2