本文整理汇总了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);
}
示例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.");
}
示例3: shouldHandleMessage
import org.apache.cxf.message.MessageUtils; //导入方法依赖的package包/类
@Override
protected boolean shouldHandleMessage(Message message) {
return MessageUtils.isRequestor(message);
}
示例4: shouldHandleMessage
import org.apache.cxf.message.MessageUtils; //导入方法依赖的package包/类
@Override
protected boolean shouldHandleMessage(Message message) {
return !MessageUtils.isRequestor(message);
}