Client « cxf « Java Enterprise Q&A

1. Detecting Client Disconnects in Web Services

I'm using the Apache CXF Web Services stack. When a client times out or disconnects from the server before the operation is complete, the server keeps running the operation ...

2. How do you use TLS/SSL Http Authentication with a CXF client to a web service?

I'm trying to access a web service secured by a certificate. The security is setup on IIS and the web service is behind it. I don't think WS-SECURITY will do this type of ...

3. CXF generated web service client

When using a generated webservice-client (CXF and Maven-Plug-in) I got the following error: Interceptor has thrown exception, unwinding now null. Can someone help me? Thanks!

4. CXF dynamic client API - getUnwrapperOperation, getWrappedOperation

QName opName = new QName("", "Login");
BindingOperationInfo boi = binding.getOperation(lastOperation);
boi = boi.getUnwrappedOperation();
boi = boi.getWrappedOperation();
Can anyone explain to me the difference between getUnwrappedOperation() vs. getWrappedOperation()? What is being wrapped?

5. What can I use to create a REST client in Java?

If I want to use Java to create a REST client, what should I use? Can i use CXF?

6. How to write a CXF client with implicit security header

I have to access a service which is developed using different framework. The client program is using CXF. I dont have access to the provider environment so I cannot use any ...

7. Advantages of using a Dynamic Client with JAX-WS

What are the advantages of using a dynamic client with JAX-WS services as opposed to just using generated client classes? What are the disadvantages? **For my particular case I am using Apache ...

8. How to reduce memory size of Apache CXF client stub objects?

My web service client application uses Apache CXF to generate client stubs for talking to several web services. The generated CXF web service stub objects have quite a large ...

9. CXF Client Side Duplication of targetnamespace

I am hosting a webservice and a webapp on the same server, generated from wsdl2java. I can contact the service just fine through SoapUI and it returns a single namespace ...

10. Cxf HTTPS client example

I need a Cxf client which can deal with HTTPS wsdl url. The cxf documentation isn't really big, so i would appreciate some help. Is there any example of what i want ? ...

11. Client for restful web service

I'd like to create a http-centric client for a restful web service created using Apache CXF. To that end:

  • Does any one know the (maven) dependencies for ONLY the CXF clients (Proxy ...

12. CXF Client Webservice Question

I created a Webservice client and I am receiving the following error when the webservice is being created. I wasw ondering if I am missing something on this error: Error running ...

13. CXF Client Webservice Ping has thrown exception Could not send Message. Invalid address. Endpoint address cannot be null

I am getting the following error [1] from the following code:

ClassLoader cl = Thread.currentThread().getContextClassLoader();
        URL WSDL_LOCATION=null;
        if ...

14. Apache CXF Client for Dynamic Endpoints

I'm now using Apache CXF as a web services client for a .NET service to get around NTLM authentication. It works great, but I'm wondering why I can't seem to ...

15. CXF SSL secured Web Service client with multiple certificates

I have a Java CXF client that connects to a SSL secured Web Service with mutual authentication. I have my keystore and my truststore properly configured on the client-side and it works ...

16. Problem with Mule cxf:outbound-endpoint (client) and HTTPS/SSL

I have a small problem configuring the CXF transport in Mule 2.2 to call a WS-method on service exposed, using HTTPS/SSL. Calling the same method using plain HTTP works fine. I’ve ...

17. Relative Path for WSDL in CXF Webservice Client

In my Application I use many Webservices. As the WSDL does not change, I have integrated the WSDL files in my project. If I use the WSDL2Java Tool from CXF, the ...

18. How to create a dynamic webservice client with basic authentication using Apache CXF?

I want to develop a SOAP web service with TDD. The web service is build on Apache CXF and protected with basic authentication. My idea is to set up the unit ...

19. How to turn off information messages in Apache CXF dynamic client?

I made a dynamic client in java using Apache CXF. It works well and does all the things it is supposed to. The one thing that is annoying me a bit, ...

20. How to avoid the need to specify the WSDL location in a CXF or JAX-WS generated webservice client?

When I generate a webservice client using wsdl2java from CXF (which generates something similar to wsimport), via maven, my services starts with codes like this:

@WebServiceClient(name = "StatusManagement", 

21. CXF Web service client error

I am trying to invoke a web service from java client using apache CXF. Following is my client code snippet.

Client client = new ClientImpl(new URL("http://localhost:8080/socialkast-web/services/skservice?wsdl"));
Object[] results ...

22. How to bind webservice client to specified IP (network interface) with Apache CXF?

My problems is: there is a one RHEL default server with 2 NIC configured:

  • eth0 with IP
  • eth1 with IP
Also, there is jboss- installed on Red Hat, with an EAR deployed ...

23. cxf client authorization issue

I use JAXRSClientFactory.create method to create proxy like this:

IMyService myService 
 = JAXRSClientFactory.create("http://myserviceurl/", IMyService.class, "login1", "pwd", null);
and this code work ok. After that I need to use this service with another ...

24. Apache CXF client and Collection classes

I have a requirement to return List of custom class(FeedMetaData) objects from a web service method. When I invoke this method from client, I am getting ClassCast Exception. FeedMetaData is simple bean ...

25. How to read an xs:any response using CXF Generated Client?

When consuming a webserice with CXF 2.1.4 (the generated client) I am having problem getting the response based on the following XSD snippet in the WSDL. CXF Generates a List representing ...

26. "*Certificate not found* (from client)" when calling Web Service that requires signing

I have a peculiar problem when calling a web service that expects the message to be signed using WS-Security. If I call using my client application (using Apache CXF) I get ...

27. CXF Client Interceptor to always call another method first?

I'm dealing with a web service that needs to have an "authentication" method called and the returned token placed in a special header in order to do the next operation, every ...

28. CXF - client generation

How can I force CXF to Serialize all auto generated client classes? Any parameters I need to pass when runing the client generator?

29. CXF WebService Client generation: Use existing Domain Model classes

I have got a web application which is speparated in a GUI (JSF 2.0, Orchestra, Spring) and service (Spring, JPA, Hibernate,...) project. Due to network issues between the web server and ...

30. CXF Webservice server calling Axis1 webservice as client Problem (Unable to locate a valid EngineConfigurationFactory)

I have a CXF webservice server calling a Axis1 webservice as cliente and getting the follow error: "Unable to locate a valid EngineConfigurationFactory" and then, null pointer exception I'm using Jboss4. Is there any ...

31. HTTP "Negotiate" authentication via NTLM from a Java SE6 client on Windows

Does anyone know if a Java 6 client running on Windows is able to authenticate via NTLM when accessing a Microsoft server that implements the SPNEGO authentication protocol? My understanding is ...

32. How do I get a CXF client to understand a List?

I'm using Apache CXF for my restful web services. I have a service defined by an interface that returns a list of my bean.

public interface MyService {


33. java web app calling a web service client (in cxf)

I need a very performant and scalable solution to calling web services from java webapp. Could someone please suggest the best options for calling webservices from java webapp? Much appreciated

34. MTOM JAXWS CXF inlining binary not using xop:include client side

Hi Guys I'm looking at using CXF as a client for a web service that expects an xop:include attachment. I have setup the client as best i know but the attachment seems ...

35. Handling SSL connection with JAX-WS client: JAXWS-RI ok, CXF / Axis2 ko

I'm using JAX-WS api in order to perform a webservice call. The call is working using JAX-WS RI (2.1.7), Axis2 (1.5.4) and CXF (2.2.7) implementations. As soon as I move to an ...

36. Set the service port for GroovyWS client

I have the following code:

proxy = new WSClient("", this.class.classLoader, SoapVersion.SOAP_1_2)
Which loads a WSDL with the following section:
<wsdl:service name="Admin">
<wsdl:port name="AdminSoap" binding="tns:AdminSoap">
<soap:address location=""/>
<wsdl:port name="AdminSoap12" binding="tns:AdminSoap12">
<soap12:address location=""/>
<wsdl:port name="AdminSoap11Mtom" binding="tns:AdminSoap11Mtom">
<soap:address location=""/>
<wsdl:port name="Admin12Mtom" binding="tns:Admin12Mtom">
<soap12:address location=""/>
Now when ...

37. Client generation for CXF service

I'd like to generate a client for my CXF service so I tried the Axis 2 code generator but it doesn't quite generate straightforward-to-use code. I expected something like client.getEmployeeByName("John Doe") ...

38. CXF JAX-RS Client Null Pointer Exception

I am trying to use the Apache CXF JAX-RS Client API code found here. However, when I run the client it throws this:

Exception in thread "main" java.lang.NullPointerException

39. create client side java classes from a RESTful service in CXF

I want to create client-side java from a restful web service, so that I can call the service. Do somebody know if CXF provide such this tools? Best,

40. EasyMock CXF JAXWS Client

I am trying to test my web service client which uses CXF with JAXWS annotations i.e. @WebService and @SOAPBinding. I was wondering is there a way to mock the interface which ...

41. CXF No Databinding client

I am trying to figure out how to use cxf to send a client request to a web client without databinding. The use case I have is that everything bar the ...

42. How Can I Programmatically Add A Binding to CXF Client Code?

I am writing an ANT Task that tries to create a proxy for a CXF Web Service like below:

JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
ProjectApi projectApi = (ProjectApi)factory.create();
If I run it as a ...

43. CXF Client Security

I am creating a client to a .net soap web service, but am having trouble figuring out how to properly pass the password. Here is my "hardcoded" password example:

public void ...

44. CXF JAXRS client not reusing TCP connections

I'm using the JAX-RS support in CXF 2.2.5 to invoke REST webservices. I'm creating a single org.apache.cxf.jaxrs.client.WebClient instance for each endpoint I need to communicate with (typically one or two endpoints ...

45. On the client side, how should I be using complex type objects returned by a CXF webservice?

I've just started using CXF 2.4 to expose some methods in an existing web application. One of the methods returns a complex type object - Employee which has an Address object ...

46. Java client for SOAP web service with NTLM authentication

I spent many days and nights trying to find a proper Java framework that could connect to Microsoft Dynamics CRM which uses Negotiate/NTLM authentication. I tried all existing suggestions on Stackoverflow ...

47. Microsoft webservice and CXF client: JAXB fails to understand "s:schema"

I have ordinary Microsoft webservice and normal CXF of latest version with Java/JDK 1.6, Eclipse etc. When I am running wsdl2java, the JAXB part throws an error "Thrown by JAXB: undefined element ...

48. WebService Client and List>

When I try to generate a client from a wsdl document, I get a client that seems to have a lot of JAXBElement atributes, for instance

protected List<JAXBElement<?>> nameOrLinkingNameOrFamilyName;
I use soapUI ...

49. Manage state between service calls in Apache CXF SOAP client

I am writing a SOAP client using Apache CXF. Earlier I was using Axis2. I used wsdl2java utility available in Axis2 and created the java classes. There was a service stub ...

50. Dynamic clients for Policy enabled Web services

I am working on a client for SOAP based web services and CXF is the stack I am using. The service which my application is consuming has policy assertions for security ...

51. Problem with passing SOAP headers using Apache CXF client

I am trying to implement a simple client for a webservice, the only problem I am facing with the webservice is, it has a generic endpoint: and the way you ...

52. How to create a CXF webservice client with dynamic endpoint?

We have a central wsdl file that describes a service. We use cxf to generate client code, but this code seems to be bound to 1 endpoint. How can i create ...

53. CXF webservice client, how to handle response from a called webservice?

i have implemented a webservice client that is used inside a webapplication (using Spring) and this client gets a response in which CXF bailsout and gives me an error message. The ...

54. Apache CXF Client

We have a webservice client , developed using Apache CXF . Inside our client class , we have this :

public class RunCode  implements CallbackHandler

   public void getView()

55. Apache CXF Client Not getting Invoked

I am new to Apache CXF , so please help . I dont know why the client is not getting called . client = (BayerService) factory.create(); I did this way

public class RunBayer ...

56. CXF 2.2.12: How to turn off schema validation on the client side

I would like to turn off schema validation for JAXB-bound messages. I am dealing with the client-side CXF code (WSDL first generation). I have tried using

<jaxws:client name="{}SoapPort"

57. cxf client in applet cause many repeating loading jars

I have a web app with the applet to visit the cxf ws server. When I init the the connection to the cxf ws,there are so many dirty messages(about 1000 lines,and cost ...

58. Does anyone know a Jersey client proxy implementation like Apache CXF offers for REST

the Apache CXF project offers a proxy based client implementation for REST services. This looks like:

Resource resource = JAXRSClientFactory.create( baseAddress, Resource.class )
Does anyone know a similar implementation for Jersey? I spotted an ...

59. CXF RESTful Client - How to do trust all certs?

I have written Jersey RESTful clients that made use of a Dumb X509TrustManager and HostnameVerifier to trust all SSL certs on our lab systems to make it easier to deal with ...

60. Apache CXF SOAP client , using generated stubs in https

I am generating a Soap client for a Soap webservice. I created Java Stubs and when I tried executing I got an error, which I could not solve. Please help Caused by: ...

61. Writing Webservice client without any dependencies

From my webservice , i am calling another WebService . So inside my webservice code , i am writing the code this way

JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
String host = "refers ...

62. JS Client from interface with cxf

63. Apache CXF generic client - JAX-WS or wsdl2java stubs?

Dear friends, I am developing an Apache CXF client code and I see there are two options, 1. JAX-WS client 2. wsdl2java stub related client can anyone guide me which approach is better to make client generic? I have wsdl file which I need to consume, but if tomorrow if new methods are added then I have to re generate stub ...

64. CXF Client connection refused error

Hello, I have written a simple(cxf based) web service. When I try to access it from(cxf based web service) client, I am getting the connection refused error. My web service is as follows: @WebService public interface ITest { String sayHi(String name); } @WebService(targetNamespace ="", name="socialkastSOAP") public class Test implements ITest { @Override public String sayHi(String name) { return "Hi "+name; } ...

65. NullPointer when calling XFire service using CXF client.

Hi All. I am trying to call a working XFire set of services using a CXF client. Everything was working great until we noticed that XFire was leaving sockets in a CLOSE_WAIT state. So I began looking for solutions for the CLOSE_WAITS and attempted subclassing the close method of the CommonsHttpMessageSender class. This however did not work and then decided to ...