You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2011/05/20 23:33:24 UTC
svn commit: r1125571 - in /cxf/trunk:
rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java
systests/ws-security/src/test/resources/wsdl_systest_wssec/saml/DoubleItSaml.wsdl
Author: dkulp
Date: Fri May 20 21:33:24 2011
New Revision: 1125571
URL: http://svn.apache.org/viewvc?rev=1125571&view=rev
Log:
[CXF-3542] EndpointPolicyImpl overcalculating the required vocabulary
Modified:
cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java
cxf/trunk/systests/ws-security/src/test/resources/wsdl_systest_wssec/saml/DoubleItSaml.wsdl
Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java?rev=1125571&r1=1125570&r2=1125571&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java (original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EndpointPolicyImpl.java Fri May 20 21:33:24 2011
@@ -35,8 +35,6 @@ import org.apache.cxf.message.Message;
import org.apache.cxf.service.model.BindingFaultInfo;
import org.apache.cxf.service.model.BindingOperationInfo;
import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.transport.Conduit;
-import org.apache.cxf.transport.Destination;
import org.apache.neethi.Assertion;
import org.apache.neethi.ExactlyOne;
import org.apache.neethi.Policy;
@@ -213,44 +211,26 @@ public class EndpointPolicyImpl implemen
// (in case of a client endpoint) messages
for (BindingOperationInfo boi : ei.getBinding().getOperations()) {
EffectivePolicy p = null;
- if (this.requestor) {
- p = engine.getEffectiveClientRequestPolicy(ei, boi,
- (Conduit)assertor);
- } else {
+ if (!this.requestor) {
p = engine.getEffectiveServerRequestPolicy(ei, boi);
- }
- Collection<Assertion> c = engine.getAssertions(p, false);
- if (c != null) {
- addAll(vocabulary, c);
- if (null != faultVocabulary) {
- addAll(faultVocabulary, c);
+ Collection<Assertion> c = engine.getAssertions(p, false);
+ if (c != null) {
+ addAll(vocabulary, c);
}
- }
- if (this.requestor) {
- p = engine.getEffectiveClientResponsePolicy(ei, boi);
} else {
- p = engine.getEffectiveServerResponsePolicy(ei, boi,
- (Destination)assertor);
- }
- c = engine.getAssertions(p, false);
- if (c != null) {
- addAll(vocabulary, c);
- if (null != faultVocabulary) {
- addAll(faultVocabulary, c);
+ p = engine.getEffectiveClientResponsePolicy(ei, boi);
+ Collection<Assertion> c = engine.getAssertions(p, false);
+ if (c != null) {
+ addAll(vocabulary, c);
+ if (null != faultVocabulary) {
+ addAll(faultVocabulary, c);
+ }
}
- }
- if (boi.getFaults() != null) {
- for (BindingFaultInfo bfi : boi.getFaults()) {
- if (this.requestor) {
+ if (boi.getFaults() != null && null != faultVocabulary) {
+ for (BindingFaultInfo bfi : boi.getFaults()) {
p = engine.getEffectiveClientFaultPolicy(ei, bfi);
- } else {
- p = engine.getEffectiveServerFaultPolicy(ei, bfi,
- (Destination)assertor);
- }
- c = engine.getAssertions(p, false);
- if (c != null) {
- addAll(vocabulary, c);
- if (null != faultVocabulary) {
+ c = engine.getAssertions(p, false);
+ if (c != null) {
addAll(faultVocabulary, c);
}
}
Modified: cxf/trunk/systests/ws-security/src/test/resources/wsdl_systest_wssec/saml/DoubleItSaml.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/resources/wsdl_systest_wssec/saml/DoubleItSaml.wsdl?rev=1125571&r1=1125570&r2=1125571&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/resources/wsdl_systest_wssec/saml/DoubleItSaml.wsdl (original)
+++ cxf/trunk/systests/ws-security/src/test/resources/wsdl_systest_wssec/saml/DoubleItSaml.wsdl Fri May 20 21:33:24 2011
@@ -581,6 +581,7 @@
</sp:EncryptedParts>
<sp:SignedParts>
<sp:Body/>
+ <sp:Header Namespace="http://WSSec/saml"/>
</sp:SignedParts>
</wsp:All>
</wsp:ExactlyOne>