Hi,
I’ve recently successfully implemented a JAX-WS service
using Jetty 8 ( 8.0.4 ) and the JAXWS2SPI package ( 7.0.1 ). Jetty
is embedded and configuration is done through code rather than xml. I’m
using an Endpoint to publish the service. This works perfectly ( Jetty is
a great tool ).
However has anyone been able to successfully implement authentication (
BASIC or higher even ) when using an Endpoint and the JAXWS2SPI package ?
I’ve been able to get authentication working for servlets in Jetty without
any problems using “server.addBean(myLoginService)”. This works
perfectly for servlets but not for the web service, I’ve determine that
the login service is not actually being accessed by Jetty.
I’ve also tried using a ConstraintSecurityHandler instead of
addBean(myLoginService) without any luck, it seems that I need to set a
handler for ConstraintSecurityHandler but I’m unsure what it should be, I
don't have access to the JAXWS2ContextHandler as its injected at runtime and
there is no way to get a reference to it.
I’m sure with both of these methods I am doing something stupid or at least
just wrong, but I cant find any good documentation on either at the
moment. I can provide code if needed but didnt want to
overcomplicate the email.
Any help would be appreciated.
Thanks in advance