axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Murray (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AXIS2-3328) Test case errors in integration module can cause failures when not using Sun JVM.
Date Wed, 07 Nov 2007 21:27:50 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-3328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Brian Murray updated AXIS2-3328:
--------------------------------

    Attachment: 3328.patch

The following changes are included in the patch:

*  Use Diff.similar() instead of assertXMLEqual so that we may provide a custom DifferenceEngine
and ElementQualifier.
*  In the custom DifferenceEngine, overwrite the compareAttribute method so that namespaced
attribute values are accounted for.  
*  In the custom ElementQualifier, require that two elements have the same "name" attribute
before comparing them.

> 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
>          Components: modules
>         Environment: IBM JVM
>            Reporter: Brian Murray
>            Priority: Minor
>         Attachments: 3328.patch
>
>
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message