Fields Summary |
---|
protected static Log | logThe Log for all message logging. |
public static final String | PROP_XML_DECL |
public static final String | PROP_DEBUG_LEVEL |
public static final String | PROP_DEBUG_FILE |
public static final String | PROP_DOMULTIREFS |
public static final String | PROP_DISABLE_PRETTY_XML |
public static final String | PROP_ENABLE_NAMESPACE_PREFIX_OPTIMIZATION |
public static final String | PROP_PASSWORD |
public static final String | PROP_SYNC_CONFIG |
public static final String | PROP_SEND_XSI |
public static final String | PROP_ATTACHMENT_DIR |
public static final String | PROP_ATTACHMENT_IMPLEMENTATION |
public static final String | PROP_ATTACHMENT_CLEANUP |
public static final String | PROP_DEFAULT_CONFIG_CLASS |
public static final String | PROP_SOAP_VERSION |
public static final String | PROP_SOAP_ALLOWED_VERSION |
public static final String | PROP_TWOD_ARRAY_ENCODING |
public static final String | PROP_XML_ENCODING |
public static final String | PROP_XML_REUSE_SAX_PARSERS |
public static final String | PROP_BYTE_BUFFER_BACKING |
public static final String | PROP_BYTE_BUFFER_CACHE_INCREMENT |
public static final String | PROP_BYTE_BUFFER_RESIDENT_MAX_SIZE |
public static final String | PROP_BYTE_BUFFER_WORK_BUFFER_SIZE |
public static final String | PROP_EMIT_ALL_TYPES |
public static final String | PROP_DOTNET_SOAPENC_FIXSet this property to 'true' when you want Axis to avoid soap encoded
types to work around a .NET problem where it wont accept soap encoded
types for a (soap encoded!) array. |
public static final String | PROP_BP10_COMPLIANCECompliance with WS-I Basic Profile. |
public static final String | DEFAULT_ATTACHMENT_IMPL |
public static final String | ENV_ATTACHMENT_DIR |
public static final String | ENV_SERVLET_REALPATH |
public static final String | ENV_SERVLET_CONTEXT |
private static final String | DEFAULT_ADMIN_PASSWORD |
protected EngineConfiguration | configOur go-to guy for configuration... |
protected boolean | _hasSafePasswordHas the user changed the password yet? True if they have. |
protected boolean | shouldSaveConfigShould we save the engine config each time we modify it? True if we
should. |
protected transient org.apache.axis.utils.cache.ClassCache | classCacheJava class cache. |
private org.apache.axis.session.Session | sessionThis engine's Session. This Session supports "application scope"
in the Apache SOAP sense... if you have a service with "application
scope", have it store things in this Session. |
private ArrayList | actorURIsWhat actor URIs hold for the entire engine? Find them here. |
private static ThreadLocal | currentMessageContextThread local storage used for locating the active message context.
This information is only valid for the lifetime of this request. |
private static final String[] | BOOLEAN_OPTIONSList of options which should be converted from Strings to Booleans
automatically. Note that these options are common to all XML
web services. |
Methods Summary |
---|
public void | addActorURI(java.lang.String uri)Add an actor by uri that will hold for the entire engine.
actorURIs.add(uri);
|
public void | cleanup()Cleanup routine removes application scoped objects.
There is a small risk of this being called more than once
so the cleanup should be designed to resist that event.
super.cleanup();
// Let any application-scoped service objects know that we're going
// away...
Enumeration keys = session.getKeys();
if (keys != null) {
while (keys.hasMoreElements()) {
String key = (String)keys.nextElement();
Object obj = session.get(key);
if (obj != null && obj instanceof ServiceLifecycle) {
((ServiceLifecycle)obj).destroy();
}
session.remove(key);
}
}
|
public java.util.ArrayList | getActorURIs()Get a list of actor URIs that hold for the entire engine.
return (ArrayList)actorURIs.clone();
|
public org.apache.axis.session.Session | getApplicationSession()Get the Session object associated with the application
session.
return session;
|
public org.apache.axis.utils.cache.ClassCache | getClassCache()Get the ClassCache associated with this engine.
return classCache;
|
public abstract org.apache.axis.AxisEngine | getClientEngine()Client engine access.
An AxisEngine may define another specific AxisEngine to be used
by newly created Clients. For instance, a server may
create an AxisClient and allow deployment to it. Then
the server's services may access the AxisClient's deployed
handlers and transports.
|
public EngineConfiguration | getConfig()Get the EngineConfiguration used throughout this
AxisEngine instance.
return config;
|
public static MessageContext | getCurrentMessageContext()Get the active message context.
return (MessageContext) currentMessageContext.get();
|
public Handler | getGlobalRequest()Get the global request Handler .
return config.getGlobalRequest();
|
public Handler | getGlobalResponse()Get the global respones Handler .
return config.getGlobalResponse();
|
public Handler | getHandler(java.lang.String name)Get the Handler for a particular local name.
try {
return config.getHandler(new QName(null, name));
} catch (ConfigurationException e) {
throw new AxisFault(e);
}
|
public org.apache.axis.handlers.soap.SOAPService | getService(java.lang.String name)Get the SOAPService for a particular local name.
try {
return config.getService(new QName(null, name));
} catch (ConfigurationException e) {
try {
return config.getServiceByNamespaceURI(name);
} catch (ConfigurationException e1) {
throw new AxisFault(e);
}
}
|
public Handler | getTransport(java.lang.String name)Get the Handler that implements the transport for a local
name.
try {
return config.getTransport(new QName(null, name));
} catch (ConfigurationException e) {
throw new AxisFault(e);
}
|
public org.apache.axis.encoding.TypeMappingRegistry | getTypeMappingRegistry()Get the TypeMappingRegistry for this axis engine.
TypeMappingRegistry tmr = null;
try {
tmr = config.getTypeMappingRegistry();
} catch (ConfigurationException e) {
log.error(Messages.getMessage("axisConfigurationException00"), e);
}
return tmr;
|
public boolean | hasSafePassword()Discover if this AxisEngine has a safe password.
return _hasSafePassword;
|
public void | init()Initialize the engine. Multiple calls will (may?) return the engine to
the intialized state.
if (log.isDebugEnabled()) {
log.debug("Enter: AxisEngine::init");
}
// The SOAP/XSD stuff is in the default TypeMapping of the TypeMappingRegistry.
//getTypeMappingRegistry().setParent(SOAPTypeMappingRegistry.getSingletonDelegate());
try {
config.configureEngine(this);
} catch (Exception e) {
throw new InternalException(e);
}
/*Set the default attachment implementation */
setOptionDefault(PROP_ATTACHMENT_IMPLEMENTATION,
AxisProperties.getProperty("axis." + PROP_ATTACHMENT_IMPLEMENTATION ));
setOptionDefault(PROP_ATTACHMENT_IMPLEMENTATION, DEFAULT_ATTACHMENT_IMPL);
// Check for the property "dotnetsoapencfix" which will turn
// off soap encoded types to work around a bug in .NET where
// it wont accept soap encoded array types.
final Object dotnet = getOption(PROP_DOTNET_SOAPENC_FIX);
if (JavaUtils.isTrue(dotnet)) {
// This is a static property of the type mapping
// that will ignore SOAPENC types when looking up
// QNames of java types.
TypeMappingImpl.dotnet_soapenc_bugfix = true;
}
if (log.isDebugEnabled()) {
log.debug("Exit: AxisEngine::init");
}
|
public static void | normaliseOptions(Handler handler)Normalise the engine's options.
Convert boolean options from String to Boolean and default
any ommitted boolean options to TRUE. Default the admin.
password.
// Convert boolean options to Booleans so we don't need to use
// string comparisons. Default is "true".
for (int i = 0; i < BOOLEAN_OPTIONS.length; i++) {
Object val = handler.getOption(BOOLEAN_OPTIONS[i]);
if (val != null) {
if (val instanceof Boolean)
continue;
if (JavaUtils.isFalse(val)) {
handler.setOption(BOOLEAN_OPTIONS[i], Boolean.FALSE);
continue;
}
} else {
if (!(handler instanceof AxisEngine))
continue;
}
// If it was null or not "false"...
handler.setOption(BOOLEAN_OPTIONS[i], Boolean.TRUE);
}
// Deal with admin password's default value.
if (handler instanceof AxisEngine) {
AxisEngine engine = (AxisEngine)handler;
if (!engine.setOptionDefault(PROP_PASSWORD,
DEFAULT_ADMIN_PASSWORD)) {
engine.setAdminPassword(
(String)engine.getOption(PROP_PASSWORD));
}
}
|
public void | refreshGlobalOptions()(Re-)load the global options from the registry.
Hashtable globalOptions = config.getGlobalOptions();
if (globalOptions != null)
setOptions(globalOptions);
normaliseOptions(this);
// fixme: If we change actorURIs to List, this copy constructor can
// go away...
actorURIs = new ArrayList(config.getRoles());
|
public void | removeActorURI(java.lang.String uri)Remove an actor by uri that will hold for the entire engine.
actorURIs.remove(uri);
|
public void | saveConfiguration()Write out our engine configuration.
if (!shouldSaveConfig)
return;
try {
config.writeEngineConfig(this);
} catch (Exception e) {
log.error(Messages.getMessage("saveConfigFail00"), e);
}
|
public void | setAdminPassword(java.lang.String pw)Set the administration password.
setOption(PROP_PASSWORD, pw);
_hasSafePassword = true;
saveConfiguration();
|
protected static void | setCurrentMessageContext(MessageContext mc)Set the active message context.
currentMessageContext.set(mc);
|
public void | setShouldSaveConfig(boolean shouldSaveConfig)Set the flag that controls if the configuration should be saved.
this.shouldSaveConfig = shouldSaveConfig;
|