Return-Path: Delivered-To: apmail-openejb-commits-archive@www.apache.org Received: (qmail 74447 invoked from network); 2 Jul 2008 19:18:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jul 2008 19:18:13 -0000 Received: (qmail 9107 invoked by uid 500); 2 Jul 2008 19:18:14 -0000 Delivered-To: apmail-openejb-commits-archive@openejb.apache.org Received: (qmail 9090 invoked by uid 500); 2 Jul 2008 19:18:14 -0000 Mailing-List: contact commits-help@openejb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openejb.apache.org Delivered-To: mailing list commits@openejb.apache.org Received: (qmail 9081 invoked by uid 99); 2 Jul 2008 19:18:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jul 2008 12:18:14 -0700 X-ASF-Spam-Status: No, hits=-1997.6 required=10.0 tests=ALL_TRUSTED,NORMAL_HTTP_TO_IP,URIBL_RHS_DOB,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jul 2008 19:17:24 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 45C57234C14D for ; Wed, 2 Jul 2008 12:17:45 -0700 (PDT) Message-ID: <1267745095.1215026265284.JavaMail.jira@brutus> Date: Wed, 2 Jul 2008 12:17:45 -0700 (PDT) From: "karan singh malhi (JIRA)" To: commits@openejb.apache.org Subject: [jira] Commented: (OPENEJB-843) CalculatorTest fails In-Reply-To: <508751704.1215009705398.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENEJB-843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610015#action_12610015 ] karan singh malhi commented on OPENEJB-843: ------------------------------------------- Looks like an issue with the Transfer-Encoding:chunked header which is the default for CXF. Tried to look into OpenEJBHttpServer and HttpRequestImpl (thats where we handle "chunked"). Could not find the issue because we are handling "chunked" the way RFC-2616 requires an HttpServer to handle it. http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.6.1 Anyways, right now an interim fix for the test could be that we could set the HttpClientPolicy in CXF to disable "chunked" as follows:- ------------------------------------------------------------------------------------------------------------------------------------------------------------------ Service calcService = Service.create(new URL("http://127.0.0.1:4204/CalculatorImpl?wsdl"), null); assertNotNull(calcService); CalculatorWs calc = calcService.getPort(CalculatorWs.class); org.apache.cxf.endpoint.Client client = org.apache.cxf.frontend.ClientProxy.getClient(calc); // Getting HTTPConduit to set client policy HTTPConduit http = (HTTPConduit) client.getConduit(); HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); // Disallow chunking -- OTHERWISE THE TEST FAILS httpClientPolicy.setAllowChunking(false); http.setClient(httpClientPolicy); assertEquals(10, calc.sum(4,6)); assertEquals(12, calc.multiply(3,4)); ------------------------------------------------------------------------------------------------------------------------------------------------------------------ However, the above is not a permanent fix because then the onus is upon the client to always make sure chunking is disabled. For large messages, that would not be a very performant option and chunking would be the optimal solution for large messages. I have tried to debug it with whatever time I had, if anybody has time to look into it and fix it, that would be great! > CalculatorTest fails > -------------------- > > Key: OPENEJB-843 > URL: https://issues.apache.org/jira/browse/OPENEJB-843 > Project: OpenEJB > Issue Type: Bug > Components: examples > Affects Versions: 3.0.1 > Environment: Ubuntu Linux , sun java 1.5 > Reporter: karan singh malhi > Assignee: karan singh malhi > Fix For: 3.0.1 > > > ------------------------------------------------------------------------------- > Test set: org.superbiz.calculator.CalculatorTest > ------------------------------------------------------------------------------- > Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 63.109 sec <<< FAILURE! > testCalculatorViaWsInterface(org.superbiz.calculator.CalculatorTest) Time elapsed: 63.073 sec <<< ERROR! > javax.xml.ws.soap.SOAPFaultException: Could not send Message. > at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175) > at $Proxy17.multiply(Unknown Source) > at org.superbiz.calculator.CalculatorTest.testCalculatorViaWsInterface(CalculatorTest.java:76) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at junit.framework.TestCase.runTest(TestCase.java:164) > at junit.framework.TestCase.runBare(TestCase.java:130) > at junit.framework.TestResult$1.protect(TestResult.java:110) > at junit.framework.TestResult.runProtected(TestResult.java:128) > at junit.framework.TestResult.run(TestResult.java:113) > at junit.framework.TestCase.run(TestCase.java:120) > at junit.framework.TestSuite.runTest(TestSuite.java:228) > at junit.framework.TestSuite.run(TestSuite.java:223) > at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35) > at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) > at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) > at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) > at org.apache.maven.surefire.Surefire.run(Surefire.java:177) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) > at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) > Caused by: org.apache.cxf.interceptor.Fault: Could not send Message. > at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64) > at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222) > at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) > at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) > ... 25 more > Caused by: java.net.SocketTimeoutException: Read timed out > at java.net.SocketInputStream.socketRead0(Native Method) > at java.net.SocketInputStream.read(SocketInputStream.java:129) > at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:256) > at java.io.BufferedInputStream.read(BufferedInputStream.java:313) > at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:681) > at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:626) > at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:646) > at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:957) > at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367) > at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1863) > at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791) > at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) > at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575) > at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) > ... 30 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.