public QName[] getHeaders() {
return new QName[0];
}
public boolean handleRequest(MessageContext context) {
EJBInvocation inv = null;
try {
WebServiceContractImpl wscImpl = WebServiceContractImpl.getInstance();
InvocationManager invManager = wscImpl.getInvocationManager();
inv = (EJBInvocation) invManager.getCurrentInvocation();
Method webServiceMethodInPreHandler = inv.getWebServiceMethod();
if( webServiceMethodInPreHandler != null ) {
// Now that application handlers have run, do another method
// lookup and compare the results with the original one. This
// ensures that the application handlers have not changed
// the message context in any way that would impact which
// method is invoked.
Method postHandlerMethod = wsUtil.getInvMethod(
(com.sun.xml.rpc.spi.runtime.Tie)inv.getWebServiceTie(), context);
if( !webServiceMethodInPreHandler.equals(postHandlerMethod) ) {
throw new UnmarshalException("Original method " + webServiceMethodInPreHandler +
" does not match post-handler method ");
}
}