You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Marc F." <ma...@gmail.com> on 2008/12/02 02:11:11 UTC

Re: Problem related to ADB when transferring a byte array


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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Problem related to ADB when transferring a byte array [== AXIS2-3538]

Posted by "Marc F." <ma...@gmail.com>.

Andrea Spinelli-2 wrote:
> 
> Alas, I think this is a well-known issue:
> 
>   https://issues.apache.org/jira/browse/AXIS2-3538
> 
> I had an exchange of e-mails with Deepal, but it ended in nothing.
> 
> The issue was submitted on 24/Feb/08 09:13 AM and a suggestion for a 
> patch is available from June 2008, but it is currently unassigned. It is 
> marked as "critical".
> 
> In our organisation we wrote a patch, recompiled axis2, and we are using 
> the patch (with success).  I can send the patch to anyone interested, 
> but I think this is a REALLY BAD problem and should be fixed as soon as 
> possible by the axis2 development team.
> 
> Is anyone in the axis2 team listening?
> 
> Hi
>    Andrea
> 
> -- 
> dott. Andrea Spinelli - IMTeam
> e-mail: andrea dot spinelli at imteam dot it
> phone: +39-035-636029
> fax: +39-035-638129
> www: http://www.imteam.it/
> IANA enterprise number: 1.3.6.1.4.1.30916
> 

Thank you very much for your reply, Andrea. Yes, this is a really bad
problem that should be fixed, mainly because this kind of problem is not
like a "common bug", or a "little mistake". It is a kind of bug that can
make something completely unreliable. I do not rely on ADB, and I will never
use it until they fix the problem. And I will recommend everybody to not use
ADB as well. I simply do not rely on ADB anymore. That´s sad.

Fortunately, using a XML Beans webservice this problem doesn´t happen. Well,
at least until now this didn´t happen to me.
-- 
View this message in context: http://www.nabble.com/Problem-related-to-ADB-when-transferring-a-byte-array-tp20607870p20801565.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


Re: Problem related to ADB when transferring a byte array [== AXIS2-3538]

Posted by Sv...@gebit.de.
The attached patch is sub-optimal. In AXIS2-3765 (wasn't aware that it is 
the same bug when i created the issue since we only have one byte[])  i 
proposed a patch which does not need the extra loop.
Nevertheless it works both ways..

I also patched it locally and we are going live with this patch, even 
though i am not really happy about this.






"Afkham Azeez" <af...@gmail.com> 
03.12.2008 01:27
Bitte antworten an
axis-user@ws.apache.org


An
axis-user@ws.apache.org
Kopie

Thema
Re: Problem related to ADB when transferring a byte array [== AXIS2-3538]






Have you submitted this patch? Is this the same patch that is attached to 
JIRA issue AXIS2-3538? 

Thanks
Azeez

On Tue, Dec 2, 2008 at 2:07 PM, Andrea Spinelli <andrea.spinelli@imteam.it
> wrote:

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.

 

Alas, I think this is a well-known issue:

 https://issues.apache.org/jira/browse/AXIS2-3538

I had an exchange of e-mails with Deepal, but it ended in nothing.

The issue was submitted on 24/Feb/08 09:13 AM and a suggestion for a patch 
is available from June 2008, but it is currently unassigned. It is marked 
as "critical".

In our organisation we wrote a patch, recompiled axis2, and we are using 
the patch (with success).  I can send the patch to anyone interested, but 
I think this is a REALLY BAD problem and should be fixed as soon as 
possible by the axis2 development team.

Is anyone in the axis2 team listening?

Hi
 Andrea

-- 
dott. Andrea Spinelli - IMTeam
e-mail: andrea dot spinelli at imteam dot it
phone: +39-035-636029
fax: +39-035-638129
www: http://www.imteam.it/
IANA enterprise number: 1.3.6.1.4.1.30916


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org




-- 
Thanks
Afkham Azeez

Blog: http://afkham.org
Developer Portal: http://www.wso2.org
WSAS Blog: http://wso2wsas.blogspot.com
Company: http://wso2.com
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760

Re: Problem related to ADB when transferring a byte array [== AXIS2-3538]

Posted by Afkham Azeez <af...@gmail.com>.
Have you submitted this patch? Is this the same patch that is attached to
JIRA issue AXIS2-3538?

Thanks
Azeez

On Tue, Dec 2, 2008 at 2:07 PM, Andrea Spinelli
<an...@imteam.it>wrote:

>
>  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.
>>>
>>>
>>>
>>
> Alas, I think this is a well-known issue:
>
>  https://issues.apache.org/jira/browse/AXIS2-3538
>
> I had an exchange of e-mails with Deepal, but it ended in nothing.
>
> The issue was submitted on 24/Feb/08 09:13 AM and a suggestion for a patch
> is available from June 2008, but it is currently unassigned. It is marked as
> "critical".
>
> In our organisation we wrote a patch, recompiled axis2, and we are using
> the patch (with success).  I can send the patch to anyone interested, but I
> think this is a REALLY BAD problem and should be fixed as soon as possible
> by the axis2 development team.
>
> Is anyone in the axis2 team listening?
>
> Hi
>  Andrea
>
> --
> dott. Andrea Spinelli - IMTeam
> e-mail: andrea dot spinelli at imteam dot it
> phone: +39-035-636029
> fax: +39-035-638129
> www: http://www.imteam.it/
> IANA enterprise number: 1.3.6.1.4.1.30916
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Thanks
Afkham Azeez

Blog: http://afkham.org
Developer Portal: http://www.wso2.org
WSAS Blog: http://wso2wsas.blogspot.com
Company: http://wso2.com
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760

Re: Problem related to ADB when transferring a byte array [== AXIS2-3538]

Posted by Andrea Spinelli <an...@imteam.it>.
> 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.
>>
>>     

Alas, I think this is a well-known issue:

  https://issues.apache.org/jira/browse/AXIS2-3538

I had an exchange of e-mails with Deepal, but it ended in nothing.

The issue was submitted on 24/Feb/08 09:13 AM and a suggestion for a 
patch is available from June 2008, but it is currently unassigned. It is 
marked as "critical".

In our organisation we wrote a patch, recompiled axis2, and we are using 
the patch (with success).  I can send the patch to anyone interested, 
but I think this is a REALLY BAD problem and should be fixed as soon as 
possible by the axis2 development team.

Is anyone in the axis2 team listening?

Hi
   Andrea

-- 
dott. Andrea Spinelli - IMTeam
e-mail: andrea dot spinelli at imteam dot it
phone: +39-035-636029
fax: +39-035-638129
www: http://www.imteam.it/
IANA enterprise number: 1.3.6.1.4.1.30916


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org