Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 62754 invoked from network); 20 Jan 2011 00:44:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Jan 2011 00:44:11 -0000 Received: (qmail 74508 invoked by uid 500); 20 Jan 2011 00:44:11 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 74382 invoked by uid 500); 20 Jan 2011 00:44:10 -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 74373 invoked by uid 99); 20 Jan 2011 00:44:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jan 2011 00:44:10 +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; Thu, 20 Jan 2011 00:44:07 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0K0hkIh009817 for ; Thu, 20 Jan 2011 00:43:46 GMT Message-ID: <26090403.70711295484226098.JavaMail.jira@thor> Date: Wed, 19 Jan 2011 19:43:46 -0500 (EST) From: "CXF User (JIRA)" To: issues@cxf.apache.org Subject: [jira] Issue Comment Edited: (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 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-3249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12983957#action_12983957 ] CXF User edited comment on CXF-3249 at 1/19/11 7:43 PM: -------------------------------------------------------- Hi Christian, In my case I do pass the credential - but still I get the same exception as shown below. I am accessing a remote webservice (i.e. deployed in different m/c). I am using JBoss 6.x which comes with CXF stack (version 2.3.1) - can you pls. suggest where need to look up further? The remote webservice's WSDL is properly accessible thru browser. For passing the credential I have following code in my WS-client. The sever side implementation (to expose the web service) has been done using .NET - so my question is do I need to keep any "cxf.xml" as part of my ws-client ? If yes, then what should be the ideal place to keep such "cxf.xml" file? My ws-client class is inside a jar and is deployed as part of EAR/lib in Jboss (not part of WAR module). =========================================================== class MyAuthenticator extends Authenticator { @Override public PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(login, password.toCharArray()); } } Authenticator.setDefault(new MyAuthenticator()); ============================================================= 19:08:20,449 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] Creating Service {http://www.towersoft.com/schema/webservice/trim2/}Engine from WSDL: http://rclient114.cup.hp.com:80/trimws/trim.asmx?WSDL 19:08:22,424 WARN [org.apache.cxf.phase.PhaseInterceptorChain] Interceptor for {http://www.towersoft.com/schema/webservice/trim2/}Engine#{http://www.towersoft.com/ schema/webservice/trim2/}ListProperties 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) [:2.3.1] at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60) [:2.3.1] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) [:2.3.1] at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755) [:2.3.1] at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2330) [:2.3.1] at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2192) [:2.3.1] at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2036) [:2.3.1] at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) [:2.3.1] at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:696) [:2.3.1] at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) [:2.3.1] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) [:2.3.1] at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516) [:2.3.1] at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) [:2.3.1] at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265) [:2.3.1] at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) [:2.3.1] at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) [:2.3.1] Hope I will get some pointer to look for. Thanks, -Kuntal was (Author: cxfuser71): Hi Christian, In my case I do pass the credential - but still I get the same exception as shown below. I am accessing a remote webservice (i.e. deployed in different m/c). I am using JBoss 6.x which comes with CXF stack (version 2.3.1) - can you pls. suggest where need to look up further? The remote webservice's WSDL isproperly accessible thru browser. For passing the credential I use following code in my WS-client. The sever side implementation (to expose the web service) has been done using .NET - so my question is do I need to keep any "cxf.xml" as part of my ws-client ? If yes, then what should be the ideal place to keep such "cxf.xml" file? My ws-client class is inside a jar and is deployed as part of EAR/lib in Jboss (not part of WAR module). =========================================================== class MyAuthenticator extends Authenticator { @Override public PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(login, password.toCharArray()); } } Authenticator.setDefault(new MyAuthenticator()); ============================================================= 19:08:20,449 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] Creating Service {http://www.towersoft.com/schema/webservice/trim2/}Engine from WSDL: http://rclient114.cup.hp.com:80/trimws/trim.asmx?WSDL 19:08:22,424 WARN [org.apache.cxf.phase.PhaseInterceptorChain] Interceptor for {http://www.towersoft.com/schema/webservice/trim2/}Engine#{http://www.towersoft.com/ schema/webservice/trim2/}ListProperties 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) [:2.3.1] at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60) [:2.3.1] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) [:2.3.1] at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755) [:2.3.1] at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2330) [:2.3.1] at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2192) [:2.3.1] at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2036) [:2.3.1] at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) [:2.3.1] at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:696) [:2.3.1] at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) [:2.3.1] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) [:2.3.1] at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516) [:2.3.1] at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) [:2.3.1] at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265) [:2.3.1] at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) [:2.3.1] at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) [:2.3.1] Hope I will get some pointer to look for. Thanks, - 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.