[ https://issues.apache.org/jira/browse/CXF-4525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466350#comment-13466350 ]
Shaun Elliott commented on CXF-4525: ------------------------------------ I've got the code working now, it is in maven and whatnot, but it doesn't quite work as expected. I get this: {noformat} Caused by: java.io.IOException: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity. at org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduit$AsyncWrappedOutputStream.getHttpResponse(AsyncHTTPConduit.java:513) at org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduit$AsyncWrappedOutputStream.getResponseCode(AsyncHTTPConduit.java:607) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1516) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1489) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1308) ... 41 more Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity. at org.apache.http.impl.nio.client.DefaultAsyncRequestDirector.generateRequest(DefaultAsyncRequestDirector.java:308) at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.requestReady(HttpAsyncRequestExecutor.java:145) at org.apache.http.impl.nio.DefaultNHttpClientConnection.produceOutput(DefaultNHttpClientConnection.java:238) at org.apache.http.impl.nio.DefaultHttpClientIODispatch.onOutputReady(DefaultHttpClientIODispatch.java:130) at org.apache.http.impl.nio.DefaultHttpClientIODispatch.onOutputReady(DefaultHttpClientIODispatch.java:50) at org.apache.http.impl.nio.reactor.AbstractIODispatch.outputReady(AbstractIODispatch.java:141) at org.apache.http.impl.nio.reactor.BaseIOReactor.writable(BaseIOReactor.java:181) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:346) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:320) at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:280) at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:604) at java.lang.Thread.run(Thread.java:662) {noformat} >From what I can understand, this is due to the nature of NTLM authentication. >eg: it is expected that a certain amount of requests will fail. See >[here|http://code.google.com/p/sardine/issues/detail?id=103]. I might be wrong, but I think the fix is as simple as dealing with org.apache.http.client.NonRepeatableRequestException in the getHttpResponse method of the asyncconduit. {code} if ( exception != null && !(exception instanceof NonRepeatableRequestException) ) {code} If you prefer, I can open a new Jira task, or I can rename this task to something like "allow NTLM authentication". > expose http client > ------------------ > > Key: CXF-4525 > URL: https://issues.apache.org/jira/browse/CXF-4525 > Project: CXF > Issue Type: Improvement > Components: Transports > Affects Versions: 2.7.0 > Reporter: Shaun Elliott > Assignee: Daniel Kulp > Fix For: 2.7.0 > > > The class: CXFAsyncRequester hides the DefaultHttpAsyncClient, thus > preventing interaction from outside classes. One use case would be to > leverage the embedded DefaultHttpAsyncClient to do NTLM authentication, which > is currently not possible with CXF. > AsyncHTTPConduit will also need a getter on the factory field. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira