Examples of AssertionInfoMap


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

     * @param message the current message
     * @pre message is outbound
     * @pre requestor role
     */
    private boolean hasAddressingAssertion(Message message) {
        AssertionInfoMap aim = message.get(AssertionInfoMap.class);
        if (null == aim) {
            return false;           
        }
        if (null == aim.get(MetadataConstants.ADDRESSING_ASSERTION_QNAME)) {
            return false;
        }
        // no need to analyse the content of the Addressing assertion here
       
        return true;
View Full Code Here

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

     * @param message the current message
     * @pre message is outbound
     * @pre requestor role
     */
    private boolean hasUsingAddressingAssertion(Message message) {
        AssertionInfoMap aim = message.get(AssertionInfoMap.class);
        if (null == aim) {
            return false;
           
        }
        if (null != aim.get(MetadataConstants.USING_ADDRESSING_2004_QNAME)) {
            return true;
        }
        if (null != aim.get(MetadataConstants.USING_ADDRESSING_2005_QNAME)) {
            return true;
        }
        if (null != aim.get(MetadataConstants.USING_ADDRESSING_2006_QNAME)) {
            return true;
        }
        return false;
    }
View Full Code Here

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

     * Assert all the wsa related assertion to true
     *
     * @param message the current message
     */
    private void assertAddressing(Message message) {
        AssertionInfoMap aim = message.get(AssertionInfoMap.class);
        if (null == aim) {
            return;
        }
        QName[] types = new QName[] {
            MetadataConstants.ADDRESSING_ASSERTION_QNAME, MetadataConstants.USING_ADDRESSING_2004_QNAME,
View Full Code Here

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

     * @param message the current message
     */
    private void assertAddressing(Message message,
                                  EndpointReferenceType replyTo,
                                  EndpointReferenceType faultTo) {
        AssertionInfoMap aim = message.get(AssertionInfoMap.class);
        if (null == aim) {
            return;
        }
        if (faultTo == null) {
            faultTo = replyTo;
        }
        boolean anonReply = ContextUtils.isGenericAddress(replyTo);
        boolean anonFault = ContextUtils.isGenericAddress(faultTo);
        boolean onlyAnonymous = anonReply && anonFault;
        boolean hasAnonymous = anonReply || anonFault;
       
        QName[] types = new QName[] {
            MetadataConstants.ADDRESSING_ASSERTION_QNAME,
            MetadataConstants.USING_ADDRESSING_2004_QNAME,
            MetadataConstants.USING_ADDRESSING_2005_QNAME,
            MetadataConstants.USING_ADDRESSING_2006_QNAME
        };
       
        for (QName type : types) {
            assertAssertion(aim, type);
            if (type.equals(MetadataConstants.ADDRESSING_ASSERTION_QNAME)) {
                if (onlyAnonymous) {
                    assertAssertion(aim, MetadataConstants.ANON_RESPONSES_ASSERTION_QNAME);
                } else if (!hasAnonymous) {
                    assertAssertion(aim, MetadataConstants.NON_ANON_RESPONSES_ASSERTION_QNAME);
                }       
            } else if (type.equals(MetadataConstants.ADDRESSING_ASSERTION_QNAME_0705)) {
                if (onlyAnonymous) {
                    assertAssertion(aim, MetadataConstants.ANON_RESPONSES_ASSERTION_QNAME_0705);
                } else if (!hasAnonymous) {
                    assertAssertion(aim, MetadataConstants.NON_ANON_RESPONSES_ASSERTION_QNAME_0705);
                }       
            }
        }
        if (!MessageUtils.isRequestor(message) && !MessageUtils.isOutbound(message)) {
            //need to throw an appropriate fault for these
            Collection<AssertionInfo> aicNonAnon
                = aim.getAssertionInfo(MetadataConstants.NON_ANON_RESPONSES_ASSERTION_QNAME);
            Collection<AssertionInfo> aicNonAnon2
                = aim.getAssertionInfo(MetadataConstants.NON_ANON_RESPONSES_ASSERTION_QNAME_0705);
            Collection<AssertionInfo> aicAnon
                = aim.getAssertionInfo(MetadataConstants.ANON_RESPONSES_ASSERTION_QNAME);
            Collection<AssertionInfo> aicAnon2
                = aim.getAssertionInfo(MetadataConstants.ANON_RESPONSES_ASSERTION_QNAME_0705);
            boolean hasAnon = (aicAnon != null && !aicAnon.isEmpty())
                        || (aicAnon2 != null && !aicAnon2.isEmpty());
            boolean hasNonAnon = (aicNonAnon != null && !aicNonAnon.isEmpty())
                        || (aicNonAnon2 != null && !aicNonAnon2.isEmpty());
               
View Full Code Here

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

        }
        return maps;
    }

    private void setupNamespace(AddressingPropertiesImpl maps, Message message) {
        AssertionInfoMap aim = message.get(AssertionInfoMap.class);
        if (null == aim) {
            return;
        }
        Collection<AssertionInfo> aic = aim.getAssertionInfo(MetadataConstants.USING_ADDRESSING_2004_QNAME);
        if (aic != null && !aic.isEmpty()) {
            maps.exposeAs(Names200408.WSA_NAMESPACE_NAME);
        }
    }
View Full Code Here

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

    public static HTTPClientPolicy getClient(Message message, HTTPClientPolicy confPolicy) {
        HTTPClientPolicy pol = message.get(HTTPClientPolicy.class);
        if (pol != null) {
            return intersect(pol, confPolicy);
        }
        AssertionInfoMap amap = message.get(AssertionInfoMap.class);
        if (null == amap || amap.isEmpty()) {
            return confPolicy;
        }
        Collection<AssertionInfo> ais = amap.get(HTTPCLIENTPOLICY_ASSERTION_QNAME);
        if (null == ais) {
            return confPolicy;
        }
        Collection<PolicyAssertion> alternative = new ArrayList<PolicyAssertion>();
        for (AssertionInfo ai : ais) {
View Full Code Here

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

     * @param confPolicy the additional policy to be compatible with
     * @return the HTTPServerPolicy for the message
     * @throws PolicyException if no compatible HTTPServerPolicy can be determined
     */
    public static HTTPServerPolicy getServer(Message message, HTTPServerPolicy confPolicy) {
        AssertionInfoMap amap =  message.get(AssertionInfoMap.class);
        if (null == amap) {
            return confPolicy;
        }
        Collection<AssertionInfo> ais = amap.get(HTTPSERVERPOLICY_ASSERTION_QNAME);
        if (null == ais) {
            return confPolicy;
        }
        Collection<PolicyAssertion> alternative = new ArrayList<PolicyAssertion>();
        for (AssertionInfo ai : ais) {
View Full Code Here

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

        HTTPClientPolicy pol = message.get(HTTPClientPolicy.class);
        if (pol != null) {
            client = intersect(pol, client);
        }

        AssertionInfoMap aim = message.get(AssertionInfoMap.class);
        if (null == aim) {
            return;
        }
        Collection<AssertionInfo> ais = aim.get(HTTPCLIENTPOLICY_ASSERTION_QNAME);         
        if (null == ais || ais.size() == 0) {
            return;
        }  
       
        // assert all assertion(s) that are compatible with the value configured for the conduit
View Full Code Here

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

     * @param message the current message
     * @param server the server policy
     */
    public static void assertServerPolicy(Message message, HTTPServerPolicy server) {
       
        AssertionInfoMap aim = message.get(AssertionInfoMap.class);
        if (null == aim) {
            return;
        }
        Collection<AssertionInfo> ais = aim.get(HTTPSERVERPOLICY_ASSERTION_QNAME);         
        if (null == ais || ais.size() == 0) {
            return;
        }  
        // assert all assertion(s) that are equal to the value configured for the conduit
View Full Code Here

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

class SecureConversationOutInterceptor extends AbstractPhaseInterceptor<SoapMessage> {
    public SecureConversationOutInterceptor() {
        super(Phase.PREPARE_SEND);
    }
    public void handleMessage(SoapMessage message) throws Fault {
        AssertionInfoMap aim = message.get(AssertionInfoMap.class);
        // extract Assertion information
        if (aim != null) {
            Collection<AssertionInfo> ais = aim.get(SP12Constants.SECURE_CONVERSATION_TOKEN);
            if (ais == null || ais.isEmpty()) {
                return;
            }
            if (isRequestor(message)) {
                SecureConversationToken itok = (SecureConversationToken)ais.iterator()
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.