Hi
On 02/08/13 16:02, James Green wrote:
Is there a project on say GitHub that demonstrates serious use of both
JAX-RS and JAX-WS with proper exceptions being reported by both interfaces?

It's one thing reading from the documentation and very narrow examples but
it would be very useful to read the sources of a major finished project to
see how it's done.

It would be nice to see such an example proving both styles of interface
via one set of classes with associated parameters and responses and
exceptions.
Using a single (Java) interface to represent both JAX-WS & JAX-RS endpoints can be useful: - as a proof of concept (ex, you have a SOAP endpoint, can the same service bean used to support RS calls ?, etc) - when you have a SOAP endpoint and you have a strict requirement to reuse it for RS calls

I'm saying it to suggest that really complex projects would likely have independent interfaces, as sometimes it can be difficult to use the same interface to represent different communication styles, or even to map non-WS URI + body to WS interface parameters.

That said: as far as as the exceptions are concerned - this is the easiest part - for RS endpoint you just register one or few JAX-RS ExceptionMapper(s) and map them to whatever HTTP status code is appropriate in a given context

Cheers, Sergey

Any suggestions?

Thanks,

James



Reply via email to