I am extending AbstractPhaseInterceptor, and I want to get hold of the JAXWS web service object, in INVOKE or PRE_INVOKE phase. How do I do this?
To be clear, I need to get a reference to the object that implements the web service methods, so:
@WebService(...)
public class ExampleWebService
{
@WebMethod(...)
public void doSomething(...)
{
}
}
public class MyInterceptor
extends AbstractPhaseInterceptor<Message>
{
public MyInterceptor()
{
super(Phase.INVOKE);
}
@Override
public void handleMessage(Message message)
throws Fault
{
ExampleWebService serviceObject = getServiceObject(message);
}
private static ExampleWebService getServiceObject(Message messsage)
{
// how do I implement this?
}
}