本文整理汇总了Java中org.apache.axis2.description.AxisModule.setParent方法的典型用法代码示例。如果您正苦于以下问题:Java AxisModule.setParent方法的具体用法?Java AxisModule.setParent怎么用?Java AxisModule.setParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis2.description.AxisModule
的用法示例。
在下文中一共展示了AxisModule.setParent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addModule
import org.apache.axis2.description.AxisModule; //导入方法依赖的package包/类
/**
* Add an available Module to this configuration
*
* @param module an AxisModule
* @throws AxisFault in case of error
*/
public void addModule(AxisModule module) throws AxisFault {
module.setParent(this);
// check whether the module version paramter is there , if so set the module version as that
Parameter versionParameter = module.getParameter(org.apache.axis2.Constants.MODULE_VERSION);
if (versionParameter !=null ) {
String version = (String) versionParameter.getValue();
try {
module.setVersion(new Version(version));
} catch (ParseException ex) {
throw new AxisFault("The version number '" + version + "' specified by the "
+ org.apache.axis2.Constants.MODULE_VERSION + " parameter is invalid");
}
}
allModules.put(module.getArchiveName(), module);
notifyObservers(new AxisEvent(AxisEvent.MODULE_DEPLOY,null), module);
// Registering the policy namespaces that the module understand
registerModulePolicySupport(module);
// Registering the policy assertions that are local to the system
registerLocalPolicyAssertions(module);
}
示例2: getAxisConfiguration
import org.apache.axis2.description.AxisModule; //导入方法依赖的package包/类
@Override
public AxisConfiguration getAxisConfiguration() throws AxisFault
{
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
OMAbstractFactory.setMetaFactoryLocator(new OMMetaFactoryLocator()
{
@Override
public OMMetaFactory getOMMetaFactory(String feature)
{
return new OMLinkedListMetaFactory();
}
});
axisConfig = populateAxisConfiguration(
getClass().getResourceAsStream("/com/tle/core/connectors/blackboard/service/axis2.xml"));
AxisModule module = new AxisModule("rampart");
module.setModuleClassLoader(getClass().getClassLoader());
module.setParent(axisConfig);
module.setArchiveName("rampart-1.5.1");
ModuleBuilder moduleBuilder = new ModuleBuilder(
getClass().getResourceAsStream("/com/tle/core/connectors/blackboard/service/module.xml"), module,
axisConfig);
moduleBuilder.populateModule();
addNewModule(module, axisConfig);
loadFromClassPath();
axisConfig.setConfigurator(this);
return axisConfig;
}
示例3: testAddParameterModuleLockedAtAxisConfig
import org.apache.axis2.description.AxisModule; //导入方法依赖的package包/类
public void testAddParameterModuleLockedAtAxisConfig() {
try {
Parameter para = new Parameter();
para.setValue(null);
para.setName("PARA_NAME");
para.setLocked(true);
reg.addParameter(para);
AxisModule module = new AxisModule("Service1");
module.setParent(reg);
module.addParameter(para);
fail("This should fails with Parmter is locked can not overide");
} catch (AxisFault axisFault) {
}
}