log.debug("Enter: HTTPActionHandler::invoke");
/** If there's already a targetService then just return.
*/
if ( msgContext.getService() == null ) {
String action = (String) msgContext.getSOAPActionURI();
log.debug( " HTTP SOAPAction: " + action );
/** The idea is that this handler only goes in the chain IF this
* service does a mapping between SOAPAction and target. Therefore
* if we get here with no action, we're in trouble.
*/
if (action == null) {
throw new AxisFault( "Server.NoHTTPSOAPAction",
Messages.getMessage("noSOAPAction00"),
null, null );
}
action = action.trim();
// handle empty SOAPAction
if (action.length() > 0 && action.charAt(0) == '\"") {
// assertTrue(action.endsWith("\"")
if (action.equals("\"\"")) {
action = "";
} else {
action = action.substring(1, action.length() - 1);
}
}
// if action is zero-length string, don't set anything
if (action.length() > 0) {
msgContext.setTargetService( action );
}
}
log.debug("Exit: HTTPActionHandler::invoke");