public static String getOptionalParam(ParameterInclude paramInclude, String paramName) throws AxisFault { Parameter param = paramInclude.getParameter(paramName); if (param != null && param.getValue() != null && param.getValue() instanceof String) { return (String) param.getValue(); } else { return null; } }
public Object getParameterValue(String name) { Parameter param = getParameter(name); if (param == null) { return null; } return param.getValue(); }
protected void waitForCompletion() { long timeout = 2000L; Parameter param = cfgCtx.getAxisConfiguration().getParameter("hotupdate.timeout"); if (param != null && param.getValue() != null) { timeout = Long.parseLong(param.getValue().toString()); } try { Thread.sleep(timeout); } catch (InterruptedException ignored) { } }
private boolean getBooleanParam(String name) { boolean result = false; Parameter parameter = getParameter(name); if (parameter != null) { Object value = parameter.getValue(); if (value != null) { result = Boolean.valueOf(((String) value).trim()); } } return result; }
private boolean isAnonymousTypesDisallowed() { boolean disallowAnonTypes = false; Parameter param = service.getParameter(Java2WSDLConstants.DISALLOW_ANON_TYPES_OPTION_LONG); if (param != null) { disallowAnonTypes = JavaUtils.isTrueExplicitly(param.getValue()); } return disallowAnonTypes; }
protected boolean isDisableSOAP12() { // axis2.xml indicated no SOAP 1.2 binding? boolean disableSOAP12 = false; Parameter disableSOAP12Parameter = axisService .getParameter(org.apache.axis2.Constants.Configuration.DISABLE_SOAP12); if (disableSOAP12Parameter != null && JavaUtils.isTrueExplicitly(disableSOAP12Parameter.getValue())) { disableSOAP12 = true; } return disableSOAP12; }
protected OMElement generateInterface(OMFactory omFactory) throws AxisFault, URISyntaxException, XMLStreamException, FactoryConfigurationError { Parameter parameter = axisService.getParameter(WSDL2Constants.INTERFACE_LOCAL_NAME); if (parameter != null) { interfaceName = (String) parameter.getValue(); } else { interfaceName = WSDL2Constants.DEFAULT_INTERFACE_NAME; } // Add the interface element return getInterfaceElement(wsdl, tns, wsdlx, wrpc, omFactory, interfaceName); }
public boolean isChildFirstClassLoading(){ boolean childFirstClassLoading = false; Parameter isChildFirstClassLoading = this.getParameter(Constants.Configuration.ENABLE_CHILD_FIRST_CLASS_LOADING); if (isChildFirstClassLoading != null){ childFirstClassLoading = JavaUtils.isTrueExplicitly(isChildFirstClassLoading.getValue()); } return childFirstClassLoading; }
public long getMaxServiceResponseTime(AxisService axisService) throws AxisFault { long max = 0; Parameter parameter = axisService.getParameter(StatisticsConstants.SERVICE_RESPONSE_TIME_PROCESSOR); if (parameter != null) { ResponseTimeProcessor proc = (ResponseTimeProcessor) parameter.getValue(); max = proc.getMaxResponseTime(); } return max; }
public long getMinOperationResponseTime(AxisOperation axisOperation) throws AxisFault { long min = 0; Parameter parameter = axisOperation.getParameter(StatisticsConstants.OPERATION_RESPONSE_TIME_PROCESSOR); if (parameter != null) { min = ((ResponseTimeProcessor) parameter.getValue()).getMinResponseTime(); } if (min == -1) { min = 0; } return min; }
public void setParameters(MessageContext msgCtx) { for (Parameter p : parameters) { msgCtx.setProperty(p.getName(), p.getValue()); } } }
public InvocationResponse invoke(MessageContext msgContext) throws AxisFault { msgContext .setProperty(MetricsConstants.REQUEST_RECEIVED_TIME, System.currentTimeMillis()); // global increment ((Counter) msgContext.getParameter(MetricsConstants.GLOBAL_REQUEST_COUNTER).getValue()) .increment(); return InvocationResponse.CONTINUE; } }
private static SynapseConfiguration getSynapseConfiguration( org.apache.axis2.context.MessageContext axisMsgCtx) { AxisConfiguration axisCfg = axisMsgCtx.getConfigurationContext().getAxisConfiguration(); Parameter param = axisCfg.getParameter(SynapseConstants.SYNAPSE_CONFIG); if (param != null) { return (SynapseConfiguration) param.getValue(); } return null; }
private static SynapseEnvironment getSynapseEnvironment( org.apache.axis2.context.MessageContext axisMsgCtx) { AxisConfiguration axisCfg = axisMsgCtx.getConfigurationContext().getAxisConfiguration(); Parameter param = axisCfg.getParameter(SynapseConstants.SYNAPSE_ENV); if (param != null) { return (SynapseEnvironment) param.getValue(); } return null; } }
protected ServerContextInformation getServerContextInformation() throws DeploymentException { Parameter serverCtxParam = cfgCtx.getAxisConfiguration().getParameter( SynapseConstants.SYNAPSE_SERVER_CTX_INFO); if (serverCtxParam == null) { throw new DeploymentException("ServerContextInformation not found. " + "Unable to continue the deployment operation."); } return (ServerContextInformation) serverCtxParam.getValue(); }
protected SynapseConfiguration getSynapseConfiguration() throws DeploymentException { Parameter synCfgParam = cfgCtx.getAxisConfiguration().getParameter(SynapseConstants.SYNAPSE_CONFIG); if (synCfgParam == null) { throw new DeploymentException("SynapseConfiguration not found. " + "Unable to continue the deployment operation."); } return (SynapseConfiguration) synCfgParam.getValue(); }
protected ServerConfigurationInformation getServerConfigurationInformation() throws DeploymentException { Parameter serverCfgParam = cfgCtx.getAxisConfiguration().getParameter( SynapseConstants.SYNAPSE_SERVER_CONFIG_INFO); if (serverCfgParam == null) { throw new DeploymentException("SynapseConfigurationInformation not found. " + "Unable to continue the deployment operation."); } return (ServerConfigurationInformation) serverCfgParam.getValue(); }
protected SynapseEnvironment getSynapseEnvironment() throws DeploymentException { Parameter synCfgParam = cfgCtx.getAxisConfiguration().getParameter(SynapseConstants.SYNAPSE_ENV); if (synCfgParam == null) { throw new DeploymentException("SynapseEnvironment not found. " + "Unable to continue the deployment operation."); } return (SynapseEnvironment) synCfgParam.getValue(); }
private static QName getWrapperQName(MessageContext msgContext) { QName wrapperQName = BaseConstants.DEFAULT_TEXT_WRAPPER; if (msgContext.getAxisService() != null) { Parameter wrapperParam = msgContext.getAxisService().getParameter(BaseConstants.WRAPPER_PARAM); if (wrapperParam != null) { wrapperQName = BaseUtils.getQNameFromString(wrapperParam.getValue()); } } return wrapperQName; }
public static SandeshaPolicyBean getPropertyBean (AxisDescription axisDescription) throws SandeshaException { Parameter parameter = axisDescription.getParameter(Sandesha2Constants.SANDESHA_PROPERTY_BEAN); if (parameter==null) throw new SandeshaException (SandeshaMessageHelper.getMessage( SandeshaMessageKeys.propertyBeanNotSet)); SandeshaPolicyBean propertyBean = (SandeshaPolicyBean) parameter.getValue(); if (propertyBean==null) { String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.policyBeanNotFound); throw new SandeshaException (message); } return propertyBean; }