Re: Jetty component and HTTP parameter

2009-07-10 Thread Willem Jiang
Hi, Did you set the content-type to be "application/x-www-form-urlencoded" ? If so , camel-http will try to build the parameter map with the message body which you post to service endpoint. Willem SwenVogel wrote: I have tested the feature with apache-camel-2.0-SNAPSHOT.zip (Thu Jul 09 17:35

Re: Jetty component and HTTP parameter

2009-07-10 Thread SwenVogel
I have tested the feature with apache-camel-2.0-SNAPSHOT.zip (Thu Jul 09 17:35:12 GMT+00:00 2009) and send a very simple XML file as request body: Hello World And i encountered two problems: 1. In the IN message exists the following curious header: HEADER NAME: Hello World

Re: Jetty component and HTTP parameter

2009-07-10 Thread SwenVogel
I have tested the feature with apache-camel-2.0-SNAPSHOT.zip (Thu Jul 09 17:35:12 GMT+00:00 2009) and send a very simple XML file as request body: Hello World And i encountered two problems: 1. In the IN message exists the following curious header: HEADER NAME: Hello World

Re: Jetty component and HTTP parameter

2009-07-06 Thread Willem Jiang
Hi , I just create a JIRA[1] and submitted a patch for it. It make take less than a day for the daily snapshot release. You can try out the camel lasted snapshot for it. [1]https://issues.apache.org/activemq/browse/CAMEL-1806 Willem SwenVogel wrote: :wistle:, your absolutely right. With HTTP-

Re: Jetty component and HTTP parameter

2009-07-06 Thread Willem Jiang
Hi You could get the parameters from the servlet request object which you can get from message body. HttpServletRequest req = exchange.getIn().getBody(HttpServletRequest.class); If you don't like it, please feel free to add a JIRA for it. Willem SwenVogel wrote: :wistle:, your absolutely rig

Re: Jetty component and HTTP parameter

2009-07-06 Thread Claus Ibsen
On Mon, Jul 6, 2009 at 3:51 PM, SwenVogel wrote: > > :wistle:, your absolutely right. > With HTTP-GET it works fine and the two headers are created with the correct > values. > > When using POST the CamelHttpQuery header is populated in the same way like > using GET: > CamelHttpQuery value: ein=1&z

Re: Jetty component and HTTP parameter

2009-07-06 Thread SwenVogel
:wistle:, your absolutely right. With HTTP-GET it works fine and the two headers are created with the correct values. When using POST the CamelHttpQuery header is populated in the same way like using GET: CamelHttpQuery value: ein=1&zwei=2 So, would it ok to process the CamelHttpQuery header and

Re: Jetty component and HTTP parameter

2009-07-06 Thread Claus Ibsen
On Mon, Jul 6, 2009 at 3:06 PM, SwenVogel wrote: > > I always use curl for simple HTTP test's. > > In this case: > curl -...@test.xml http://localhost/test?one=einz&two=twei > > (@test.xml send a simple xml file as post request data) Ah you use HTTP POST, that does not support sending URI paramete

Re: Jetty component and HTTP parameter

2009-07-06 Thread SwenVogel
I always use curl for simple HTTP test's. In this case: curl -...@test.xml http://localhost/test?one=einz&two=twei (@test.xml send a simple xml file as post request data) -- View this message in context: http://www.nabble.com/Jetty-component-and-HTTP-parameter-tp24287116p24355105.html Sent fro

Re: Jetty component and HTTP parameter

2009-07-06 Thread Claus Ibsen
Hi How are you sending the request maybe there is a glitch there? On Mon, Jul 6, 2009 at 2:35 PM, SwenVogel wrote: > > Hi > > i looked at the JettyHttpGetWithParamAsExchangeHeaderTest. > > The test uses the URI parameters ?one=einz&two=twei > and expects two separate headers "one" and "two". > >

Re: Jetty component and HTTP parameter

2009-07-06 Thread SwenVogel
Hi i looked at the JettyHttpGetWithParamAsExchangeHeaderTest. The test uses the URI parameters ?one=einz&two=twei and expects two separate headers "one" and "two". When i use the same URI parameter i would suspect to get the header values with exchange.getIn().getHeader("one", String.class); b

Re: Jetty component and HTTP parameter

2009-07-01 Thread Claus Ibsen
See unit test: JettyHttpGetWithParamAsExchangeHeaderTest from this link https://svn.apache.org/repos/asf/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/ On Wed, Jul 1, 2009 at 3:56 PM, Claus Ibsen wrote: > On Wed, Jul 1, 2009 at 11:51 AM, SwenVogel wrote: >> >>

Re: Jetty component and HTTP parameter

2009-07-01 Thread Claus Ibsen
On Wed, Jul 1, 2009 at 11:51 AM, SwenVogel wrote: > > Hi, > > i have read the documentation for jetty component and found the following: > > For instance of a client request with http://myserver/myserver?orderid=123 > then the exchange will contain a header named orderid with the value 123 > > Ok,