I think your old cxf version didn't recognize the policy configured in
your WSDL and didn't complain about not fulfilling the required
constraints.
If you enable logging with info-level, you will see which policy
constraint is required. Depending on which constraints are not
satisfied, you can decide what to do.

There is an option to ignore this policy-constraint check for specific
policy assertions and to let the call take place. Here the assumption
is that the required policy assertion is fulfilled by other
out-of-the-band means so that the call fulfills the expectation of the
server. Here is a sample beans configuration.
https://github.com/apache/cxf/blob/master/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/ignorable-policy.xml

regards, aki

2015-09-15 15:41 GMT+02:00 suniltamoli <[email protected]>:
> Hi,
>
> I am upgrading cxf-api version 2.7.0 then i am getting this issue while I
> use cxf-api 2.2.9 then it's working fine.
>
> javax.xml.ws.soap.SOAPFaultException: None of the policy alternatives can be
> satisfied.
>         at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156)
>         at com.sun.proxy.$Proxy140.postEvent(Unknown Source)
>         at
> com.g1.emessaging.eo.EOOutboundMessageNotifier.notifyEvent(EOOutboundMessageNotifier.java:80)
>         at
> com.g1.emessaging.eo.EOOutboundMessageNotifier.notifyEvent(EOOutboundMessageNotifier.java:31)
>         at
> com.g1.emessaging.service.notification.impl.OutboundMessageNotificationHandler.doHandle(OutboundMessageNotificationHandler.java:25)
>         at
> com.g1.emessaging.service.ems.impl.AbstractMessageHandler.onHandle(AbstractMessageHandler.java:27)
>         at
> com.g1.emessaging.service.ems.impl.InMemoryQueueMessageSender$EmsMessageThread.run(InMemoryQueueMessageSender.java:66)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.cxf.ws.policy.PolicyException: None of the policy
> alternatives can be satisfied.
>         at
> org.apache.cxf.ws.policy.EndpointPolicyImpl.chooseAlternative(EndpointPolicyImpl.java:165)
>         at
> org.apache.cxf.ws.policy.EndpointPolicyImpl.finalizeConfig(EndpointPolicyImpl.java:145)
>         at
> org.apache.cxf.ws.policy.EndpointPolicyImpl.initialize(EndpointPolicyImpl.java:141)
>         at
> org.apache.cxf.ws.policy.PolicyEngineImpl.createEndpointPolicyInfo(PolicyEngineImpl.java:549)
>         at
> org.apache.cxf.ws.policy.PolicyEngineImpl.getEndpointPolicy(PolicyEngineImpl.java:295)
>         at
> org.apache.cxf.ws.policy.PolicyEngineImpl.getClientEndpointPolicy(PolicyEngineImpl.java:278)
>         at
> org.apache.cxf.ws.policy.PolicyDataEngineImpl.getClientEndpointPolicy(PolicyDataEngineImpl.java:61)
>         at
> org.apache.cxf.transport.http.HTTPConduit.updateClientPolicy(HTTPConduit.java:304)
>         at
> org.apache.cxf.transport.http.HTTPConduit.<init>(HTTPConduit.java:290)
>         at
> org.apache.cxf.transport.http.URLConnectionHTTPConduit.<init>(URLConnectionHTTPConduit.java:66)
>         at
> org.apache.cxf.transport.http.HTTPTransportFactory.getConduit(HTTPTransportFactory.java:258)
>         at
> org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:239)
>         at
> org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:246)
>         at
> org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:103)
>         at
> org.apache.cxf.endpoint.UpfrontConduitSelector.prepare(UpfrontConduitSelector.java:63)
>         at
> org.apache.cxf.endpoint.ClientImpl.prepareConduitSelector(ClientImpl.java:851)
>         at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:526)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:464)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:367)
>         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:320)
>         at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:89)
>         at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
>         ... 9 more
>
> If somebody fix this issue then please let me know the solution.
>
> Thanks,
> Sunil Tamoli
>
>
>
> --
> View this message in context: 
> http://cxf.547215.n5.nabble.com/javax-xml-ws-soap-SOAPFaultException-None-of-the-policy-alternatives-can-be-satisfied-tp5761056.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to