org.apache.soap.server.http
Class ServerHTTPUtils
java.lang.Object
|
+--org.apache.soap.server.http.ServerHTTPUtils
- public class ServerHTTPUtils
- extends java.lang.Object
Any utility stuff for HTTP SOAP stuff.
- Author:
- Sanjiva Weerawarana
Method Summary |
static java.io.File |
getFileFromNameAndContext(java.lang.String fileName,
javax.servlet.ServletContext context)
If the fileName is absolute, a file representing it is returned. |
static ServiceManager |
getServiceManagerFromContext(javax.servlet.ServletContext context)
Equivalent to: getServiceManagerFromContext(context, null) |
static ServiceManager |
getServiceManagerFromContext(javax.servlet.ServletContext context,
java.lang.String configFilename)
Look up the service manager or create it from the context. |
static java.lang.ClassLoader |
getServletClassLoaderFromContext(javax.servlet.ServletContext context)
Retrieves the ClassLoader from the ServletContext, if one is registered. |
static java.lang.Object |
getTargetObject(ServiceManager serviceManager,
DeploymentDescriptor dd,
java.lang.String targetID,
javax.servlet.http.HttpServlet thisServlet,
javax.servlet.http.HttpSession session,
SOAPContext ctxt,
javax.servlet.ServletContext context)
Return the target object that services the service with the
given ID. |
static void |
setServletClassLoaderIntoContext(javax.servlet.ServletContext context,
java.lang.ClassLoader cl)
Registers the ClassLoader into the ServletContext. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ServerHTTPUtils
public ServerHTTPUtils()
getServiceManagerFromContext
public static ServiceManager getServiceManagerFromContext(javax.servlet.ServletContext context,
java.lang.String configFilename)
- Look up the service manager or create it from the context. NOTE:
this approach may not work if this servlet is put in a webapp
that is marked distributed .. the servlet context is unique only
per JVM. In that case we'll have to use an external database
to store this webapp-global attribute.
getServiceManagerFromContext
public static ServiceManager getServiceManagerFromContext(javax.servlet.ServletContext context)
- Equivalent to: getServiceManagerFromContext(context, null)
getServletClassLoaderFromContext
public static java.lang.ClassLoader getServletClassLoaderFromContext(javax.servlet.ServletContext context)
- Retrieves the ClassLoader from the ServletContext, if one is registered.
setServletClassLoaderIntoContext
public static void setServletClassLoaderIntoContext(javax.servlet.ServletContext context,
java.lang.ClassLoader cl)
- Registers the ClassLoader into the ServletContext.
getFileFromNameAndContext
public static java.io.File getFileFromNameAndContext(java.lang.String fileName,
javax.servlet.ServletContext context)
- If the fileName is absolute, a file representing it is returned.
Otherwise, a File is returned which represents the file relative
to the servlet's docBase. If ServletContext.getRealPath(fileName)
returns null, a File is returned which represents the file
relative to the current working directory.
Note: Uses ServletContext.getRealPath(fileName).
getTargetObject
public static java.lang.Object getTargetObject(ServiceManager serviceManager,
DeploymentDescriptor dd,
java.lang.String targetID,
javax.servlet.http.HttpServlet thisServlet,
javax.servlet.http.HttpSession session,
SOAPContext ctxt,
javax.servlet.ServletContext context)
throws SOAPException
- Return the target object that services the service with the
given ID. Depending on the deployment information of the
service, the object's lifecycle is also managed here.
Copyright © 2001 Apache XML Project. All Rights Reserved.