According to the WS-Policy spec:

http://specs.xmlsoap.org/ws/2004/09/policy/ws-policy.pdf 
<http://specs.xmlsoap.org/ws/2004/09/policy/ws-policy.pdf>

Section 4.1:

/wsp:Policy/wsp:ExactlyOne A collection of policy alternatives. If there are no 
Element Information Items in the [children] property, there are no admissible 
policy alternatives, i.e., no behavior is admissible.

Thus, I believe the current behavior is correct.


Dan



> On Sep 16, 2016, at 6:47 AM, Akanksha Agrawal <akanksha....@gmail.com> wrote:
> 
> Hello folks,
> 
> I am trying to invoke a web service having the following policy attached:
> 
> https://gist.github.com/Akanksha08/8acdeaf4467fc06c29a6d4f9f7f2a19d
> 
> I am getting the following Exception:
> 
> javax.xml.ws.soap.SOAPFaultException: None of the policy alternatives
> can be satisfied.
> at org.apache.cxf.jaxws.DispatchImpl.mapException(DispatchImpl.java:290)
> at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:334)
> at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:246)
> at com.ws.cxf.client.SOAPClient.invokeService(SOAPClient.java:71)
> at com.ws.cxf.client.SOAPClient.main(SOAPClient.java:42)
> 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:166)
> 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:584)
> at 
> org.apache.cxf.ws.policy.PolicyEngineImpl.getEndpointPolicy(PolicyEngineImpl.java:313)
> at 
> org.apache.cxf.ws.policy.PolicyEngineImpl.getClientEndpointPolicy(PolicyEngineImpl.java:294)
> at 
> org.apache.cxf.ws.policy.PolicyDataEngineImpl.getClientEndpointPolicy(PolicyDataEngineImpl.java:61)
> at 
> org.apache.cxf.transport.http.HTTPConduit.updateClientPolicy(HTTPConduit.java:316)
> at org.apache.cxf.transport.http.HTTPConduit.getClient(HTTPConduit.java:850)
> at 
> org.apache.cxf.transport.http.HTTPConduit.configureConduitFromEndpointInfo(HTTPConduit.java:347)
> at 
> org.apache.cxf.transport.http.HTTPConduit.finalizeConfig(HTTPConduit.java:427)
> at 
> org.apache.cxf.transport.http.HTTPTransportFactory.getConduit(HTTPTransportFactory.java:242)
> at 
> org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:222)
> at 
> org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:229)
> at 
> org.apache.cxf.endpoint.AbstractConduitSelector.createConduit(AbstractConduitSelector.java:145)
> at 
> org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:107)
> at 
> org.apache.cxf.endpoint.UpfrontConduitSelector.prepare(UpfrontConduitSelector.java:63)
> at 
> org.apache.cxf.endpoint.ClientImpl.prepareConduitSelector(ClientImpl.java:849)
> at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:509)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:279)
> at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:314)
> at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:327)
> ... 3 more
> 
> Could anyone please look into it?
> 
> Thanks,
> Akanksha

-- 
Daniel Kulp
dk...@apache.org <mailto:dk...@apache.org> - http://dankulp.com/blog 
<http://dankulp.com/blog>
Talend Community Coder - http://coders.talend.com <http://coders.talend.com/>

Reply via email to