In case if SAP web service doesn't force special headers / security, you can
just use generated service interface and set address in the factory explicitly,
without using WSDL:
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
HelloWorld client = factory.create(HelloWorld.class);
> -----Original Message-----
> From: MRneedHelp [mailto:matthias.rudingsdor...@freenet.de]
> Sent: Donnerstag, 15. September 2016 11:15
> To: firstname.lastname@example.org
> Subject: SAP Webservice: None of the policy alternatives can be satisfied
> i´m new to CXF and trying to connect to a SAP Webservice. I use the newest cxf
> version 3.1.7.
> I have the WSDL from the webservice and generated code with wsdl2java.
> I should update a program from Axis2 to CXF. But when i start the standard
> client (genarted with wsdl2java) i get a "SOAPFaultException: None of the
> policy alternatives can be satisfied."
> Now i searched for 3 days on the internet and i know that the error occurs,
> because some SAP policies are not supported by cxf. I know several solutions
> for this problem, but none of them is working...
> I tried it with the JaxWSFactoryBean:
> But when i use the code, i get a "ServiceConstructionException: Could not find
> definition for service" in the "factory.create()" line. I searched for the
> and think, it is because of differences in "namespaces". But i could not find
> difference in the code to the wsdl.
> Well so, back to the basic code from wsdl2java.
> I read many posts, that say to use Interceptors and AssertionBuilders, but I
> could not get it, how to imlement them or use them.
> I also dont know, if i really need them. I just want to connect with the SAP
> Webservice. I can just ignore all policies in the wsdl, but i cant remove them
> from the wsdl. In the Axis2 code the policies were overwritten with a default
> policy, which was accepted.
> I´ve tryed the IgnorablePolicyInterceptorProvider, self implemented in java or
> with a bean in the cxf.xml file, but nothing worked. Im not sure, if i did it
> So my question is: IS there a simple way to just ignore all policies and get
> access to the SAP webservice? (With soap UI it works perfectly).
> Thank you in advance.
> View this message in context: http://cxf.547215.n5.nabble.com/SAP-
> Sent from the cxf-user mailing list archive at Nabble.com.