当前位置: 首页>>代码示例>>Java>>正文


Java MessageUtils.isRequestor方法代码示例

本文整理汇总了Java中org.apache.cxf.message.MessageUtils.isRequestor方法的典型用法代码示例。如果您正苦于以下问题:Java MessageUtils.isRequestor方法的具体用法?Java MessageUtils.isRequestor怎么用?Java MessageUtils.isRequestor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.cxf.message.MessageUtils的用法示例。


在下文中一共展示了MessageUtils.isRequestor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isRequestor

import org.apache.cxf.message.MessageUtils; //导入方法依赖的package包/类
@Deprecated
protected boolean isRequestor(Message message) {
    return MessageUtils.isRequestor(message);
}
 
开发者ID:Huawei,项目名称:eSDK_EC_SDK_Java,代码行数:5,代码来源:AbstractOutDatabindingInterceptor.java

示例2: handle

import org.apache.cxf.message.MessageUtils; //导入方法依赖的package包/类
/** 
     * Determines the effective policy, and checks if one of its alternatives  
     * is supported.
     *  
     * @param message
     * @throws PolicyException if none of the alternatives is supported
     */
    protected void handle(Message message) {
        
        AssertionInfoMap aim = message.get(AssertionInfoMap.class);
        if (null == aim) {
            return;
        }

        Exchange exchange = message.getExchange();
        BindingOperationInfo boi = exchange.get(BindingOperationInfo.class);
        if (null == boi) {
            LOG.fine("No binding operation info.");
            return;
        }
        
        Endpoint e = exchange.get(Endpoint.class);
        if (null == e) {
            LOG.fine("No endpoint.");
            return;
        } 
        EndpointInfo ei = e.getEndpointInfo();

        Bus bus = exchange.get(Bus.class);
        PolicyEngine pe = bus.getExtension(PolicyEngine.class);
        if (null == pe) {
            return;
        }
        
        if (MessageUtils.isPartialResponse(message)) {
            LOG.fine("Not verifying policies on inbound partial response.");
            return;
        }
        
        getTransportAssertions(message);  
        
        EffectivePolicy effectivePolicy = message.get(EffectivePolicy.class);
        if (effectivePolicy == null) {
            if (MessageUtils.isRequestor(message)) {
                effectivePolicy = pe.getEffectiveClientResponsePolicy(ei, boi);
            } else {
                effectivePolicy = pe.getEffectiveServerRequestPolicy(ei, boi);
            }
        }
        try {
//            List<List<Assertion>> usedAlternatives = aim.checkEffectivePolicy(effectivePolicy.getPolicy());
//            if (usedAlternatives != null && !usedAlternatives.isEmpty() && message.getExchange() != null) {
//                message.getExchange().put("ws-policy.validated.alternatives", usedAlternatives);
//            }
        } catch (PolicyException ex) {
            //To check if there is ws addressing policy violation and throw WSA specific 
            //exception to pass jaxws2.2 tests
            if (ex.getMessage().indexOf("Addressing") > -1) {
                throw new Fault("A required header representing a Message Addressing Property " 
                                    + "is not present", LOG)
                    .setFaultCode(new QName("http://www.w3.org/2005/08/addressing", 
                                              "MessageAddressingHeaderRequired"));
            }
            throw ex;
        }
        LOG.fine("Verified policies for inbound message.");
    }
 
开发者ID:beemsoft,项目名称:techytax-zk,代码行数:68,代码来源:PolicyVerificationInInterceptor.java

示例3: shouldHandleMessage

import org.apache.cxf.message.MessageUtils; //导入方法依赖的package包/类
@Override
protected boolean shouldHandleMessage(Message message) {
	return MessageUtils.isRequestor(message);
}
 
开发者ID:tracee,项目名称:tracee,代码行数:5,代码来源:TraceeResponseInInterceptor.java

示例4: shouldHandleMessage

import org.apache.cxf.message.MessageUtils; //导入方法依赖的package包/类
@Override
protected boolean shouldHandleMessage(Message message) {
	return !MessageUtils.isRequestor(message);
}
 
开发者ID:tracee,项目名称:tracee,代码行数:5,代码来源:TraceeResponseOutInterceptor.java


注:本文中的org.apache.cxf.message.MessageUtils.isRequestor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。