1 Reply Latest reply on Aug 6, 2010 5:42 PM by Scott Dawson

    method=post for http-gateway

    llll lll Newbie

      hi everyone.

      First of all, my English is poor, very sorry, hope you understand.


      my jboss-esb.xml

        <service category="httptest" description="Hello WorldA"
         invmScope="GLOBAL" name="serviceA">
          <http-gateway name="Http"/>
         <actions mep="RequestResponse">
          <action name="action1" process="process"/>


      my action

      HttpRequest requestInfo = HttpRequest.getRequest(message);


      when client use method="get"

        requestInfo is not null  and QueryParams is map


      but  method="post"


      <form method="post" action="">
              <input type="text" name="a" value="3" />
              <input type="text" name="b" value="4" />
              <input type="submit"/>


      requestInfo is not null  but QueryParams is null too


      How do I if client use method="post"

        • 1. Re: method=post for http-gateway
          Scott Dawson Apprentice

          Unfortunately POST parameters are not mapped into the QueryParams map like GET parameters are. You can get the POST parameters from the body of the message, so using your example,

          new String((byte[])message.getBody().get())

          will give:



          You can use the decode method in java.net.URLDecoder to handle special characters like ampersands and equal signs.

          I'm looking for an easy way to parse the parameters from the string (and into a map or something similar). I'll post again if I find something useful or maybe someone else has a recommendation.