Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 54729 invoked from network); 21 Jan 2011 22:20:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Jan 2011 22:20:06 -0000 Received: (qmail 66938 invoked by uid 500); 21 Jan 2011 22:20:06 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 66882 invoked by uid 500); 21 Jan 2011 22:20:06 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 66874 invoked by uid 99); 21 Jan 2011 22:20:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jan 2011 22:20:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jan 2011 22:20:05 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0LMJjYa020492 for ; Fri, 21 Jan 2011 22:19:45 GMT Message-ID: <5710190.117431295648385108.JavaMail.jira@thor> Date: Fri, 21 Jan 2011 17:19:45 -0500 (EST) From: "CXF User (JIRA)" To: issues@cxf.apache.org Subject: [jira] Commented: (CXF-3249) When accessing a service that requires auth CXF returns: RuntimeException: Can't find input stream in message In-Reply-To: <22361618.392221295164865262.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-3249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984968#action_12984968 ] CXF User commented on CXF-3249: ------------------------------- Hi Chrisitian, I used the "Authenticator" with CXF and found it works okay. Actually in my case the webservice was deployed on Microsoft IIS server and I "have to" use "Authenticator" - "BindingProvider" did not work for me. It turns out that since the web service was deployed on Microsoft IIS which needs NTLM authentication, and if we use Apache CXF library for ws-client, we "must" need to setup the CXF client to turn off chunking. The reason is that the NTLM authentication requires a 3 part handshake which breaks the streaming. This was beyond my knowledge as I have very very limited knowledge about Microsoft technologies. Surprisingly JAX-WS RI implementation or Metro-WS stack does not demand this kind requirement. Thus in my opinion it is indeed an overhead for CXF users. The other error. i.e. "Unexpected close tag ; expected ", was occurring because the server was sending an error page which was lacking an end tag. The CXF library is strict in XML parsing and instead of showing error as "401 Authentication Required", it just states about the parsing error. AGAIN, the JAX-WS RI implementation or Metro-WS stack does properly show the correct error message (i.e. 401 authentication required.) even if the returned html page misses an end tag. Though I have found the solution but I would love to know more about NTLM authentication and how the turning the chunking off resolves the authentication failure issues with CXF stack. So if anybody can throw some light in it, will be very happy. Cheers, - Kuntal > When accessing a service that requires auth CXF returns: RuntimeException: Can't find input stream in message > ------------------------------------------------------------------------------------------------------------- > > Key: CXF-3249 > URL: https://issues.apache.org/jira/browse/CXF-3249 > Project: CXF > Issue Type: Bug > Components: Transports > Affects Versions: 2.3.1 > Reporter: Christian Schneider > Assignee: Christian Schneider > Fix For: 2.3.2 > > > I try to access a service that requires basic auth. My request does not include credentials. I would expect CXF to return something like > 401 Authentication required. But it returns the following exception: > WARNUNG: Interceptor for {http://customerservice.example.com/}CustomerServiceService#{http://customerservice.example.com/}getCustomersByName has thrown exception, unwinding now > java.lang.RuntimeException: Can't find input stream in message > at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:116) > at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60) > at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) > at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755) > at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2330) > at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2192) > at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2036) > at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) > at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:696) > at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) > at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265) > at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) > at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) > at $Proxy30.getCustomersByName(Unknown Source) > at client.JaxWsClient.main(JaxWsClient.java:24) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.