Examples of EffectivePolicy


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

        for (BindingOperationInfo boi : bi.getOperations()) {
            SoapOperationInfo soi = boi.getExtensor(SoapOperationInfo.class);
            if (soi != null && soi.getAction() != null && soi.getAction().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;
            }
        }
        //operation is not correct as the Action is not set correctly.   Let's see if
        //we can at least find it by name and then set the action and such manually later.
View Full Code Here

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

        for (BindingOperationInfo boi : bi.getOperations()) {
            SoapOperationInfo soi = boi.getExtensor(SoapOperationInfo.class);
            if (soi != null && soi.getAction() != null && soi.getAction().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;
            }
        }
        //operation is not correct as the Action is not set correctly.   Let's see if
        //we can at least find it by name and then set the action and such manually later.
View Full Code Here

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

        List<Interceptor<? extends Message>> li = new ArrayList<Interceptor<? extends Message>>();
        EasyMock.expect(reg.getInterceptors(alt, true, false)).andReturn(li);
        Policy p = control.createMock(Policy.class);
        EasyMock.expect(ep.getPolicy()).andReturn(p);
        control.replay();
        EffectivePolicy effective = rme.new EffectivePolicyImpl(ep, reg, true, false);
        assertSame(alt, effective.getChosenAlternative());
        assertSame(li, effective.getInterceptors());
        assertSame(p, effective.getPolicy());
    }
View Full Code Here

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

        for (BindingOperationInfo boi : bi.getOperations()) {
            SoapOperationInfo soi = boi.getExtensor(SoapOperationInfo.class);
            if (soi != null && soi.getAction() != null && soi.getAction().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;
            }
        }
        //operation is not correct as the Action is not set correctly.   Let's see if
        //we can at least find it by name and then set the action and such manually later.
View Full Code Here

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

           
            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;
            }
        }
        //operation is not correct as the Action is not set correctly.   Let's see if
        //we can at least find it by name and then set the action and such manually later.
View Full Code Here

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

            engine.setClientEndpointPolicy(ei, ep);
        } else {
            engine.setServerEndpointPolicy(ei, ep);
        }

        EffectivePolicy effectiveOutbound = new EffectivePolicyImpl(ep, reg, true, false);
        EffectivePolicy effectiveInbound = new EffectivePolicyImpl(ep, reg, false, false);

        BindingInfo bi = ei.getBinding();
        Collection<BindingOperationInfo> bois = bi.getOperations();

        for (BindingOperationInfo boi : bois) {
View Full Code Here

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

    public void handleMessage(Message message) throws Fault {
        EndpointInfo ei = message.getExchange().get(Endpoint.class).getEndpointInfo();
        BindingOperationInfo boi = message.getExchange().get(BindingOperationInfo.class);
        LOG.fine("Getting effective server request policy for endpoint " + ei
                 + " and binding operation " + boi);
        EffectivePolicy ep =
            bus.getExtension(PolicyEngine.class).getEffectiveServerRequestPolicy(ei, boi);               
        for (Iterator it = ep.getPolicy().getAlternatives(); it.hasNext();) {
            Collection<Assertion> as = CastUtils.cast((Collection)it.next(), Assertion.class);
            LOG.fine("Checking alternative with " + as.size() + " assertions.");
            for (Assertion a : as) {
                LOG.fine("Assertion: " + a.getClass().getName());
                HTTPServerPolicy p = (JaxbAssertion.cast(a, HTTPServerPolicy.class)).getData();
View Full Code Here

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

            ? engine.getServerEndpointPolicy(applicationEndpoint.getEndpointInfo(), null)
            : engine.getClientEndpointPolicy(applicationEndpoint.getEndpointInfo(), conduit);
       
        engine.setEndpointPolicy(ei, ep);
       
        EffectivePolicy effectiveOutbound = new EffectivePolicyImpl(ep, reg, true, false);
        EffectivePolicy effectiveInbound = new EffectivePolicyImpl(ep, reg, false, false);
       
        BindingInfo bi = ei.getBinding();
        Collection<BindingOperationInfo> bois = bi.getOperations();
       
        for (BindingOperationInfo boi : bois) {
View Full Code Here

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

            engine.setClientEndpointPolicy(ei, ep);
        } else {
            engine.setServerEndpointPolicy(ei, ep);
        }

        EffectivePolicy effectiveOutbound = new EffectivePolicyImpl(ep, reg, true, false);
        EffectivePolicy effectiveInbound = new EffectivePolicyImpl(ep, reg, false, false);

        BindingInfo bi = ei.getBinding();
        Collection<BindingOperationInfo> bois = bi.getOperations();

        for (BindingOperationInfo boi : bois) {
View Full Code Here

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

           
            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;
            }
        }
        //operation is not correct as the Action is not set correctly.   Let's see if
        //we can at least find it by name and then set the action and such manually later.
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.