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.transport.http.HTTPConstants; 24 import org.apache.commons.logging.Log; 25 26 27 32 public class URLMapper extends BasicHandler 33 { 34 protected static Log log = 35 LogFactory.getLog(URLMapper.class.getName()); 36 37 public void invoke(MessageContext msgContext) throws AxisFault 38 { 39 log.debug("Enter: URLMapper::invoke"); 40 41 43 if ( msgContext.getService() == null ) { 44 String path = (String )msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETPATHINFO); 46 if ((path != null) && (path.length() >= 1)) { if(path.startsWith("/")) 48 path = path.substring(1); 50 msgContext.setTargetService( path ); 51 } 52 } 53 54 log.debug("Exit: URLMapper::invoke"); 55 } 56 57 public void generateWSDL(MessageContext msgContext) throws AxisFault { 58 invoke(msgContext); 59 } 60 } 61 | Popular Tags |