URL Rewriting in Apache CXF JAX/RS call
How to make a jax/rs call with path params having slashes embedded in it?
@DELETE
@Path("/extended/universal/{CID}")
@Produces( { XML, JSON })
public Response deleteCID( @PathParam("CID") String cId ) throws Exception
{
}
Here, {CID} contains a string sometimes as - u开发者_StackOverflowrn:cid:URI:http://example.com:80001/index.html
I am running out of ideas, Intercepting and redirecting to an altered URL is not an option. Please do let me know if Apache CXF provides any guidelines for such an issue.
Thanks, Srikanth
By default, the path components don't capture slashes. You can override this by explicitly providing a regular expression that says what a fragment should match. In your case, use a path like this:
@Path("/extended/universal/{CID:.+}")
That's assuming you don't want to match an empty CID. If you do, change the +
to a *
.
精彩评论