Hi, still trying to get cxf working. That can´t be an unsolvable problem...
So there are a few things, that i noticed. The URL in SOAP UI differs from the URL of the wsdl in my Webbrowser. So which URL should I use? So, from the beginning: I generated the java code with wsdl2java again (command: wsdl2java -client get_personalinfo.xml). So I got 10 classes: <http://cxf.547215.n5.nabble.com/file/n5772921/classes.png> That´s , how my standard client(GETPERSONALINFO_GETPERSONALINFO_Client.java) looks like: GETPERSONALINFO_Service ss = new GETPERSONALINFO_Service(wsdlURL, SERVICE_NAME); GETPERSONALINFO port = ss.getGETPERSONALINFO(); { System.out.println("Invoking GetPersonalinfo..."); TableOfPersonalinfo etDataVal = null; javax.xml.ws.Holder<TableOfPersonalinfo> etData = new javax.xml.ws.Holder<TableOfPersonalinfo>(etDataVal); port.GetPersonalinfo(etData); System.out.println("etData=" + etData.value); } I replaced the GETPERSONALINFO_Service ss = new GETPERSONALINFO_Service(wsdlURL, SERVICE_NAME); GETPERSONALINFO port = ss.getGETPERSONALINFO(); with JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); //factory.setServiceClass(GETPERSONALINFO.class); factory.setAddress(wsdlAddress); GETPERSONALINFO client = factory.create(GETPERSONALINFO.class); I hope, that was what you meant? I dont know if I need the factory.setServiceClass(...), i dont notice any differences, when using the line. Depending on the wsdl URL i use, i get different exceptions: URL from SOAP UI: Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Fehler bei der Web-Service-Verarbeitung; Weitere Details im Web-Service-Fehlerprotokoll auf Provider-Seite at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:161) at com.sun.proxy.$Proxy44.GetPersonalinfo(Unknown Source) at Test.main(Test.java:33) Caused by: org.apache.cxf.binding.soap.SoapFault: Fehler bei der Web-Service-Verarbeitung; Weitere Details im Web-Service-Fehlerprotokoll auf Provider-Seite at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:86) at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:52) at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:41) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112) at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69) at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1670) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1551) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139) ... 2 more With the wsdl URL from my Webbrowser I get this exception: Sep 21, 2016 11:21:09 AM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging WARNUNG: Interceptor for {urn:sap-com:document:sap:soap:functions:mc-style}GETPERSONALINFOService#{urn:sap-com:document:sap:soap:functions:mc-style}GetPersonalinfo has thrown exception, unwinding now org.apache.cxf.binding.soap.SoapFault: "http://schemas.xmlsoap.org/wsdl/", the namespace on the "definitions" element, is not a valid SOAP version. at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:130) at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:174) at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:69) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1670) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1551) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139) at com.sun.proxy.$Proxy44.GetPersonalinfo(Unknown Source) at Test.main(Test.java:33) Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: "http://schemas.xmlsoap.org/wsdl/", the namespace on the "definitions" element, is not a valid SOAP version. at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:161) at com.sun.proxy.$Proxy44.GetPersonalinfo(Unknown Source) at Test.main(Test.java:33) Caused by: org.apache.cxf.binding.soap.SoapFault: "http://schemas.xmlsoap.org/wsdl/", the namespace on the "definitions" element, is not a valid SOAP version. at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:130) at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:174) at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:69) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1670) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1551) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139) ... 2 more Sorry for the german language in the exception text, I didnt find the exception in english language. I googled the exception and think it is a SAP specific exception? Does that mean, that I cant ignore the policies? I cant understand, why it works in in SOAP UI without any workaround and in cxf not... Didnt show this, that the policies are ignorable? As i said, it works in my solution with sending and getting a xml over a HttpURLConnection. I hope, that this helps anything... Thank you in advance. Matthew -- View this message in context: http://cxf.547215.n5.nabble.com/SAP-Webservice-None-of-the-policy-alternatives-can-be-satisfied-tp5772704p5772921.html Sent from the cxf-user mailing list archive at Nabble.com.
