reqMessage = msgContext.getMessageAbstraction();
sepInv = binding.unbindRequestMessage(opMetaData, reqMessage);
}
// Invoke an instance of the SEI implementation bean
Invocation inv = setupInvocation(endpoint, sepInv, invContext);
InvocationHandler invHandler = endpoint.getInvocationHandler();
try
{
invHandler.invoke(endpoint, inv);
}
catch (InvocationTargetException th)
{
//Unwrap the throwable raised by the service endpoint implementation
Throwable targetEx = th.getTargetException();
throw (targetEx instanceof Exception ? (Exception)targetEx : new UndeclaredThrowableException(targetEx));
}
finally
{
// JBWS-2486
if (endpoint.getAttachment(Object.class) == null)
{
endpoint.addAttachment(Object.class, inv.getInvocationContext().getTargetBean());
}
}
// Handler processing might have replaced the endpoint invocation
sepInv = inv.getInvocationContext().getAttachment(EndpointInvocation.class);
}
finally
{
msgContext.remove(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
}