3 Replies Latest reply on Oct 24, 2012 3:23 PM by Tom Cunningham

    Does JBoss ESB support JSON

    Hitz Jain Newbie

      Hi Team,

       

      We are looking to implement some services using the JBoss ESB architecture and need to know and find out how does JBoss ESB support JSON http request?

      I looked into the docs but didn't find anything.

       

      Can you please assist.

       

      If this has to be done using the HTTP Request do share some thread that I can use to implement this.

       

      -        Thanks

        • 1. Re: Does JBoss ESB support JSON
          Tom Cunningham Master

          You've asked a very broad question - I'm not sure what you intend to do but there would be a number of ways to attack this.     I'd take a look at the JBoss ESB http_gateway quickstart example and some of the smooks examples to familiarize yourself with transformations - Smooks can convert JSON to XML or Java Objects.      Do you want to convert your JSON objects into Java objects?   Or to XML?  Or are you using the ESB to forward them on to something else?

           

          Alternatively, there's the Camel Gateway - there's a JSON component that you could use.       Or you could look into RESTEasy.      

          • 2. Re: Does JBoss ESB support JSON
            Hitz Jain Newbie

            Hi Tom,

             

            I am using the JBoss SOA 5.3 with HornetQ messaging.

            I have a requirement wherein I am exposing my esb service thru a HTTP endpoint to a esb-unaware the system. The service invoker needs to pass the HTTP request as a JSON request and I need to process that through the ESB pipeline.

             

            My purpose of the ESB would be get this JSON Request and transform it into another JSON format with instead var1=a1 to var2 =a2.

             

            I wasn't sure how should I get the message from the JSON input request.

            I know that smooks needs to be used but it really doesn't say how to use it in here.. Do we have a sample example to perform this activity alongwith a sample client producing JSON request.    

            • 3. Re: Does JBoss ESB support JSON
              Tom Cunningham Master

              There's a number of ESB quickstarts which generally handle smooks transformations (XML->POJO, XML->XML, CSV->XML), but none that handle JSON.    There are a few JSON examples within the Smooks project examples, and it should be as simple as reusing the structure of the one of the existing ESB quickstarts and just crafting a smooks configuration that does the transformation you want.

               

              http://www.smooks.org/mediawiki/index.php?title=Examples