本文整理汇总了Java中org.apache.axis2.engine.AxisConfiguration.addServiceGroup方法的典型用法代码示例。如果您正苦于以下问题:Java AxisConfiguration.addServiceGroup方法的具体用法?Java AxisConfiguration.addServiceGroup怎么用?Java AxisConfiguration.addServiceGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis2.engine.AxisConfiguration
的用法示例。
在下文中一共展示了AxisConfiguration.addServiceGroup方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createAxisServiceGroup
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
protected AxisServiceGroup createAxisServiceGroup(ConfigurationContext configCtx)
throws AxisFault {
AxisConfiguration axisConfig = configCtx.getAxisConfiguration();
AxisServiceGroup serviceGroup = new AxisServiceGroup(axisConfig);
axisConfig.addServiceGroup(serviceGroup);
return serviceGroup;
}
示例2: addServiceGroup
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
public static void addServiceGroup(AxisServiceGroup serviceGroup,
ArrayList serviceList,
URL serviceLocation,
DeploymentFileData currentDeploymentFile,
AxisConfiguration axisConfiguration) throws AxisFault {
if (isServiceGroupReadyToDeploy(serviceGroup, serviceList, serviceLocation,
currentDeploymentFile, axisConfiguration)) {
fillServiceGroup(serviceGroup, serviceList, serviceLocation, axisConfiguration);
axisConfiguration.addServiceGroup(serviceGroup);
if (currentDeploymentFile != null) {
addAsWebResources(currentDeploymentFile.getFile(),
serviceGroup.getServiceGroupName(), serviceGroup);
// let the system have hidden services
if (!JavaUtils.isTrueExplicitly(serviceGroup.getParameterValue(
Constants.HIDDEN_SERVICE_PARAM_NAME))) {
log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_WS,
currentDeploymentFile.getName(),
serviceLocation.toString()));
}
} else if (!JavaUtils.isTrueExplicitly(serviceGroup.getParameterValue(
Constants.HIDDEN_SERVICE_PARAM_NAME))) {
log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_WS,
serviceGroup.getServiceGroupName(), ""));
}
}
}
示例3: testParameterEdit
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
public void testParameterEdit() throws Exception{
ConfigurationContext configCtx = ConfigurationContextFactory.createEmptyConfigurationContext();
AxisConfiguration axisConfig = configCtx.getAxisConfiguration();
Parameter parameter = new Parameter();
parameter.setValue("true");
parameter.setName("enableMTOM");
axisConfig.addParameter(parameter);
parameter.setValue("true");
AxisServiceGroup serviceGroup = new AxisServiceGroup();
serviceGroup.setServiceGroupName("testServiceGroup");
AxisService service = new AxisService();
service.setName("service");
serviceGroup.addService(service);
axisConfig.addServiceGroup(serviceGroup);
parameter = serviceGroup.getParameter("enableMTOM");
parameter.setValue("true");
Parameter para2= serviceGroup.getParameter("enableMTOM");
assertEquals(para2.getValue(),"true");
Parameter test = new Parameter();
test.setName("test");
test.setValue("test");
serviceGroup.addParameter(test);
Parameter para = serviceGroup.getParameter("test");
assertNotNull(para);
assertEquals(para.getValue(),"test");
para.setValue("newValue");
para = serviceGroup.getParameter("test");
assertNotNull(para);
assertEquals(para.getValue(),"newValue");
}
示例4: updateMockProxyServiceGroup
import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
private synchronized void updateMockProxyServiceGroup(AxisService axisService, ConfigurationContext configCtx,
AxisConfiguration axisConfig)
throws AxisFault {
/*axisService.addParameter("supportSingleOperation", Boolean.TRUE);
AxisOperation singleOP = new InOutAxisOperation(new QName("invokeTryItProxyService"));
singleOP.setDocumentation("This operation is a 'passthrough' for all operations in " +
" TryIt proxy service.");
axisService.addOperation(singleOP);*/
ProxyMessageReceiver receiver = new ProxyMessageReceiver(configCtx);
PhasesInfo phaseInfo = axisConfig.getPhasesInfo();
for (Iterator i = axisService.getOperations(); i.hasNext();) {
AxisOperation op = (AxisOperation) i.next();
op.setMessageReceiver(receiver);
phaseInfo.setOperationPhases(op);
}
AxisServiceGroup serviceGroup;
synchronized (axisConfig) {
serviceGroup = axisConfig.getServiceGroup(TRYIT_SG_NAME);
if (serviceGroup == null) {
serviceGroup = new AxisServiceGroup();
serviceGroup.setServiceGroupName(TRYIT_SG_NAME);
serviceGroup.addParameter("DoAuthentication", "false");
serviceGroup.addParameter("adminService", "true");
}
// resolving Axis service name conflicts.
AxisService testService = axisConfig.getService(axisService.getName());
if (testService != null) {
for (int loop = 1; ; loop++) {
String testName = axisService.getName() + "_" + loop;
if (axisConfig.getService(testName) == null) {
axisService.setName(testName);
break;
}
}
}
serviceGroup.addService(axisService);
axisConfig.addServiceGroup(serviceGroup);
axisService.addParameter(LAST_TOUCH_TIME, System.currentTimeMillis());
axisService.addParameter("modifyUserWSDLPortAddress", "false");
// Set the timer.
Parameter parameter = axisConfig.getParameter(PROXY_TIMER);
if (parameter == null) {
Timer timer = new Timer();
timer.scheduleAtFixedRate(new ProxyTimerTask(axisConfig), PERIOD, PERIOD);
parameter = new Parameter(PROXY_TIMER, timer);
axisConfig.addParameter(parameter);
}
}
}