ComponentInvocation inv = null;
try {
Switch theSwitch = Switch.getSwitch();
InvocationManager invManager = theSwitch.getInvocationManager();
inv = invManager.getCurrentInvocation();
Method webServiceMethodInPreHandler = inv.getWebServiceMethod();
if( webServiceMethodInPreHandler != null ) {
Method postHandlerMethod =
wsUtil.getInvMethod(inv.getWebServiceTie(), context);
if( !webServiceMethodInPreHandler.equals(postHandlerMethod) ) {
throw new UnmarshalException
("Original method " + webServiceMethodInPreHandler
+ " does not match post-handler method " +
postHandlerMethod);
}
}
} catch(Exception e) {
logger.log(Level.WARNING, "postWebHandlerError", e);
wsUtil.throwSOAPFaultException(e.getMessage(), context);
}
return true;