Web Service client working on EAP 6.1 throws PolicyException "These policy alternatives can not be satisfied" on EAP 6.2
Issue
- We have a couple of web services (JBossWS-CXF based) within our application. These internally access a third party web service protected by WS-Security. It's working in production deployed on EAP 6.1.
- We are in the process of migrating our application from EAP 6.1 to EAP 6.2. While we deploy the same application in EAP 6.2, we are getting the below error:
13:46:14,962 WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (http-localhost/127.0.0.1:8180-1) Interceptor for {http://example.com/xxxxx}SampleService#{http://example.com/xxxxx}SampleProcess has thrown exception, unwinding now: org.apache.cxf.ws.policy.PolicyException: These policy alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}TransportBinding: Layout does not match the requirements
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}Layout: Layout does not match the requirements
at org.apache.cxf.ws.policy.AssertionInfoMap.checkEffectivePolicy(AssertionInfoMap.java:179)
at org.apache.cxf.ws.policy.PolicyVerificationInInterceptor.handle(PolicyVerificationInInterceptor.java:101)
at org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPolicyInterceptor.java:44)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) [cxf-api-2.7.7.redhat-1.jar:2.7.7.redhat-1]
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:835) [cxf-api-2.7.7.redhat-1.jar:2.7.7.redhat-1]
- The third party service provider's WSDL includes the following WS-SecurityPolicy:
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
...
<sp:Layout>
<wsp:Policy>
<sp:Strict />
</wsp:Policy>
</sp:Layout>
<sp:IncludeTimestamp />
</wsp:Policy>
</sp:TransportBinding>
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.2.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.