Test case errors in integration module can cause failures when not using Sun
JVM.
---------------------------------------------------------------------------------
Key: AXIS2-3328
URL: https://issues.apache.org/jira/browse/AXIS2-3328
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Environment: IBM JVM
Reporter: Brian Murray
Priority: Minor
The ComplexDataTypesTest and BaseDataTypesTest test cases fail when using the
IBM JVM. These failures are due to an error in the test cases. The test cases
use assertXMLEqual from XMLUnit to determine whether the generated WSDL's are
equivalent to an expected WSDL file. However, assertXMLEqual does not work
well with WSDL files because it does not support siblings of the same tag name.
For example, the following two WSDL file segments would not be viewed as
equivalent by assertXMLEqual (the Difference reported would be that attribute
value "retUIntRequest" was expected but "retByteArrayRequest" was found).
WSDL File 1:
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns0="http://tempuri.org" targetNamespace="http://tempuri.org">
<wsdl:message name="retUIntRequest">
<wsdl:part name="parameters" element="ns0:retUInt"/>
</wsdl:message>
<wsdl:message name="retByteArrayRequest">
<wsdl:part name="parameters" element="ns0:retByteArray"/>
</wsdl:message>
</wsdl:definitions>
WSDL File 2:
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns0="http://tempuri.org" targetNamespace="http://tempuri.org">
<wsdl:message name="retByteArrayRequest">
<wsdl:part name="parameters" element="ns0:retByteArray"/>
</wsdl:message>
<wsdl:message name="retUIntRequest">
<wsdl:part name="parameters" element="ns0:retUInt"/>
</wsdl:message>
</wsdl:definitions>
The Sun and IBM JVM's generate equivalent but not identical WSDL files for
these test cases. The control (expected value) WSDL file matches that of the
Sun JVM and therefor the test cases pass using the Sun JVM. It would have been
just as easy to create a control WSDL file for which the test cases pass on the
IBM JVM and not on Sun.
There is a second issue with assertXMLEqual wherein the values of attributes
are compared as Strings. assertXMLEqual does not account for namespaced values
being assigned to attributes. For this reason the following two WSDL portions
would not be viewed as equivalent, even though the ns0 and ax23 namespaces are
defined with the same URI.
WSDL tag 1:
<xs:element minOccurs="0" name="numbers" nillable="true"
type="ns0:ArrayOfshort"/>
WSDL tag 2:
<xs:element minOccurs="0" name="numbers" nillable="true"
type="ax23:ArrayOfshort"/>
I will provide a patch to get around these issues with assertXMLEqual.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]