Package org.apache.axis2.context
Class ConfigurationContextFactory
- java.lang.Object
-
- org.apache.axis2.context.ConfigurationContextFactory
-
public class ConfigurationContextFactory extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Log
log
-
Constructor Summary
Constructors Constructor Description ConfigurationContextFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConfigurationContext
createBasicConfigurationContext(String resourceName)
Creates configuration context using resource file found in the classpath.static ConfigurationContext
createConfigurationContext(AxisConfigurator axisConfigurator)
Creates a AxisConfiguration depending on the user requirement.static ConfigurationContext
createConfigurationContextFromFileSystem(String path)
static ConfigurationContext
createConfigurationContextFromFileSystem(String path, String axis2xml)
To get a ConfigurationContext for given data , and underline implementation is Axis2 default impl which is file system based deployment model to create an AxisConfiguration.static ConfigurationContext
createConfigurationContextFromURIs(URL axis2xml, URL repositoy)
static ConfigurationContext
createDefaultConfigurationContext()
Gets the default configuration context by using Axis2.xml in the classpathstatic ConfigurationContext
createEmptyConfigurationContext()
creates an empty configuration context.
-
-
-
Method Detail
-
createConfigurationContext
public static ConfigurationContext createConfigurationContext(AxisConfigurator axisConfigurator) throws AxisFault
Creates a AxisConfiguration depending on the user requirement. First creates an AxisConfigurator object with appropriate parameters. Depending on the implementation getAxisConfiguration(), gets the AxisConfiguration and uses it to create the ConfigurationContext.- Parameters:
axisConfigurator
- : AxisConfigurator- Returns:
- Returns ConfigurationContext.
- Throws:
AxisFault
- : If somthing goes wrong
-
createConfigurationContextFromFileSystem
public static ConfigurationContext createConfigurationContextFromFileSystem(String path, String axis2xml) throws AxisFault
To get a ConfigurationContext for given data , and underline implementation is Axis2 default impl which is file system based deployment model to create an AxisConfiguration. Here either or both parameter can be null. So that boil down to following scenarios and it should note that parameter value should be full path , you are not allowed to give one relative to other. And these two can be located in completely different locations.- If none of them are null , then AxisConfiguration will be based on the value of axis2xml , and the repository will be the value specified by the path parameter and there will not be any assumptions.
- If axis2xml is null , then the repository will be the value specfied by path parameter and AxisConfiguration will be created using default_axis2.xml
- If path parameter is null , then AxisConfiguration will be created using that axis2.xml. And after creating AxisConfiguration system will try to find user has specified repository parameter in axis2.xml (<parameter name="repository">location of the repo</parameter>) , if it find that then repository will be the value specified by that parameter.
- If both are null , then it is simple , AixsConfiguration will be created using default_axis2.xml and thats it.
- axis2.repo : same as path parameter
- axis2.xml : same as axis2xml
- Parameters:
path
- : location of the repositoryaxis2xml
- : location of the axis2.xml (configuration) , you can not give axis2xml relative to repository.- Returns:
- Returns the built ConfigurationContext.
- Throws:
AxisFault
- in case of problems
-
createConfigurationContextFromFileSystem
public static ConfigurationContext createConfigurationContextFromFileSystem(String path) throws AxisFault
- Throws:
AxisFault
-
createConfigurationContextFromURIs
public static ConfigurationContext createConfigurationContextFromURIs(URL axis2xml, URL repositoy) throws AxisFault
- Throws:
AxisFault
-
createEmptyConfigurationContext
public static ConfigurationContext createEmptyConfigurationContext() throws AxisFault
creates an empty configuration context.- Returns:
- Returns ConfigurationContext.
- Throws:
AxisFault
-
createDefaultConfigurationContext
public static ConfigurationContext createDefaultConfigurationContext() throws Exception
Gets the default configuration context by using Axis2.xml in the classpath- Returns:
- Returns ConfigurationContext.
- Throws:
Exception
-
createBasicConfigurationContext
public static ConfigurationContext createBasicConfigurationContext(String resourceName) throws Exception
Creates configuration context using resource file found in the classpath.- Returns:
- Returns ConfigurationContext.
- Throws:
Exception
-
-