Marc F. wrote: > > 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 another 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. When the byte array has the wrong quantity of elements the > following exception is thrown, in the moment of decryption: > > javax.crypto.IllegalBlockSizeException: Input length must be multiple of > 16 when decrypting with padded cipher > > 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. > > The Axis2 version is 1.4.1. > > The zip file contains two directories in its root: "testbug" and > "WEB-INF". To install this content in the axis2 web application just > extract the content of the zip file in the root directory of the axis2 web > application. After finishing this, the "testbug" directory should be in > the root directory of the axis2 web application, or in other words, the > "testbug" directory should be in the same level of WEB-INF directory. > Obviously, the content of "WEB-INF" in the zip file should be put inside > the WEB-INF directory of the axis2 web application. Please notice that it > is assumed that the context root of the axis2 web application is > "Axis2BugADB", but you can change it if you want. You would just have to > recompile two source codes, com.bug.axis2.test.ADBTestClass and > com.bug.axis2.test.XMLBeansTestClass and rebuild the aar files, editing > the wsdl file and those two java source codes with the new context root > defined by you. > > Please tell me if the impression I am having indicates a real bug or not, > when you have time to run the webservices in the zip file. If this is not > a bug, please, tell me how to solve the problem. > > Thank you, and sorry my poor English. > > http://www.nabble.com/file/p20607870/Axis2BugADB.zip Axis2BugADB.zip >
Hi, please, if you discovered something, notify me. Thanks! -- View this message in context: http://www.nabble.com/Problem-related-to-ADB-when-transferring-a-byte-array-tp20607870p20784153.html Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
