Examples of PolicyEngine


Examples of org.apache.cxf.ws.policy.PolicyEngine

        HttpServletResponse response = (HttpServletResponse)inMessage.get(HTTP_RESPONSE);
        return new BackChannelConduit(response);
    }

    private void initConfig() {
        PolicyEngine engine = bus.getExtension(PolicyEngine.class);
        // for a decoupled endpoint there is no service info
        if (null != engine && engine.isEnabled()
            && null != endpointInfo.getService()) {
            server = PolicyUtils.getServer(engine, endpointInfo, this);
        }
        if (null == server && WSDLLibrary.isAvailable()) {
            server = endpointInfo.getTraversedExtensor(
View Full Code Here

Examples of org.apache.cxf.ws.policy.PolicyEngine

    private void initializeConfig() {
   
        // wsdl extensors are superseded by policies which in       
        // turn are superseded by injection                         

        PolicyEngine pe = bus.getExtension(PolicyEngine.class);     
        if (null != pe && pe.isEnabled() && endpointInfo.getService() != null) {                         
            clientSidePolicy =                                      
                PolicyUtils.getClient(pe, endpointInfo, this);             
        }                                                           

    }
View Full Code Here

Examples of org.apache.cxf.ws.policy.PolicyEngine

            }
            String wsamAction = o == null ? null : o.toString();
           
            if ((soapAction != null && soapAction.endsWith(suffix))
                || (wsamAction != null && wsamAction.endsWith(suffix))) {
                PolicyEngine pe = bus.getExtension(PolicyEngine.class);
                Conduit conduit = client.getConduit();
                EffectivePolicy effectivePolicy = pe.getEffectiveClientRequestPolicy(client.getEndpoint()
                    .getEndpointInfo(), boi, conduit);
                setPolicyInternal(effectivePolicy.getPolicy());
                return boi;
            }
        }
View Full Code Here

Examples of org.apache.cxf.ws.policy.PolicyEngine

        Invoker invoker,
        boolean secConv
    ) {
        Exchange ex = message.getExchange();
        Bus bus = ex.getBus();
        PolicyEngine pe = bus.getExtension(PolicyEngine.class);
        if (null == pe) {
            return;
        }
        Destination destination = ex.getDestination();
        try {
            Endpoint endpoint = message.getExchange().getEndpoint();

            TokenStore store = getTokenStore(message);
            if (secConv) {
                endpoint = STSUtils.createSCEndpoint(bus,
                                                     namespace,
                                                     endpoint.getEndpointInfo().getTransportId(),
                                                     destination.getAddress().getAddress().getValue(),
                                                     message.getVersion().getBindingId(),
                                                     policy);
            } else {
                endpoint = STSUtils.createSTSEndpoint(bus,
                                                      namespace,
                                                      endpoint.getEndpointInfo().getTransportId(),
                                                      destination.getAddress().getAddress().getValue(),
                                                      message.getVersion().getBindingId(),
                                                      policy,
                                                      null);
            }
            endpoint.getEndpointInfo().setProperty(TokenStore.class.getName(), store);
            message.getExchange().put(TokenStore.class.getName(), store);

            EndpointPolicy ep = pe.getServerEndpointPolicy(endpoint.getEndpointInfo(), destination);
            List<Interceptor<? extends Message>> interceptors = ep.getInterceptors();
            for (Interceptor<? extends Message> i : interceptors) {
                message.getInterceptorChain().add(i);
            }
View Full Code Here

Examples of org.apache.cxf.ws.policy.PolicyEngine

    protected boolean isPartialResponse(Message m) {
        return Boolean.TRUE.equals(m.get(PARTIAL_RESPONSE));
    }

    private void initConfig() {
        PolicyEngine engine = bus.getExtension(PolicyEngine.class);
        // for a decoupled endpoint there is no service info
        if (null != engine && engine.isEnabled()
            && null != endpointInfo.getService()) {
            server = PolicyUtils.getServer(engine, endpointInfo, this);
        }
        if (null == server) {
            server = endpointInfo.getTraversedExtensor(
View Full Code Here

Examples of org.apache.cxf.ws.policy.PolicyEngine

    private void initializeConfig() {
   
        // wsdl extensors are superseded by policies which in       
        // turn are superseded by injection                         

        PolicyEngine pe = bus.getExtension(PolicyEngine.class);     
        if (null != pe && pe.isEnabled() && endpointInfo.getService() != null) {                         
            clientSidePolicy =                                      
                PolicyUtils.getClient(pe, endpointInfo, this);             
        }                                                           

    }
View Full Code Here

Examples of org.apache.cxf.ws.policy.PolicyEngine

        connectionFactory = new HttpsURLConnectionFactory();
        cookies = new Cookies();
       
        // wsdl extensors are superseded by policies which in       
        // turn are superseded by injection                         
        PolicyEngine pe = bus.getExtension(PolicyEngine.class);     
        if (null != pe && pe.isEnabled() && endpointInfo.getService() != null) {                         
            clientSidePolicy =                                      
                PolicyUtils.getClient(pe, endpointInfo, this);             
        }
        CXFAuthenticator.addAuthenticator();
    }
View Full Code Here

Examples of org.apache.cxf.ws.policy.PolicyEngine

        HttpServletResponse response = (HttpServletResponse)inMessage.get(HTTP_RESPONSE);
        return new BackChannelConduit(response);
    }

    private void initConfig() {
        PolicyEngine engine = bus.getExtension(PolicyEngine.class);
        // for a decoupled endpoint there is no service info
        if (null != engine && engine.isEnabled()
            && null != endpointInfo.getService()) {
            server = PolicyUtils.getServer(engine, endpointInfo, this);
        }
        if (null == server && WSDLLibrary.isAvailable()) {
            server = endpointInfo.getTraversedExtensor(
View Full Code Here

Examples of org.apache.cxf.ws.policy.PolicyEngine

        connectionFactory = new HttpsURLConnectionFactory();
        cookies = new Cookies();
       
        // wsdl extensors are superseded by policies which in       
        // turn are superseded by injection                         
        PolicyEngine pe = bus.getExtension(PolicyEngine.class);     
        if (null != pe && pe.isEnabled() && endpointInfo.getService() != null) {                         
            clientSidePolicy =                                      
                PolicyUtils.getClient(pe, endpointInfo, this);             
        }
        CXFAuthenticator.addAuthenticator();
    }
View Full Code Here

Examples of org.apache.cxf.ws.policy.PolicyEngine

    private void recalcEffectivePolicy(SoapMessage message,
                                       String namespace,
                                       Policy policy) {
        Exchange ex = message.getExchange();
        Bus bus = ex.get(Bus.class);
        PolicyEngine pe = bus.getExtension(PolicyEngine.class);
        if (null == pe) {
            return;
        }
        Destination destination = ex.getDestination();
        try {
            Endpoint endpoint = message.getExchange().get(Endpoint.class);
           
            TokenStore store = (TokenStore)message.getContextualProperty(TokenStore.class.getName());
            if (store == null) {
                store = new MemoryTokenStore();
                endpoint.getEndpointInfo().setProperty(TokenStore.class.getName(), store);
            }
            endpoint = STSUtils.createSTSEndpoint(bus,
                                                  namespace,
                                                  endpoint.getEndpointInfo().getTransportId(),
                                                  destination.getAddress().getAddress().getValue(),
                                                  message.getVersion().getBindingId(),
                                                  policy,
                                                  null);
            endpoint.getEndpointInfo().setProperty(TokenStore.class.getName(), store);
            message.getExchange().put(TokenStore.class.getName(), store);
       
            EndpointPolicy ep = pe.getServerEndpointPolicy(endpoint.getEndpointInfo(), destination);
            List<Interceptor> interceptors = ep.getInterceptors();
            for (Interceptor i : interceptors) {
                message.getInterceptorChain().add(i);
            }
           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.