Hi, Looks as a bug for me. <p:engine enabled="false" /> should turn off the entire Policy engine.
Could you please create a Jira issue and attach a small test to reproduce the problem? Regards, Andrei. > -----Original Message----- > From: lveronese [mailto:[email protected]] > Sent: Freitag, 27. Juni 2014 14:28 > To: [email protected] > Subject: Disabling policies. Is it working in 2.7.11? > > Hi, > > I'm running CXF 2.7.11 and tried to disable the policy engine as suggested > with: > > <cxf:bus> > <cxf:features> > <p:policies enabled="false" /> > </cxf:features> > </cxf:bus> > > and with > > <p:engine enabled="false" ignoreUnknownAssertions="false" /> > > I added necessary namespace and xsd references and beans.xml validates > properly. > When I run the application I get a NullPointerException in: > org.apache.cxf.transport.http.HTTPConduit at line 314: > > private void updateClientPolicy() { > PolicyDataEngine policyEngine = > bus.getExtension(PolicyDataEngine.class); > if (policyEngine != null && endpointInfo.getService() != null) { > --> clientSidePolicy = > policyEngine.getClientEndpointPolicy(endpointInfo, > this, new > ClientPolicyCalculator()); > } > } > > The policyEngine is not null, so the call propagates and a NPE is produced > in: > > Caused by: java.lang.NullPointerException > at > org.apache.cxf.ws.policy.EndpointPolicyImpl.chooseAlternative(EndpointPolicyI > mpl.java:161) > at > org.apache.cxf.ws.policy.EndpointPolicyImpl.finalizeConfig(EndpointPolicyImpl.j > ava:145) > at > org.apache.cxf.ws.policy.EndpointPolicyImpl.initialize(EndpointPolicyImpl.java:1 > 41) > at > org.apache.cxf.ws.policy.PolicyEngineImpl.createEndpointPolicyInfo(PolicyEngin > eImpl.java:550) > at > org.apache.cxf.ws.policy.PolicyEngineImpl.getEndpointPolicy(PolicyEngineImpl.j > ava:296) > at > org.apache.cxf.ws.policy.PolicyEngineImpl.getClientEndpointPolicy(PolicyEngine > Impl.java:279) > at > org.apache.cxf.ws.policy.PolicyDataEngineImpl.getClientEndpointPolicy(PolicyD > ataEngineImpl.java:61) > at > org.apache.cxf.transport.http.HTTPConduit.updateClientPolicy(HTTPConduit.jav > a:314) > > no alternative is in fact available since I can't manage the policies which > are > defined in a weird SAP WSDL. > I need to be able to skip policies. > If I try to execute a call from SoapUI everything works without problems. > The same seems to happen to a colleague of mine using Axis2. > > Someone can help me? > Thank you in advance for your time. > > Luca > > > > > -- > View this message in context: http://cxf.547215.n5.nabble.com/Disabling- > policies-Is-it-working-in-2-7-11-tp5745715.html > Sent from the cxf-user mailing list archive at Nabble.com.
