1 Reply Latest reply on Feb 10, 2011 9:17 PM by njiang

    HttpMessage

    woggle23

      Afternoon

       

      I'm trying to extract request information from an http query using camel-jetty. The camel context is consuming from "jetty:http://localhost:8080/test", and sending the request to a new "Processor" for parsing; e.g:

       

      from("jetty:http://localhost:8080/test").process(new Processor()

      {

        public void process (Exchange e)

      {}

      };

       

      When entering, for example,

       

      http://localhost:8080/test?value=blah

       

      into a browser, the Exchange variable (during debug in eclipse) shows that the e.in.body member is "null". However, the e.in.request.queryString is populated with "value=blah". Furthermore, the e.getIn()'s type is org.apache.camel.component.http.HttpMessage. I, therefore, which to cast the exchange variable to this type in an attempt to extract the request. The problem I'm having is using the HttpMessage type. When I attempt to import the "org.apache.camel.component.http" package into my source file, I'm provided with an error advising that the package can't be resolved. Any ideas how I get hold of this package and install it into my local maven repository for use? Are there any extra dependencies I'll need to add to my pom.xml file?

       

      I've seen another message on the forum (see link below) which provides the svn repository for the package source. If I download the source, is there a pom file that goes with it that can be used to build/install the package?

       

      http://fusesource.com/forums/thread.jspa?messageID=4654&#4654

       

      Many thanks for your time!

       

      Cheers

       

      Matt

        • 1. Re: HttpMessage
          njiang

          Hi

           

          org.apache.camel.component.http.HttpMessage is in the camel-http module, you just need to download the source jar from Fuse maven repo.

           

          Willem