/** * Generate a parametes object * * @param key * @param value */ private Parameter getParameter(String key, Object value) { Parameter myParameter = new Parameter(); myParameter.setName(key); myParameter.setValue(value); return myParameter; }
/** * Generate a parametes object * * @param key * @param value */ private Parameter getParameter(String key, Object value) { Parameter myParameter = new Parameter(); myParameter.setName(key); myParameter.setValue(value); return myParameter; }
public static Parameter getClientUsernameTokenHandler(String password) { Parameter param = new Parameter(); param.setName(WSHandlerConstants.PW_CALLBACK_REF); param.setValue(new ClientUserPasswordCallbackHandler(password)); return param; } }
public static Parameter getClientUsernameTokenHandler(String password) { Parameter param = new Parameter(); param.setName(WSHandlerConstants.PW_CALLBACK_REF); param.setValue(new ClientUserPasswordCallbackHandler(password)); return param; } }
public static Parameter getClientUsernameTokenHandler(String password) { Parameter param = new Parameter(); param.setName(WSHandlerConstants.PW_CALLBACK_REF); param.setValue(new ClientUserPasswordCallbackHandler(password)); return param; } }
public static Parameter getTokenCancelerConfigParameter() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMElement paramElem = fac.createOMElement(new QName("parameter"), null); paramElem.addAttribute(fac.createOMAttribute("name", null, TokenCancelerConfig.TOKEN_CANCELER_CONFIG. getLocalPart())); paramElem.addAttribute(fac.createOMAttribute("type", null, Integer.toString(Parameter.OM_PARAMETER). toString())); fac.createOMElement(TokenCancelerConfig.TOKEN_CANCELER_CONFIG, paramElem); Parameter param = new Parameter(); param.setName(TokenCancelerConfig.TOKEN_CANCELER_CONFIG.getLocalPart()); param.setParameterElement(paramElem); param.setValue(paramElem); param.setParameterType(Parameter.OM_PARAMETER); return param; } }
public static Parameter getTokenCancelerConfigParameter() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMElement paramElem = fac.createOMElement(new QName("parameter"), null); paramElem.addAttribute(fac.createOMAttribute("name", null, TokenCancelerConfig.TOKEN_CANCELER_CONFIG. getLocalPart())); paramElem.addAttribute(fac.createOMAttribute("type", null, Integer.toString(Parameter.OM_PARAMETER). toString())); fac.createOMElement(TokenCancelerConfig.TOKEN_CANCELER_CONFIG, paramElem); Parameter param = new Parameter(); param.setName(TokenCancelerConfig.TOKEN_CANCELER_CONFIG.getLocalPart()); param.setParameterElement(paramElem); param.setValue(paramElem); param.setParameterType(Parameter.OM_PARAMETER); return param; } }
public static Parameter getTokenCancelerConfigParameter() { OMFactory fac = OMAbstractFactory.getOMFactory(); OMElement paramElem = fac.createOMElement(new QName("parameter"), null); paramElem.addAttribute(fac.createOMAttribute("name", null, TokenCancelerConfig.TOKEN_CANCELER_CONFIG. getLocalPart())); paramElem.addAttribute(fac.createOMAttribute("type", null, Integer.toString(Parameter.OM_PARAMETER). toString())); fac.createOMElement(TokenCancelerConfig.TOKEN_CANCELER_CONFIG, paramElem); Parameter param = new Parameter(); param.setName(TokenCancelerConfig.TOKEN_CANCELER_CONFIG.getLocalPart()); param.setParameterElement(paramElem); param.setValue(paramElem); param.setParameterType(Parameter.OM_PARAMETER); return param; } }
protected void disableRESTCalls(String serviceName, String scenrioId) throws SecurityConfigException { if (scenrioId.equals(SecurityConstants.USERNAME_TOKEN_SCENARIO_ID)) { return; } try { AxisService service = axisConfig.getServiceForActivation(serviceName); if (service == null) { throw new SecurityConfigException("nullService"); } Parameter param = new Parameter(); param.setName(DISABLE_REST); param.setValue(Boolean.TRUE.toString()); service.addParameter(param); } catch (AxisFault e) { log.error(e); throw new SecurityConfigException("disablingREST", e); } }
protected void disableRESTCalls(String serviceName, String scenrioId) throws SecurityConfigException { if (scenrioId.equals(SecurityConstants.USERNAME_TOKEN_SCENARIO_ID)) { return; } try { AxisService service = axisConfig.getServiceForActivation(serviceName); if (service == null) { throw new SecurityConfigException("nullService"); } Parameter param = new Parameter(); param.setName(DISABLE_REST); param.setValue(Boolean.TRUE.toString()); service.addParameter(param); } catch (AxisFault e) { log.error(e); throw new SecurityConfigException("disablingREST", e); } }
/** * Return a Parameter instance for ServiceRefName if that name was specified on the sparse composite when the Service was created. * @param sparseCompositeKey identifies the instance of the service (i.e. Service Delegate) * @return A Parameter containing the ServiceRefName or null if one was not specified. */ private Parameter getServiceRefNameParam(Object sparseCompositeKey) { Parameter serviceRefNameParam = null; // The ServiceRefName, if specified, is set on the sparse composite associated with the service. String serviceRefName = getServiceDescriptionImpl().getDescriptionBuilderComposite().getServiceRefName(sparseCompositeKey); if (!DescriptionUtils.isEmpty(serviceRefName)) { if (log.isDebugEnabled()) { log.debug("Setting service ref name: " + serviceRefName + " on AxisService: " + axisService + "@" + axisService.hashCode()); } serviceRefNameParam = new Parameter(); serviceRefNameParam.setName(MDQConstants.SERVICE_REF_NAME); serviceRefNameParam.setValue(serviceRefName); } return serviceRefNameParam; }
protected void disableRESTCalls(String serviceName, String scenrioId) throws SecurityConfigException { if (scenrioId.equals(SecurityConstants.USERNAME_TOKEN_SCENARIO_ID)) { return; } try { AxisService service = axisConfig.getServiceForActivation(serviceName); if (service == null) { throw new SecurityConfigException("nullService"); } Parameter param = new Parameter(); param.setName(DISABLE_REST); param.setValue(Boolean.TRUE.toString()); service.addParameter(param); } catch (AxisFault e) { log.error(e); throw new SecurityConfigException("disablingREST", e); } }
/** * Return a Parameter instance for ServiceRefName if that name was specified on the sparse composite when the Service was created. * @param sparseCompositeKey identifies the instance of the service (i.e. Service Delegate) * @return A Parameter containing the ServiceRefName or null if one was not specified. */ private Parameter getServiceRefNameParam(Object sparseCompositeKey) { Parameter serviceRefNameParam = null; // The ServiceRefName, if specified, is set on the sparse composite associated with the service. String serviceRefName = getServiceDescriptionImpl().getDescriptionBuilderComposite().getServiceRefName(sparseCompositeKey); if (!DescriptionUtils.isEmpty(serviceRefName)) { if (log.isDebugEnabled()) { log.debug("Setting service ref name: " + serviceRefName + " on AxisService: " + axisService + "@" + axisService.hashCode()); } serviceRefNameParam = new Parameter(); serviceRefNameParam.setName(MDQConstants.SERVICE_REF_NAME); serviceRefNameParam.setValue(serviceRefName); } return serviceRefNameParam; }
public void setConfigContext(ConfigurationContext configContext) { // setting ServletContext into configctx configContext.setProperty(HTTPConstants.MC_HTTP_SERVLETCONTEXT, config.getServletContext()); Parameter servletConfigParam = new Parameter(); servletConfigParam.setName(HTTPConstants.HTTP_SERVLETCONFIG); servletConfigParam.setValue(config); try { configContext.getAxisConfiguration().addParameter(servletConfigParam); } catch (AxisFault axisFault) { log.error(axisFault.getMessage(), axisFault); } super.setConfigContext(configContext); } }
public void setConfigContext(ConfigurationContext configContext) { // setting ServletContext into configctx configContext.setProperty(HTTPConstants.MC_HTTP_SERVLETCONTEXT, config.getServletContext()); Parameter servletConfigParam = new Parameter(); servletConfigParam.setName(HTTPConstants.HTTP_SERVLETCONFIG); servletConfigParam.setValue(config); try { configContext.getAxisConfiguration().addParameter(servletConfigParam); } catch (AxisFault axisFault) { log.error(axisFault.getMessage(), axisFault); } super.setConfigContext(configContext); } }
public void init(ConfigurationContext configContext, AxisModule module) throws AxisFault { AxisConfiguration axiConfiguration = configContext.getAxisConfiguration(); Counter globalRequestCounter = new Counter(); Parameter globalRequestCounterParameter = new Parameter(); globalRequestCounterParameter.setName(MetricsConstants.GLOBAL_REQUEST_COUNTER); globalRequestCounterParameter.setValue(globalRequestCounter); axiConfiguration.addParameter(globalRequestCounterParameter); }
public void init(ConfigurationContext configContext, AxisModule module) throws AxisFault { AxisConfiguration axiConfiguration = configContext.getAxisConfiguration(); Counter globalRequestCounter = new Counter(); Parameter globalRequestCounterParameter = new Parameter(); globalRequestCounterParameter.setName(MetricsConstants.GLOBAL_REQUEST_COUNTER); globalRequestCounterParameter.setValue(globalRequestCounter); axiConfiguration.addParameter(globalRequestCounterParameter); }
private void addToAxisService() { // Add a reference to this EndpointDescription object to the AxisService if (axisService != null) { Parameter parameter = new Parameter(); parameter.setName(EndpointDescription.AXIS_SERVICE_PARAMETER); parameter.setValue(this); try { axisService.addParameter(parameter); } catch (AxisFault e) { throw ExceptionFactory.makeWebServiceException(Messages.getMessage("endpointDescriptionErr5", EndpointDescription.AXIS_SERVICE_PARAMETER), e); } } }
private void addToAxisService() { // Add a reference to this EndpointDescription object to the AxisService if (axisService != null) { Parameter parameter = new Parameter(); parameter.setName(EndpointDescription.AXIS_SERVICE_PARAMETER); parameter.setValue(this); try { axisService.addParameter(parameter); } catch (AxisFault e) { throw ExceptionFactory.makeWebServiceException(Messages.getMessage("endpointDescriptionErr5", EndpointDescription.AXIS_SERVICE_PARAMETER), e); } } }
private static void updateCurrentInvocationStatistic(MessageContext messageContext, long responseTime) throws AxisFault { messageContext.setProperty(StatisticsConstants.GLOBAL_CURRENT_INVOCATION_RESPONSE_TIME,responseTime); if (messageContext.getAxisOperation() != null) { Parameter operationResponseTimeParam = new Parameter(); operationResponseTimeParam.setName(StatisticsConstants.OPERATION_RESPONSE_TIME); operationResponseTimeParam.setValue(responseTime); messageContext.getAxisOperation().addParameter(operationResponseTimeParam); } if (messageContext.getAxisService() != null) { Parameter serviceResponseTimeParam = new Parameter(); serviceResponseTimeParam.setName(StatisticsConstants.SERVICE_RESPONSE_TIME); serviceResponseTimeParam.setValue(responseTime); messageContext.getAxisService().addParameter(serviceResponseTimeParam); } } }