1 16 17 package org.apache.axis.handlers.http; 18 19 import org.apache.axis.AxisFault; 20 import org.apache.axis.MessageContext; 21 import org.apache.axis.components.logger.LogFactory; 22 import org.apache.axis.handlers.BasicHandler; 23 import org.apache.axis.utils.Messages; 24 import org.apache.commons.logging.Log; 25 26 27 38 public class HTTPActionHandler extends BasicHandler 39 { 40 protected static Log log = 41 LogFactory.getLog(HTTPActionHandler.class.getName()); 42 43 public void invoke(MessageContext msgContext) throws AxisFault 44 { 45 log.debug("Enter: HTTPActionHandler::invoke"); 46 47 49 if ( msgContext.getService() == null ) { 50 String action = (String ) msgContext.getSOAPActionURI(); 51 log.debug( " HTTP SOAPAction: " + action ); 52 53 57 if (action == null) { 58 throw new AxisFault( "Server.NoHTTPSOAPAction", 59 Messages.getMessage("noSOAPAction00"), 60 null, null ); 61 } 62 63 action = action.trim(); 64 65 if (action.length() > 0 && action.charAt(0) == '\"') { 67 if (action.equals("\"\"")) { 69 action = ""; 70 } else { 71 action = action.substring(1, action.length() - 1); 72 } 73 } 74 75 if (action.length() > 0) { 77 msgContext.setTargetService( action ); 78 } 79 } 80 81 log.debug("Exit: HTTPActionHandler::invoke"); 82 } 83 } 84 | Popular Tags |