Hi Andrei, I opened JIRA issue CXF-5878 for this problem. You will find an attached eclipse project that reproduces it. I generated the code with wsdl2java and only customized the class ECOSEntrySheetProcessingIn_ECOSEntrySheetProcessingIn_Client, which is the client of the service. You don't need the server to reproduce the issue since the problem causes the client to get a NPE before the request is sent to the server. I forced the program to load the WSDL locally in order to get rid of the server for this test. Just run ECOSEntrySheetProcessingIn_ECOSEntrySheetProcessingIn_Client class as a Java application. I tried to find a workaround myself but the CXF code needs much more study in order for me to be able to find one in time. If you can suggest me an alternative solution on how to get rid of those policies client side, without modifying the WSDL, it will do for me.
Thank you in advance for your time. Luca 2014-06-30 12:44 GMT+02:00 Luca Veronese <[email protected]>: > I'm currently on holiday. I will do it as soon as I come back. Thank you. > Il 30/giu/2014 11:37 "Andrei Shakirin [via CXF]" < > [email protected]> ha scritto: > > 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:[hidden email] >> <http://user/SendEmail.jtp?type=node&node=5745742&i=0>] >> > Sent: Freitag, 27. Juni 2014 14:28 >> > To: [hidden email] >> <http://user/SendEmail.jtp?type=node&node=5745742&i=1> >> > 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. >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the >> discussion below: >> >> http://cxf.547215.n5.nabble.com/Disabling-policies-Is-it-working-in-2-7-11-tp5745715p5745742.html >> To unsubscribe from Disabling policies. Is it working in 2.7.11?, click >> here >> <http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5745715&code=bHZlcm9uZXNlLmludGVycHJpc2VAZ21haWwuY29tfDU3NDU3MTV8LTE0NTE1NDM2NDc=> >> . >> NAML >> <http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >> > -- Luca Veronese Tabula srls via Angeli, 47 45100 Rovigo (RO) Mobile: 348 1211282 email: [email protected] skype: luca.veronese.ro twitter: lveronese65 *********************************************************************** NOTICE: This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain confidential or privileged information. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of any of the information contained in or attached to this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify the sender and delete the e-mail and attached documents. Thank you. *********************************************************************** -- View this message in context: http://cxf.547215.n5.nabble.com/Disabling-policies-Is-it-working-in-2-7-11-tp5745715p5746479.html Sent from the cxf-user mailing list archive at Nabble.com.
