/** * return only the parameters for explicitly set for this service group (not including inherited * ones), where each parameter is an XML fragment representing the "parameter" element * * @param serviceGroupId * * @return list of declared service group params as an OMElement[] * * @throws AxisFault */ public OMElement[] getDeclaredServiceGroupParameters(String serviceGroupId) throws AxisFault { List allParameter = new ArrayList(); AxisServiceGroup asg = getAxisConfig().getServiceGroup(serviceGroupId); List sgParameters = asg.getParameters(); for (int i = 0; i < sgParameters.size(); i++) { Parameter parameter = (Parameter) sgParameters.get(i); OMElement element = parameter.getParameterElement(); if (element != null) { allParameter.add(element); } } return (OMElement[]) allParameter.toArray(new OMElement[allParameter.size()]); }
/** * Return all parameters for this service group (including inherited ones), where each parameter * is an XML fragment representing the "parameter" element * * @param service_group_id * @param group_version * * @return list of service group params as on OMElement[] * * @throws AxisFault */ public OMElement[] getServiceGroupParameters(String service_group_id, String group_version) throws AxisFault { List allParameter = new ArrayList(); List globalParameters = getAxisConfig().getParameters(); for (int i = 0; i < globalParameters.size(); i++) { Parameter parameter = (Parameter) globalParameters.get(i); allParameter.add(parameter.getParameterElement()); } AxisServiceGroup asg = getAxisConfig().getServiceGroup(service_group_id); List sgParameters = asg.getParameters(); for (int i = 0; i < sgParameters.size(); i++) { Parameter parameter = (Parameter) sgParameters.get(i); allParameter.add(parameter.getParameterElement()); } return (OMElement[]) allParameter.toArray(new OMElement[allParameter.size()]); }
ArrayList serviceGroupParams = axisServiceGroup.getParameters();
protected static OMElement createServiceGroupXMLInfoset(AxisServiceGroup axisServiceGroup) { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace ns = fac.createOMNamespace("", ""); OMElement serviceGroupEle = createOMElement(fac, ns, DeploymentConstants.TAG_SERVICE_GROUP); /*OMAttribute serviceGroupName = createOMAttribute(fac, ns, DeploymentConstants.ATTRIBUTE_NAME, axisServiceGroup.getServiceGroupName()); serviceGroupEle.addAttribute(serviceGroupName);*/ List parameterList = axisServiceGroup.getParameters(); serializeParameterList(parameterList, serviceGroupEle, fac, ns); Collection axisServiceGroupModuleCollection = axisServiceGroup.getEngagedModules(); serializeModules(axisServiceGroupModuleCollection, serviceGroupEle, fac, ns, axisServiceGroup); for (Iterator iterator = axisServiceGroup.getServices(); iterator.hasNext();) { AxisService axisService = (AxisService) iterator.next(); OMElement axisServiceEle = createServicesXMLInfoset(axisService); serviceGroupEle.addChild(axisServiceEle); } return serviceGroupEle; }
ArrayList parameters = serviceGroup.getParameters();