|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.edg.data.util.AxisHelpers
Helper methods useful when dealing with Axis Faults and Exceptions.
Field Summary | |
static java.lang.String |
LOG4J_CONFIGFILE_PATH
the name of the parameter whose value contains the path to the log4j config file |
Method Summary | |
static void |
dumpFault(java.rmi.RemoteException e,
java.io.PrintStream p)
check if a RemoteException is an AxisFault . |
static java.lang.Object |
getAttribute(java.lang.String attrName)
Get an attribute from our current ServletContext
It returns null if the attribute is not defined. |
static org.apache.axis.server.AxisServer |
getAxisEngine()
get the AxisServer in this servlet. |
static java.lang.String |
getEndpointUrl()
Get the endpoint URL this is running on. |
static java.lang.String |
getInitParameter(java.lang.String paramName)
Get an initialization parameter from the Servlet deployment descriptor. |
static boolean |
isFault(java.rmi.RemoteException e,
java.lang.String faultType)
check we have a fault of a given type |
static void |
setAttribute(java.lang.String attrName,
java.lang.Object attr)
An an Attribute to our current ServletContext . |
static void |
setupLogging()
Set up log4j logging, getting the name of the log file from an init-param. |
static void |
setupLogging(javax.servlet.ServletContext context)
Set up log4j logging, getting the name of the log file from an init-param. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String LOG4J_CONFIGFILE_PATH
Method Detail |
public static void dumpFault(java.rmi.RemoteException e, java.io.PrintStream p) throws java.rmi.RemoteException
RemoteException
is an AxisFault
. If so,
dump out its details to a PrintStream
.
e
- the exception to checkp
- the print stream to output to. This should not be
null
.
java.rmi.RemoteException
- if it is not an AxisFault
public static boolean isFault(java.rmi.RemoteException e, java.lang.String faultType)
e
- the exception to checkfaultType
- the name of the fault we expect
true
if the exception is the mentioned fault typepublic static java.lang.String getInitParameter(java.lang.String paramName)
null
if the parameter is not defined.
paramName
- the name of the parameter
public static java.lang.Object getAttribute(java.lang.String attrName)
ServletContext
It returns null
if the attribute is not defined.
attrName
- the name of the parameter
public static void setAttribute(java.lang.String attrName, java.lang.Object attr)
ServletContext
.
attrName
- the name of the parameterattr
- the attribute to storepublic static void setupLogging(javax.servlet.ServletContext context)
web.xml
;
<Servlet> ... ... <init-param> <param-name>log4j.configFile.path</param-name> <param-value>/opt/edg/etc/@BUILD.WEBAPP@/log4j-server.properties</param-value> <description>The path the log4j configuration properties file.</description> </init-param> <Servlet>It is usually possible to override the defualt value set in the
web.xml
, via some application server specific mechanism.
In tomcat4, you do this as a <Parameter>
in the
<Context> block, and in Oracle 9ias, you do it via Oracle Enterprise Manager.
context
- the ServletContext
to get the configuration
information fromLOG4J_CONFIGFILE_PATH
public static void setupLogging()
web.xml
;
<Servlet> ... ... <init-param> <param-name>log4j.configFile.path</param-name> <param-value>/opt/edg/etc/@BUILD.WEBAPP@/log4j-server.properties</param-value> <description>The path the log4j configuration properties file.</description> </init-param> <Servlet>It is usually possible to override the defualt value set in the
web.xml
, via some application server specific mechanism.
In tomcat4, you do this as a <Parameter>
in the
<Context> block, and in Oracle 9ias, you do it via Oracle Enterprise Manager.
LOG4J_CONFIGFILE_PATH
public static org.apache.axis.server.AxisServer getAxisEngine()
null
if the
AxisServer is not yet created.
AxisServer
objectpublic static java.lang.String getEndpointUrl()
localhost
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |