Hi.
I'm wondering if its possible to setup a default resource/service class to
handle requests that don't otherwise match existing resources in the server?
I'm new to CXF and JAX-RS, so I apologize if this is a painfully obvious
question. But somehow, I couldn't find any answers to it in the
documentation or on the forums. Perhaps I don't know the right key words
yet... At any rate, I'd really appreciate any help anyone could offer.
Here is a very simple example to explain what I'm trying to do:
interface AKnownResource {
@path("/a/known/path/with/{variables}")
Response aKnownMethod();
}
interface ADefaultResource {
// Not sure what to put for @path()
Response defaultResource();
}
With the idea that request for "http://mydomain/a/known/path/with/variables"
would invoke aKnownMethod(), while any other URL would invoke
defaultResource().
I've tried using the regex variable syntax to register the default service,
such as:
@Path("{path:(.)+}")
This successfully invokes the defaultResource() method, but then the server
fails to find a subresource to complete the processing of the response.:
"No operation matching request path l is found on subresource"
I'm sure I am going about this all wrong. Would anyone mind pointing me in
the right direction?
Thank you,
-Devon
--
View this message in context:
http://www.nabble.com/Is-it-possible-to-register-a-default-resource--tp25828961p25828961.html
Sent from the cxf-user mailing list archive at Nabble.com.