Search code examples
cxfapache-httpclient-4.xntlmntlmv2

Does CXF 3.1.X uses Apache HttpComponents - HttpClient?


Does CXF 3.1.x really uses Apache HttpComponents - HttpClient for http transport? Maven dependencies does not list "Apache HttpComponents" as dependency nor do I see any HttpClient class in the CXF jars? However CXF JIRA CXF-6704 discusses about it?

I need access to HttpClient in CXF for NTLM support per connection basis which CXF by default relies on Java 6+ Authenticator which is set per JVM.


Solution

  • CXF has a decoupled runtime layer. Mostly they start with cxf-rt-*.

    In the case of transports, cxf-rt-transports-*.

    Take a look at this. I believe that this is the HTTP Components transport runtime.

    EDIT: I think this is for asynchronous transport - (looked at the pom after I posted this).

    EDIT2: I did a little more research on this and found this documentation. It says that the async client can be used for synchronous calls by setting use.async.http.conduit bus property to true. This also specifically refers to NTLM authentication.