Hi,

I'm invoking my REST service via the browser adding it a GET param - amount.

I'm able to extract it from the request inside the consumer marshaler, place
it on the properties map & pass it to my camel router.

In my camle router i than invoke a provider via producer template. I pass
all my arguments (including 'amount') in the send method as follows:

Object resp = producerTemplate.requestBody(serviceProviderEP,
serviceProviderExchange.getIn().getHeaders());

The Headers inside my 'in' include the 'amount' param.

My next stage is the provider's REST marshaler - createRequest() method.

public void createRequest(MessageExchange exchange, NormalizedMessage inMsg,
SmxHttpExchange httpExchange) throws Exception {
        httpExchange.setURL(getLocationUri(exchange, inMsg));

In nither of the above bolded arguments i can spot my params - if you
inspect the properties map - it's empty from some reason. - Up until now i
worked it around with in the xbean, including the amount at the end of the
locationURIExpression - but it's hard coded.

My questions are:

1. Why does the properties map in the message exchange no longer exists
after i call the requestBody method?
2. Can you suggest a better way to pass a GET param from the consumer
marshaler to the provider marshaler?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Problem-passing-GET-params-for-RestProviderMarshaler-tp22023551p22023551.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to