Re: Query paramteres in the REST DSL - Camel 2.14

2014-10-21 Thread Willem Jiang
I’m afraid we don’t support that, do you mind create a JIRA for it?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On October 17, 2014 at 7:54:30 PM, panzerhans (espen+ca...@tjonneland.no) wrote:
 Thank you for your answer.
  
 If this is how the Rest DSL enables it, how is it then possible to tell E.G.
 the new Swagger component that we are supporting the two parameters?
  
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Query-paramteres-in-the-REST-DSL-Camel-2-14-tp5757650p5757724.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: Query paramteres in the REST DSL - Camel 2.14

2014-10-21 Thread panzerhans
I will, and have: https://issues.apache.org/jira/browse/CAMEL-7936

Thanks.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Query-paramteres-in-the-REST-DSL-Camel-2-14-tp5757650p5757831.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Query paramteres in the REST DSL - Camel 2.14

2014-10-17 Thread Willem Jiang
The query parameters are put into message header, you can get username and 
password just like this
rest(/user).description(User services) 
.get(/login”).process(new Processor() {
                            public void process(Exchange exchange) throws 
Exception {
                                String username = 
exchange.getIn().getHeader(username, String.class);
                                String password = 
exchange.getIn().getHeader(password, String.class);
                                ...
                            }
                        });

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On October 17, 2014 at 4:23:09 PM, panzerhans (espen+ca...@tjonneland.no) wrote:
 I am unable to figure out how to expose Query params to a Rest resource
 exposed with the new Rest DSL in Camel 2.14
  
 How would I go about to enable something like 'username' and 'password' via
 query params?
  
 rest(/user).description(User services)
 .get(/login).description(Login user. NB, user parameters
 'username' and 'password')
 .outType(UserDTO.class) *-- missing setting of query params*
  
 Call: http://localhost:8080/user/get?username=blahblahpassword=secretstuff  
  
 *NB! * The example above is constructed, What I am trying to convey is I am
 unable to find any way with the REST DSL to append a Query param.
  
  
  
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Query-paramteres-in-the-REST-DSL-Camel-2-14-tp5757650.html
   
 Sent from the Camel - Users mailing list archive at Nabble.com.
  



Re: Query paramteres in the REST DSL - Camel 2.14

2014-10-17 Thread panzerhans
Thank you for your answer. 

If this is how the Rest DSL enables it, how is it then possible to tell E.G.
the new Swagger component that we are supporting the two parameters?




--
View this message in context: 
http://camel.465427.n5.nabble.com/Query-paramteres-in-the-REST-DSL-Camel-2-14-tp5757650p5757724.html
Sent from the Camel - Users mailing list archive at Nabble.com.