camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: CXFRS URL Matrix Parameters seemingly stripped away
Date Thu, 14 Jun 2012 16:19:15 GMT
Hi
On 14/06/12 16:59, desysemia wrote:
> This is my first time posting here, so a big hello from me!
>
> Let me start off by stating I'm quite new to Camel and CXF so the issue I'm
> seeing might well just be my own doing.
>
> I'm currently running FuseESB/ServiceMix 3.6/4.4.1 including Camel version
> 2.8.0.
>
> The short version:
>
> is that the PathSegment.getMatrixParameters method returns an empty
> collection if the resource is accessed through the URL made available
> through the rsServer endpoint, but as expected when accessed through the
> rsClient endpoint.  But therefore as I understand it not therefore using the
> Camel route at all.
>
> So to me somewhere along the line Camel/CXF is stripping of the matrix
> parameters, thoughts?
>

In CXF alone, HTTPServletRequest.getRequestURI() is used in CXF 
AbstractHTTPDestination to capture the relative path including the 
matrix parameters if any, for the subsequent match to succeed.

I've confirmed locally that matrix parameters are correctly captured 
with the nearly identical test resource method signature.

Perhaps in your case CXF Message.REQUEST_URI property is set by CXF 
Camel differently which may be causing the loss of the parameters

Cheers, Sergey

> The long version:
>
> So here goes with the scenario;
>
> I have a Camel route defined using the rsServer and rsClient endpoints, and
> I have a resource class implemented and used by both endpoints with a single
> JAXRS annotated method as such;
>
> @GET
> @Path ( "object/{context}/{version}" )
> public String getObject ( @PathParam ( "context" ) PathSegment context,
> 			@PathParam ( "version" ) float version );
>
> This is invoked through the rsServer endpoint URL like so;
>
> http://localhost:9000/test/object/id;key1=value1;key2=value2/1.0
>
> Then calling the getMatrixParameters method on the 'context' parameter
> returns an empty collection.
>
> However if this is invoked through the rsClient endpoint URL like so;
>
> http://localhost:9001/test/object/id;key1=value1;key2=value2/1.0
>
> Then calling the getMatrixParameters method on the 'context' parameter
> returns a collection containing the two key/value pairs as described.
>
> Hopefully someone out there can point me in the right direction here?
>
> Thanks in advance.
>
> D.
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/CXFRS-URL-Matrix-Parameters-seemingly-stripped-away-tp5714486.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Mime
View raw message