Camel cxf with multiple querystring sets all parameters to null except first.
Issue
- Not able to capture request parameters in REST webservice.
- Facing same problem explained in http://rerun.me/2013/11/14/camel-cxf-service-with-multiple-query-parameters/
- Implemented a
RESTservice following way.
<cxf:rsServer id="CxfEndpoint" address="/cxfendpoint" serviceClass="xxx.xxx.test">
<cxf:providers>
<bean id="jsonProvider" class="xxx.xxx.JacksonConfig" factory-method="getProvider" />
</cxf:providers>
</cxf:rsServer>
<camelContext id="httpGatewayContext" xmlns="http://camel.apache.org/schema/blueprint" >
<route id="startMngRoute">
<from uri="cxfrs:bean:CxfEndpoint" />
<log message="${in.body}" />
<setHeader headerName="CamelBeanMethodName">
<simple>${header.operationName}</simple>
</setHeader>
<to uri="bean:serviceBean"/>
</route>
</camelContext>
- Query-parameters are declared following way.
@GET
@Path("/enterprise")
@Produces(MediaType.APPLICATION_JSON)
public Response retriveEnterprise(@QueryParam("transactionId") String transactionId, @QueryParam("enterpriseAlias") String enterpriseAlias)
throws DaoException { ... }
- The enterpriseAlias variable is always NULL. It seems that the binding doesn't work properly.
Environment
- Red Hat JBoss Fuse
- 6.1.0
- 6.2.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.