use of org.apache.cxf.ws.policy.EffectivePolicyImpl in project cxf by apache.
the class RMEndpoint method setPolicies.
void setPolicies(Message message) {
// use same WS-policies as for application endpoint
PolicyEngine engine = manager.getBus().getExtension(PolicyEngine.class);
if (null == engine || !engine.isEnabled()) {
return;
}
for (Endpoint endpoint : endpoints.values()) {
EndpointInfo ei = endpoint.getEndpointInfo();
EndpointPolicy epi = null == conduit ? engine.getServerEndpointPolicy(applicationEndpoint.getEndpointInfo(), null, message) : engine.getClientEndpointPolicy(applicationEndpoint.getEndpointInfo(), conduit, message);
if (conduit != null) {
engine.setClientEndpointPolicy(ei, epi);
} else {
engine.setServerEndpointPolicy(ei, epi);
}
EffectivePolicyImpl effectiveOutbound = new EffectivePolicyImpl();
effectiveOutbound.initialise(epi, engine, false, false, message);
EffectivePolicyImpl effectiveInbound = new EffectivePolicyImpl();
effectiveInbound.initialise(epi, engine, true, false, message);
BindingInfo bi = ei.getBinding();
Collection<BindingOperationInfo> bois = bi.getOperations();
for (BindingOperationInfo boi : bois) {
engine.setEffectiveServerRequestPolicy(ei, boi, effectiveInbound);
engine.setEffectiveServerResponsePolicy(ei, boi, effectiveOutbound);
engine.setEffectiveClientRequestPolicy(ei, boi, effectiveOutbound);
engine.setEffectiveClientResponsePolicy(ei, boi, effectiveInbound);
}
}
// TODO: FaultPolicy (SequenceFault)
}
Aggregations