* @return the result of the invocation as org.w3c.dom.Element
*/
public Element invoke(Element requestBody)
{
String action = _environment.getAddressingContext().getAction();
Capability capability = getCapabilityForAction(action);
// Sanity check : is there a capability for the given action?
if (capability == null)
{
SoapFault wsaFault = new SoapFault(
String.format(
Messages.ACTION_NOT_SUPPORTED,
action,getContextPath()));
wsaFault.setCode(SoapConstants.SENDER_QNAME);
wsaFault.setSubCode(WsaConstants.ACTION_NOT_SUPPORTED_FAULT_QNAME);
Element detail = XmlUtils.createElement(WsaConstants.PROBLEM_ACTION_QNAME);
XmlUtils.setElement(detail, WsaConstants.ACTION_QNAME, action);
wsaFault.setDetail(detail);
LOGGER.error(
Messages.QMAN_100020_ACTION_NOT_SUPPORTED,
action,
getContextPath());
return wsaFault.toXML();
}
MessageHandler handler = capability.getMessageHandler(action);
Method method = handler.getMethod();
try
{
Object[]parameters = handler.fromXML(requestBody);