You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2001/08/21 23:26:02 UTC
cvs commit: xml-axis/java/src/org/apache/axis/utils Admin.java AxisClassLoader.java
gdaniels 01/08/21 14:26:02
Modified: java/src/org/apache/axis/handlers JWSProcessor.java
java/src/org/apache/axis/providers/java JavaProvider.java
MsgProvider.java RPCProvider.java
java/src/org/apache/axis/transport/http AxisServlet.java
java/src/org/apache/axis/utils Admin.java
AxisClassLoader.java
Log:
Fix some classpath issues.
Use the thread's context classloader in a couple places, and also
build up the full classpath when compiling JWS files.
Revision Changes Path
1.16 +115 -6 xml-axis/java/src/org/apache/axis/handlers/JWSProcessor.java
Index: JWSProcessor.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/JWSProcessor.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- JWSProcessor.java 2001/08/21 05:15:35 1.15
+++ JWSProcessor.java 2001/08/21 21:26:01 1.16
@@ -55,6 +55,12 @@
package org.apache.axis.handlers;
import java.io.* ;
+import java.util.StringTokenizer;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.jar.*;
+import java.net.URL;
+import java.net.URLClassLoader;
import org.apache.axis.* ;
import org.apache.axis.utils.Debug ;
@@ -97,8 +103,10 @@
Runtime rt = Runtime.getRuntime();
String jwsFile = msgContext.getStrProp(Constants.MC_REALPATH);
Debug.Print( 2, "jwsFile: " + jwsFile );
- String jFile = jwsFile.substring(0, jwsFile.length()-3) + "java" ;
- String cFile = jwsFile.substring(0, jwsFile.length()-3) + "class" ;
+ String jFile = jwsFile.substring(0, jwsFile.length()-3) +
+ "java" ;
+ String cFile = jwsFile.substring(0, jwsFile.length()-3) +
+ "class" ;
Debug.Print( 2, "jFile: " + jFile );
Debug.Print( 2, "cFile: " + cFile );
@@ -143,12 +151,12 @@
args = new String[] { "-d", outdir,
"-classpath",
- System.getProperty("java.class.path" ),
+ getDefaultClasspath(msgContext),
jFile };
boolean result = compiler.compile( args );
- /* Delete the temporary *.java file and check the return code */
- /**************************************************************/
+ /* Delete the temporary *.java file and check return code */
+ /**********************************************************/
(new File(jFile)).delete();
if ( !result ) {
@@ -191,7 +199,7 @@
msgContext.setServiceHandler( rpc );
rpc.addOption( "className", clsName );
-
+
/** For now, allow all methods - we probably want to have a way to
* configure this in the future.
*/
@@ -222,4 +230,105 @@
Debug.Print( 1, "Enter: JWSProcessor::undo" );
Debug.Print( 1, "Exit: JWSProcessor::undo" );
}
+
+ private String getDefaultClasspath(MessageContext msgContext)
+ {
+ StringBuffer classpath = new StringBuffer();
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+
+ while(cl != null)
+ {
+ if(cl instanceof URLClassLoader)
+ {
+ URL[] urls = ((URLClassLoader) cl).getURLs();
+
+ for(int i=0; i < urls.length; i++)
+ {
+ classpath.append(urls[i].getPath());
+ classpath.append(File.pathSeparatorChar);
+
+
+ // if its a jar extract Class-Path entries from manifest
+ File file = new File(urls[i].getFile());
+ if(file.isFile())
+ {
+ FileInputStream fis = null;
+
+ try
+ {
+ fis = new FileInputStream(file);
+
+ if(isJar(fis))
+ {
+ JarFile jar = new JarFile(file);
+ Manifest manifest = jar.getManifest();
+ if (manifest != null)
+ {
+ Attributes attributes = manifest.
+ getMainAttributes();
+ if (attributes != null)
+ {
+ String s = attributes.
+ getValue(java.util.jar.Attributes.Name.CLASS_PATH);
+ String base = file.getParent();
+
+ if (s != null)
+ {
+ StringTokenizer st =
+ new StringTokenizer(s, " ");
+ while(st.hasMoreTokens())
+ {
+ String t = st.nextToken();
+ classpath.append(base +
+ File.separatorChar + t);
+ classpath.append(
+ File.pathSeparatorChar);
+ }
+ }
+ }
+ }
+ }
+ }
+ catch(IOException ioe)
+ {
+ if(fis != null)
+ try {
+ fis.close();
+ } catch (IOException ioe2) {}
+ }
+ }
+ }
+ }
+
+ cl = cl.getParent();
+ }
+
+ // boot classpath isn't found in above search
+ if(System.getProperty("sun.boot.class.path") != null)
+ {
+ classpath.append(System.getProperty("sun.boot.class.path"));
+ }
+
+ return classpath.toString();
+ }
+
+ // an exception or emptiness signifies not a jar
+ public static boolean isJar(InputStream is)
+ {
+ try
+ {
+ JarInputStream jis = new JarInputStream(is);
+ if(jis.getNextEntry() != null)
+ {
+ return true;
+ }
+ }
+ catch(IOException ioe)
+ {
+ }
+
+ return false;
+ }
+
+
}
1.8 +148 -78 xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java
Index: JavaProvider.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- JavaProvider.java 2001/08/21 05:15:35 1.7
+++ JavaProvider.java 2001/08/21 21:26:01 1.8
@@ -70,167 +70,175 @@
* envelope body processing to subclass via abstract processMessage method.
*
* @author Doug Davis (dug@us.ibm.com)
+ * @author Carl Woolf (cwoolf@macromedia.com)
*/
public abstract class JavaProvider extends BasicProvider {
-
+
// from the original stubbed-out JavaProvider...
// not quite sure what these are for but it is to do with WSDD... -- RobJ
public static final String OPTION_CLASSNAME = "className";
public static final String OPTION_IS_STATIC = "isStatic";
public static final String OPTION_CLASSPATH = "classPath";
-
+
private static final boolean DEBUG_LOG = false;
-
+
+ private String classNameOption = "className";
+ private String allowedMethodsOption = "methodName";
+
/**
* Get the service object whose method actually provides the service.
* May look up in session table.
*/
- public Object getServiceObject (MessageContext msgContext, Handler service, JavaClass jc, String clsName)
+ public Object getServiceObject (MessageContext msgContext, Handler service,
+ Object so_factory, String clsName)
throws Exception
{
String serviceName = msgContext.getTargetService();
-
- // scope can be "Request", "Session", "Application" (as with Apache SOAP)
+
+ // scope can be "Request", "Session", "Application"
+ // (as with Apache SOAP)
String scope = (String)service.getOption("scope");
if (scope == null) {
// default is Request scope
scope = "Request";
}
-
+
if (scope.equals("Request")) {
-
+
// make a one-off
- return jc.getJavaClass().newInstance();
-
+ return getNewServiceObject(so_factory);
+
} else if (scope.equals("Session")) {
-
+
// look in incoming session
if (msgContext.getSession() != null) {
// store service objects in session, indexed by class name
Object obj = msgContext.getSession().get(serviceName);
if (obj == null) {
- obj = jc.getJavaClass().newInstance();
+ obj = getNewServiceObject(so_factory);
msgContext.getSession().set(serviceName, obj);
}
return obj;
} else {
// was no incoming session, sigh, treat as request scope
- return jc.getJavaClass().newInstance();
+ return getNewServiceObject(so_factory);
}
-
+
} else if (scope.equals("Application")) {
-
+
// MUST be AxisEngine here!
AxisEngine engine = msgContext.getAxisEngine();
if (engine.getApplicationSession() != null) {
// store service objects in session, indexed by class name
Object obj = engine.getApplicationSession().get(serviceName);
if (obj == null) {
- obj = jc.getJavaClass().newInstance();
+ obj = getNewServiceObject(so_factory);
engine.getApplicationSession().set(serviceName, obj);
}
return obj;
} else {
// was no incoming session, sigh, treat as request scope
- return jc.getJavaClass().newInstance();
+ return getNewServiceObject(so_factory);
}
-
+
} else {
-
+
// NOTREACHED
return null;
-
+
}
}
-
-
+
/**
* Process the current message. Side-effect resEnv to create return value.
*
* @param msgContext self-explanatory
* @param clsName the class name of the ServiceHandler
- * @param methodName the method name of ditto
+ * @param allowedMethods the 'method name' of ditto
* @param reqEnv the request envelope
* @param resEnv the response envelope
* @param jc the JavaClass of the service object
* @param obj the service object itself
*/
public abstract void processMessage (MessageContext msgContext,
- String clsName,
- String methodName,
+ String serviceUrn,
+ String allowedMethods,
SOAPEnvelope reqEnv,
SOAPEnvelope resEnv,
JavaClass jc,
Object obj)
throws Exception;
-
-
+
+
/**
* Invoke the message by obtaining various common fields, looking up
* the service object (via getServiceObject), and actually processing
* the message (via processMessage).
*/
public void invoke(MessageContext msgContext) throws AxisFault {
- Debug.Print( 1, "Enter: JavaProvider::invoke (for provider "+this+")" );
-
+ Debug.Print(1, "Enter: JavaProvider::invoke (for provider "+this+")");
+
/* Find the service we're invoking so we can grab it's options */
/***************************************************************/
- String serviceName = msgContext.getTargetService();
+ String serviceUrn = msgContext.getTargetService();
Handler service = msgContext.getServiceHandler();
-
+
/* Now get the service (RPC) specific info */
/********************************************/
- String clsName = (String) service.getOption( "className" );
- String methodName = (String) service.getOption( "methodName" );
-
+ String clsName = getServiceClassName(service);
+ String allowedMethods = getServiceAllowedMethods(service);
+
if ((clsName == null) || clsName.equals(""))
- throw new AxisFault("Server.NoClassForService",
- "No 'className' option was configured for the service '" +
- serviceName + "'",
- null, null);
-
- /** ??? Should we enforce setting methodName? As it was,
- * if it's null, we allowed any method. This seems like it might
- * be considered somewhat insecure (it's an easy mistake to
- * make). Tossing an Exception if it's not set, and using "*"
- * to explicitly indicate "any method" is probably better.
- */
- if ((methodName == null) || methodName.equals(""))
- throw new AxisFault("Server.NoMethodConfig",
- "No 'methodName' option was configured for the service '" +
- serviceName + "'",
- null, null);
-
- if (methodName.equals("*"))
- methodName = null;
-
+ throw new AxisFault("Server.NoClassForService",
+ "No '" +
+ getServiceClassNameOptionName() +
+ "' option was configured for the service '" +
+ serviceUrn + "'",
+ null, null);
+
+ /** ??? Should we enforce setting allowedMethods? As it was,
+ * if it's null, we allowed any method. This seems like it might
+ * be considered somewhat insecure (it's an easy mistake to
+ * make). Tossing an Exception if it's not set, and using "*"
+ * to explicitly indicate "any method" is probably better.
+ */
+ if ((allowedMethods == null) || allowedMethods.equals(""))
+ throw new AxisFault("Server.NoMethodConfig",
+ "No '" +
+ getServiceAllowedMethodsOptionName() +
+ "' option was configured for the service '" +
+ serviceUrn + "'",
+ null, null);
+
+ if (allowedMethods.equals("*"))
+ allowedMethods = null;
+
try {
- /* We know we're doing a Java/RPC call so we can ask for the */
- /* SOAPBody as an RPCBody and process it accordingly. */
- /*************************************************************/
int i ;
- AxisClassLoader cl = msgContext.getClassLoader();
- JavaClass jc = cl.lookup(clsName);
- Class cls = jc.getJavaClass();
- Object obj = getServiceObject(msgContext, service, jc, clsName);
-
- Message reqMsg = msgContext.getRequestMessage();
- SOAPEnvelope reqEnv = (SOAPEnvelope) reqMsg.getAsSOAPEnvelope();
- Message resMsg = msgContext.getResponseMessage();
- SOAPEnvelope resEnv = (resMsg == null) ?
- new SOAPEnvelope() :
- (SOAPEnvelope)resMsg.getAsSOAPEnvelope();
-
+
+ Object so_factory = getServiceObjectFactory(msgContext, clsName);
+ Object obj = getServiceObject(msgContext, service,
+ so_factory, clsName);
+ JavaClass jc = new JavaClass(obj.getClass());
+
+ Message reqMsg = msgContext.getRequestMessage();
+ SOAPEnvelope reqEnv = (SOAPEnvelope)reqMsg.getAsSOAPEnvelope();
+ Message resMsg = msgContext.getResponseMessage();
+ SOAPEnvelope resEnv = (resMsg == null) ?
+ new SOAPEnvelope() :
+ (SOAPEnvelope)resMsg.getAsSOAPEnvelope();
+
/** If the class knows what it should be exporting,
- * respect its wishes.
- */
+ * respect its wishes.
+ */
if (obj instanceof AxisServiceConfig) {
- methodName = ((AxisServiceConfig)obj).getMethods();
+ allowedMethods = ((AxisServiceConfig)obj).getMethods();
}
-
- processMessage(msgContext, serviceName, methodName, reqEnv, resEnv, jc, obj);
-
- // get the response message again! it may have been explicitly set!
+
+ processMessage(msgContext, serviceUrn, allowedMethods, reqEnv,
+ resEnv, jc, obj);
+
+ // get the response message again! It may have been explicitly set!
// (by, say, a proxy service :-) -- RobJ
if (msgContext.getResponseMessage() == null) {
resMsg = new Message(resEnv);
@@ -242,7 +250,7 @@
if ( !(exp instanceof AxisFault) ) exp = new AxisFault(exp);
throw (AxisFault) exp ;
}
- Debug.Print( 1, "Exit: JavaProvider::invoke (for provider "+this+")" );
+ Debug.Print( 1, "Exit: JavaProvider::invoke (for provider "+this+")");
}
public void generateWSDL(MessageContext msgContext) throws AxisFault {
@@ -304,5 +312,67 @@
Debug.Print( 1, "Enter: RPCDispatchHandler::undo" );
Debug.Print( 1, "Exit: RPCDispatchHandler::undo" );
}
+
+ ///////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////
+ /////// Default methods for java classes. Override, eg, for
+ /////// ejbeans
+ ///////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////
+
+ /**
+ * Default java service object comes from simply instantiating the
+ * class wrapped in jc
+ *
+ */
+ protected Object getNewServiceObject(Object factory)
+ throws Exception
+ {
+ JavaClass jc = (JavaClass)factory;
+
+ return jc.getJavaClass().newInstance();
+ }
+
+ /**
+ *
+ */
+ protected String getServiceClassName(Handler service)
+ {
+ return (String) service.getOption( classNameOption );
+ }
+ /**
+ *
+ */
+ protected String getServiceAllowedMethods(Handler service)
+ {
+ return (String) service.getOption( allowedMethodsOption );
+ }
+ /**
+ *
+ */
+ protected String getServiceClassNameOptionName()
+ {
+ return classNameOption;
+ }
+ /**
+ *
+ */
+ protected String getServiceAllowedMethodsOptionName()
+ {
+ return allowedMethodsOption;
+ }
+
+ /**
+ *
+ */
+ protected Object getServiceObjectFactory(MessageContext msgContext,
+ String clsName)
+ throws Exception
+ {
+ AxisClassLoader cl = msgContext.getClassLoader();
+ JavaClass jc = cl.lookup(clsName);
+
+ return jc;
+ }
-};
+}
1.6 +2 -2 xml-axis/java/src/org/apache/axis/providers/java/MsgProvider.java
Index: MsgProvider.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/MsgProvider.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- MsgProvider.java 2001/07/31 19:46:33 1.5
+++ MsgProvider.java 2001/08/21 21:26:01 1.6
@@ -82,7 +82,7 @@
* take the Request xml file and call the Admin processing.
*/
public void processMessage (MessageContext msgContext,
- String clsName,
+ String serviceUrn,
String methodName,
SOAPEnvelope reqEnv,
SOAPEnvelope resEnv,
@@ -114,7 +114,7 @@
* looking at the URL (transport-level dispatch), or even after looking
* into the SOAP message itself...)
*/
- if (clsName.equals("org.apache.axis.utils.Admin")) {
+ if (serviceUrn.equals("org.apache.axis.utils.Admin")) {
ServiceDescription sd = new ServiceDescription("Admin", false);
msgContext.setServiceDescription(sd);
}
1.13 +48 -32 xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java
Index: RPCProvider.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- RPCProvider.java 2001/07/29 16:01:05 1.12
+++ RPCProvider.java 2001/08/21 21:26:01 1.13
@@ -72,8 +72,8 @@
private static final boolean DEBUG_LOG = false;
public void processMessage (MessageContext msgContext,
- String clsName,
- String methodName,
+ String serviceUrn,
+ String allowedMethods,
SOAPEnvelope reqEnv,
SOAPEnvelope resEnv,
JavaClass jc,
@@ -106,11 +106,14 @@
}
}
}
-
- // methodName may be a comma-delimited string of method names.
+
+ // stays this way if allowedMethods is only one name, not a list
+ String methodNameMatch = allowedMethods;
+
+ // allowedMethods may be a comma-delimited string of method names.
// If so, look for the one matching mname.
- if (methodName != null && methodName.indexOf(' ') != -1) {
- StringTokenizer tok = new StringTokenizer(methodName, " ");
+ if (allowedMethods != null && allowedMethods.indexOf(' ') != -1) {
+ StringTokenizer tok = new StringTokenizer(allowedMethods, " ");
String nextMethodName = null;
while (tok.hasMoreElements()) {
String token = tok.nextToken();
@@ -124,26 +127,38 @@
throw new AxisFault( "AxisServer.error",
"Method names don't match\n" +
"Body method name=" + mName + "\n" +
- "Service method names=" + methodName,
+ "Service method names=" + allowedMethods,
null, null ); // should they??
}
- methodName = nextMethodName;
+ methodNameMatch = nextMethodName;
}
- if ( methodName != null && !methodName.equals(mName) )
+ if ( methodNameMatch != null && !methodNameMatch.equals(mName) )
throw new AxisFault( "AxisServer.error",
"Method names don't match\n" +
"Body name=" + mName + "\n" +
- "Service name=" + methodName,
+ "Service name=" + methodNameMatch + "\n" +
+ "Service nameList=" + allowedMethods,
null, null ); // should they??
Debug.Print( 2, "mName: ", mName );
- Debug.Print( 2, "MethodName: ", methodName );
- Method method = jc.getMethod(mName, args.size());
-
- // if the method wasn't found, try with one more parameter...
- if ( method == null ) method = jc.getMethod(mName, args.size()+1);
+ Debug.Print( 2, "MethodNameMatch: ", methodNameMatch );
+ Debug.Print( 2, "MethodName List: ", allowedMethods );
+ ///////////////////////////////////////////////////////////////
+ // If allowedMethods (i.e. methodNameMatch) is null,
+ // then treat it as a wildcard automatically matching mName
+ ///////////////////////////////////////////////////////////////
+
+ int numberOfBodyArgs = args.size();
+ Method method = getMethod(jc, mName, args);
+
+ // if the method wasn't found, try again with msgContext as an
+ // additional, initial argument...
+ if ( method == null ) {
+ args.add( 0, msgContext );
+ method = getMethod(jc, mName, args);
+ }
if ( method == null )
throw new AxisFault( "AxisServer.error",
@@ -151,24 +166,20 @@
"Method name=" + mName + "\n" +
"Service name=" + msgContext.getTargetService(),
null, null );
-
- // If method has an additional parameter of the right parameter
- // type, add MessageContext as the first parameter
- Class params[] = method.getParameterTypes();
- if (params.length > args.size()
- && params[0].equals(msgContext.getClass()))
- {
- args.add( 0, msgContext );
- method = jc.getMethod(mName, args.size());
- if ( method != null ) {
- Object[] tmpArgs = new Object[args.size()];
- for ( int i = 1 ; i < args.size() ; i++ )
- tmpArgs[i] = argValues[i-1];
- tmpArgs[0] = msgContext ;
- argValues = tmpArgs ;
- }
- }
+ Class params[] = method.getParameterTypes();
+
+ // if we got the version of the method that takes msgContext,
+ // add msgContext to argValues[]
+ if ( params.length == numberOfBodyArgs + 1 ) {
+ Object[] tmpArgs = new Object[numberOfBodyArgs + 1];
+ for ( int i = 1 ; i < args.size() ; i++ )
+ tmpArgs[i] = argValues[i-1];
+ tmpArgs[0] = msgContext ;
+ argValues = tmpArgs ;
+ }
+
+
/*
for (int i = 0; i < params.length; i++) {
String argClass = argValues[i].getClass().getName();
@@ -216,4 +227,9 @@
resEnv.setEncodingStyleURI(Constants.URI_SOAP_ENC);
}
}
+
+ protected Method getMethod(JavaClass jc, String mName, Vector args)
+ {
+ return jc.getMethod(mName, args.size());
+ }
}
1.38 +13 -13 xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java
Index: AxisServlet.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- AxisServlet.java 2001/08/21 05:15:35 1.37
+++ AxisServlet.java 2001/08/21 21:26:02 1.38
@@ -79,12 +79,12 @@
public void init() {
String param = getInitParameter("transport.name");
ServletContext context = getServletConfig().getServletContext();
-
+
if (param == null)
param = context.getInitParameter("transport.name");
if (param != null)
transportName = param;
-
+
engine = (AxisEngine)context.getAttribute(AXIS_ENGINE);
}
@@ -96,9 +96,9 @@
HandlerRegistry hr = engine.getHandlerRegistry();
String realpath = context.getRealPath(req.getServletPath());
- if (realpath != null) {
+ if (realpath != null && req.getPathInfo() != null) {
msgContext.setProperty(Constants.MC_REALPATH, realpath);
-
+
try {
String url = req.getScheme() + "://" +
req.getServerName() + ":" +
@@ -144,7 +144,7 @@
"transport name appears to be '<b>" + transportName + "</b>'");
res.getWriter().println("</html>");
}
-
+
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
ServletConfig config = getServletConfig();
@@ -153,12 +153,12 @@
if (engine == null)
engine = (AxisEngine)context.getAttribute(AXIS_ENGINE);
-
+
if (engine == null) {
// !!! should return a SOAP fault...
throw new ServletException("Couldn't find AxisEngine!");
}
-
+
/* Place the Request message in the MessagContext object - notice */
/* that we just leave it as a 'ServletRequest' object and let the */
/* Message processing routine convert it - we don't do it since we */
@@ -183,7 +183,7 @@
msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST, req );
msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE, res );
msgContext.setProperty(Constants.MC_REMOTE_ADDR, req.getRemoteAddr());
-
+
/* Save the SOAPAction header in the MessageContext bag - this will */
/* be used to tell the Axis Engine which service is being invoked. */
/* This will save us the trouble of having to parse the Request */
@@ -196,7 +196,7 @@
/********************************************************************/
String tmp ;
tmp = (String) req.getHeader( HTTPConstants.HEADER_SOAP_ACTION );
-
+
try {
/** Technically, if we don't find this header, we should probably fault.
* It's required in the SOAP HTTP binding.
@@ -206,13 +206,13 @@
"No SOAPAction header!",
null, null );
}
-
+
if ( "".equals(tmp) )
tmp = req.getContextPath(); // Is this right?
-
+
if ( tmp != null )
msgContext.setProperty( HTTPConstants.MC_HTTP_SOAPACTION, tmp );
-
+
// Create a Session wrapper for the HTTP session.
// These can/should be pooled at some point. (Sam is Watching! :-)
msgContext.setSession(new AxisHttpSession(req.getSession()));
@@ -220,7 +220,7 @@
/* Save the real path */
/**********************/
String realpath = context.getRealPath(req.getServletPath());
- if (realpath != null)
+ if (realpath != null)
msgContext.setProperty(Constants.MC_REALPATH, realpath);
/* Invoke the Axis engine... */
1.59 +2 -1 xml-axis/java/src/org/apache/axis/utils/Admin.java
Index: Admin.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/Admin.java,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- Admin.java 2001/08/15 21:30:17 1.58
+++ Admin.java 2001/08/21 21:26:02 1.59
@@ -765,7 +765,8 @@
QName qn;
try {
- cls = Class.forName(classname);
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ cls = cl.loadClass(classname);
} catch (Exception e) {
throw new AxisFault( "Admin.error", e.toString(), null, null);
}
1.9 +1 -1 xml-axis/java/src/org/apache/axis/utils/AxisClassLoader.java
Index: AxisClassLoader.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/AxisClassLoader.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- AxisClassLoader.java 2001/07/12 15:04:53 1.8
+++ AxisClassLoader.java 2001/08/21 21:26:02 1.9
@@ -74,7 +74,7 @@
Hashtable classCache = new Hashtable() ;
public AxisClassLoader() {
- super();
+ super(Thread.currentThread().getContextClassLoader());
}
static public AxisClassLoader getClassLoader() {