protected void init(final ServletConfig servletConfig, final ServiceConfig serviceConfig, final SecurityConfig secConfig) { if (serviceConfig != null) { if (serviceConfig.getInstance() instanceof XACML1DecisionService) { m_decisionService = (XACML1DecisionService) serviceConfig.getInstance(); } else { throw new IllegalStateException("Service configured under name <" + servletConfig.getServletName() + "> is not a <" + XACML1DecisionService.class.getName() + ">"); } } else { throw new IllegalStateException("No service with name <" + servletConfig.getServletName() + "> configured, please check your <security-config> configuration."); } String wsdlPath = servletConfig.getInitParameter("wsdlPath"); if (wsdlPath == null || wsdlPath.length() == 0) { wsdlPath = (String) serviceConfig.getProperties().get("wsdlPath"); } if (wsdlPath != null && wsdlPath.length() > 0) { m_wsdlPath = wsdlPath; } }
protected void init(final ServletConfig servletConfig, final ServiceConfig serviceConfig, final SecurityConfig secConfig) { if (serviceConfig.getInstance() instanceof PolicyEnforcementServiceLocator) { m_pesLocator = (PolicyEnforcementServiceLocator) serviceConfig.getInstance(); } if (m_pesLocator == null) { m_pesLocator = (PolicyEnforcementServiceLocator) serviceConfig.getProperties().get( "policyEnforcementServiceLocator"); } if (m_pesLocator == null) { // backwards compatibility SecurityConfigPolicyEnforcementServiceLocator securityConfigLocator = new SecurityConfigPolicyEnforcementServiceLocator(); securityConfigLocator.setServiceConfig(serviceConfig); m_pesLocator = securityConfigLocator; } httpClientFactory = (HTTPClientFactory) serviceConfig.getProperties().get(HttpRequestForward.HTTP_CLIENT_FACTORY); if (httpClientFactory == null) { httpClientFactory = new JDKHTTPClientFactory(); } }