Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 74189 invoked from network); 20 Nov 2008 19:01:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Nov 2008 19:01:12 -0000 Received: (qmail 85562 invoked by uid 500); 20 Nov 2008 19:01:14 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 85521 invoked by uid 500); 20 Nov 2008 19:01:14 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 85510 invoked by uid 99); 20 Nov 2008 19:01:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2008 11:01:14 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2008 18:59:49 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1L3ElV-0003Yh-Rj for axis-user@ws.apache.org; Thu, 20 Nov 2008 11:00:33 -0800 Message-ID: <20607870.post@talk.nabble.com> Date: Thu, 20 Nov 2008 11:00:33 -0800 (PST) From: "Marc F." To: axis-user@ws.apache.org Subject: Problem related to ADB when transferring a byte array MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: marc.musico@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org To demonstrate a possible bug in ADB Webservice I attached a zip file, containing two aar files, and the source code as well. There is a very simple service in those two aar files. Actually, this service does the same thing in both aar files, but one is XML Beans version, and the other is ADB version. Basically the service consists on the following steps: 1)In the client side: 1.1)Build a XML content, according to a defined XML Schema. 1.2)Encript this XML content, using symmetric criptography, with AES (Advanced Encryption Standard) and 128 bits key. 1.3)Send this encrypted XML content to the webservice. 1.4)Receive the result of the webservice call, which is another encrypted XML content. 1.5)Decrypt the received encrypted XML content. 1.6)Validate the XML content against a defined XML schema. 2)In the server side (webservice side): 2.1)Receive the encrypted XML content sent by the client. 2.2)Decrypt the encrypted XML content. 2.3)Validate the XML content against a defined XML schema. 2.4)Extract a certain string from the XML content. 2.5)Build another XML content, adding the extracted string. 2.6)Encrypt the XML content. 2.7)Sent the encrypted XML content back to the client. There are two classes that represent the client code: com.bug.axis2.test.XMLBeansTestClass and com.bug.axis2.test.ADBTestClass. The problem happens when the ADB version of the webservice is called. Just run ADBTestClass in order to reproduce it. The problem is related to the length of the byte array that is being transferred. Sometimes the webservice receives a byte array with less elements than the expected. Sometimes the client receives a byte array with less elements than the expected. But there are times in which eveything works correctly. Please, have a look at the source code of the com.bug.axis2.helpers.UtilClass, in the generateRequestXML() method. Read the comments I let in this method, and comment/uncomment the lines in order to reproduce those situations. In XML Beans version of the webservice the problem never happens. The source codes were compiled with Java 5, and the test was done using Tomcat 5.5.26. But the problem is not related to the environment, neither to the Java version. The problem is a possible bug in ADB. Thank you, and sorry my poor English. http://www.nabble.com/file/p20607870/Axis2BugADB.zip Axis2BugADB.zip -- View this message in context: http://www.nabble.com/Problem-related-to-ADB-when-transferring-a-byte-array-tp20607870p20607870.html Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org