Re: Null parameters when routing CXFRS endpoints

2010-04-11 Thread jejmaster
t;>>>>>>> >>>>>>>>> >>>>>>>>> Still, the parameters, gets null after this method.invoke(..) >>>>>>>>> reflection. >>>>>>>>> >>>>>>>>> >>>>>>>>> Im still digging on it and checking if i could replicate the >>>>>>>>> reflection >>>>>>>>> part. Can you also analyze/replicate it? >>>>>>>>> >>>>>>>>> Thanks. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> willem.jiang wrote: >>>>>>>>>> Hi, >>>>>>>>>> >>>>>>>>>> Can I see the code that you do in the testProcessor? >>>>>>>>>> If you don't set the exchange.outMessage(), you should get the >>>>>>>>>> right >>>>>>>>>> parameter from the inMessage body. >>>>>>>>>> >>>>>>>>>> Willem >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> jejmaster wrote: >>>>>>>>>>> Hello, >>>>>>>>>>> >>>>>>>>>>> I am using the Camel 2.3-SNAPSHOT and implementing the CXFRS >>>>>>>>>>> routing >>>>>>>>>>> through >>>>>>>>>>> ProxyClient. I have setup my JAXRS Service Class method to >>>>>>>>>>> accept >>>>>>>>>>> 2 >>>>>>>>>>> parameters, a String and an Object. The service is working fine >>>>>>>>>>> when >>>>>>>>>>> i >>>>>>>>>>> am >>>>>>>>>>> invoking it directly but when i am using the cxfrs camel >>>>>>>>>>> routing, >>>>>>>>>>> these >>>>>>>>>>> 2 >>>>>>>>>>> parameters are having null values. Anyway here's my setup: >>>>>>>>>>> >>>>>>>>>>> My Service/Resource Class: >>>>>>>>>>> >>>>>>>>>>> @Path("/myservice") >>>>>>>>>>> Class MyService{ >>>>>>>>>>> >>>>>>>>>>>@POST >>>>>>>>>>>@Path("/myMethod") >>>>>>>>>>>public ModelCollectionTO getPatients(@FormParam("loc") String >>>>>>>>>>> location, >>>>>>>>>>> @FormParam("") ModelTO modelTO){ >>>>>>>>>>> log.debug(location); >>>>>>>>>>> log.debug(modelTO); >>>>>>>>>>> >>>>>>>>>>> } >>>>>>>>>>> } >>>>>>>>>>> >>>>>>>>>>> Router Definition: >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I tried to use a test processor to capture the exchange and the >>>>>>>>>>> inMessage. >>>>>>>>>>> The 2 parameters are correct. with values: >>>>>>>>>>> >>>>>>>>>>> location: "String"; >>>>>>>>>>> ModelTO: firstName="FirstName", lastName="LastName" >>>>>>>>>>> >>>>>>>>>>> But after it routes through the endpoint, the 2 parameters are >>>>>>>>>>> getting >>>>>>>>>>> null >>>>>>>>>>> values: >>>>>>>>>>> >>>>>>>>>>> location: null; >>>>>>>>>>> ModelTO: firstname=null, lastName=null. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I have checked the camel-cxf code and enabled the Trace logging. >>>>>>>>>>> I >>>>>>>>>>> might >>>>>>>>>>> need additional logs in the invokeProxyClient method of the >>>>>>>>>>> CxfRsProducer to >>>>>>>>>>> see where the inMessage.getBody() values gets converted or loss >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>> >>> >>> >> > > > -- View this message in context: http://old.nabble.com/Null-parameters-when-routing-CXFRS-endpoints-tp28186748p28207107.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Null parameters when routing CXFRS endpoints

2010-04-10 Thread Willem Jiang
I don't think current Spring DSL support to set the Object[] into header. I'm afraid you need to use processor or Java DSL to do this job. Willem jejmaster wrote: Hi Willem, Thats another good feature. But how do you set the Object[] varValues on CxfConstants.CAMEL_CXF_RS_VAR_VALUES message h

Re: Null parameters when routing CXFRS endpoints

2010-04-10 Thread jejmaster
> Can I see the code that you do in the testProcessor? >>>>>>>> If you don't set the exchange.outMessage(), you should get the >>>>>>>> right >>>>>>>> parameter from the inMessage body. >>>>>>>> >>>>>>>> Willem >>>>>>>> >>>>>>>> >>>>>>>> jejmaster wrote: >>>>>>>>> Hello, >>>>>>>>> >>>>>>>>> I am using the Camel 2.3-SNAPSHOT and implementing the CXFRS >>>>>>>>> routing >>>>>>>>> through >>>>>>>>> ProxyClient. I have setup my JAXRS Service Class method to accept >>>>>>>>> 2 >>>>>>>>> parameters, a String and an Object. The service is working fine >>>>>>>>> when >>>>>>>>> i >>>>>>>>> am >>>>>>>>> invoking it directly but when i am using the cxfrs camel routing, >>>>>>>>> these >>>>>>>>> 2 >>>>>>>>> parameters are having null values. Anyway here's my setup: >>>>>>>>> >>>>>>>>> My Service/Resource Class: >>>>>>>>> >>>>>>>>> @Path("/myservice") >>>>>>>>> Class MyService{ >>>>>>>>> >>>>>>>>>@POST >>>>>>>>>@Path("/myMethod") >>>>>>>>>public ModelCollectionTO getPatients(@FormParam("loc") String >>>>>>>>> location, >>>>>>>>> @FormParam("") ModelTO modelTO){ >>>>>>>>> log.debug(location); >>>>>>>>> log.debug(modelTO); >>>>>>>>> >>>>>>>>> } >>>>>>>>> } >>>>>>>>> >>>>>>>>> Router Definition: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> I tried to use a test processor to capture the exchange and the >>>>>>>>> inMessage. >>>>>>>>> The 2 parameters are correct. with values: >>>>>>>>> >>>>>>>>> location: "String"; >>>>>>>>> ModelTO: firstName="FirstName", lastName="LastName" >>>>>>>>> >>>>>>>>> But after it routes through the endpoint, the 2 parameters are >>>>>>>>> getting >>>>>>>>> null >>>>>>>>> values: >>>>>>>>> >>>>>>>>> location: null; >>>>>>>>> ModelTO: firstname=null, lastName=null. >>>>>>>>> >>>>>>>>> >>>>>>>>> I have checked the camel-cxf code and enabled the Trace logging. I >>>>>>>>> might >>>>>>>>> need additional logs in the invokeProxyClient method of the >>>>>>>>> CxfRsProducer to >>>>>>>>> see where the inMessage.getBody() values gets converted or loss >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>> >>> >>> >> > > > -- View this message in context: http://old.nabble.com/Null-parameters-when-routing-CXFRS-endpoints-tp28186748p28202521.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Null parameters when routing CXFRS endpoints

2010-04-10 Thread Willem Jiang
Oh. my mistake. If you take a look at the CxfRsProducer.invokeProxyClient(Exchange exchange), you will find you need to set CxfConstants.CAMEL_CXF_RS_VAR_VALUES message header to set the varValues if there are more than one resource class to create a right proxy. Willem jejmaster wrote: I s

Re: Null parameters when routing CXFRS endpoints

2010-04-09 Thread jejmaster
have setup my JAXRS Service Class method to accept 2 >>>>>>> parameters, a String and an Object. The service is working fine when >>>>>>> i >>>>>>> am >>>>>>> invoking it directly but when i am using the cxfrs camel routin

Re: Null parameters when routing CXFRS endpoints

2010-04-09 Thread Willem Jiang
It's hard to create the Proxy without specify the ResourceClass. HttpClient API is more friendly, as you don't need to specify the ResourceClass when creating the client. Willem jejmaster wrote: Hi Willem, Its working enough in 2.3-SNAPSHOT. but we decided to use 2.2 as of the moment until 2

Re: Null parameters when routing CXFRS endpoints

2010-04-09 Thread jejmaster
quot;/myMethod") >>>>>public ModelCollectionTO getPatients(@FormParam("loc") String >>>>> location, >>>>> @FormParam("") ModelTO modelTO){ >>>>> log.debug(location); >>>>> log.debug(modelTO); >>>>> >>>>> } >>>>> } >>>>> >>>>> Router Definition: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> I tried to use a test processor to capture the exchange and the >>>>> inMessage. >>>>> The 2 parameters are correct. with values: >>>>> >>>>> location: "String"; >>>>> ModelTO: firstName="FirstName", lastName="LastName" >>>>> >>>>> But after it routes through the endpoint, the 2 parameters are getting >>>>> null >>>>> values: >>>>> >>>>> location: null; >>>>> ModelTO: firstname=null, lastName=null. >>>>> >>>>> >>>>> I have checked the camel-cxf code and enabled the Trace logging. I >>>>> might >>>>> need additional logs in the invokeProxyClient method of the >>>>> CxfRsProducer to >>>>> see where the inMessage.getBody() values gets converted or loss >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >> > > > -- View this message in context: http://old.nabble.com/Null-parameters-when-routing-CXFRS-endpoints-tp28186748p28190020.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Null parameters when routing CXFRS endpoints

2010-04-09 Thread Willem Jiang
Hi Jejo, I just checked the code of CxfRsProducer, the parameter is taken from the inMessageBody with Object[].class. Maybe something is wrong with this part of code. Can you attach a small test case into the JIRA? It will help us to find a way to resolve this issue quickly. Willem jejmast

Re: Null parameters when routing CXFRS endpoints

2010-04-09 Thread Willem Jiang
Hi Jejo Please feel free to log a JIRA for it, doesn't the HttpClient work good for you ? Willem jejmaster wrote: I found out that JAXRS Client only sends 1 parameter. So i will just have to configure my service class to only accept 1 parameter instead of two. Ill just wrap it in a transfer

Re: Null parameters when routing CXFRS endpoints

2010-04-09 Thread jejmaster
I tried to use a test processor to capture the exchange and the >>> inMessage. >>> The 2 parameters are correct. with values: >>> >>> location: "String"; >>> ModelTO: firstName="FirstName", lastName="LastName" >>> >>> But after it routes through the endpoint, the 2 parameters are getting >>> null >>> values: >>> >>> location: null; >>> ModelTO: firstname=null, lastName=null. >>> >>> >>> I have checked the camel-cxf code and enabled the Trace logging. I might >>> need additional logs in the invokeProxyClient method of the >>> CxfRsProducer to >>> see where the inMessage.getBody() values gets converted or loss >>> >>> >>> >>> >>> >> >> >> > > -- View this message in context: http://old.nabble.com/Null-parameters-when-routing-CXFRS-endpoints-tp28186748p28189696.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Null parameters when routing CXFRS endpoints

2010-04-08 Thread jejmaster
t;FirstName", lastName="LastName" >> >> But after it routes through the endpoint, the 2 parameters are getting >> null >> values: >> >> location: null; >> ModelTO: firstname=null, lastName=null. >> >> >> I have checke

Re: Null parameters when routing CXFRS endpoints

2010-04-08 Thread Willem Jiang
Hi, Can I see the code that you do in the testProcessor? If you don't set the exchange.outMessage(), you should get the right parameter from the inMessage body. Willem jejmaster wrote: Hello, I am using the Camel 2.3-SNAPSHOT and implementing the CXFRS routing through ProxyClient. I have s

Null parameters when routing CXFRS endpoints

2010-04-08 Thread jejmaster
t need additional logs in the invokeProxyClient method of the CxfRsProducer to see where the inMessage.getBody() values gets converted or loss -- View this message in context: http://old.nabble.com/Null-parameters-when-routing-CXFRS-endpoints-tp28186748p28186748.html Sent from the Camel - Users mailing list archive at Nabble.com.