membrane / soa-model

Toolkit and Java API for WSDL, WADL and XML Schema.
http://www.membrane-soa.org/soa-model/
Apache License 2.0
94 stars 73 forks source link

Wrong results when comparing nested WSDLs #245

Open apechinsky opened 8 years ago

apechinsky commented 8 years ago

See description and test cases in pull request https://github.com/membrane/soa-model/pull/244

apechinsky commented 8 years ago

Provided test WSDL has several imports with the same namespace. Namespaces should be unique.

Some parsers allows such declarations but others not. E.g. xmllint issues validation error:

Element '{http://www.w3.org/2001/XMLSchema}import': Skipping import of schema located at 'City.xsd' for the namespace 'http://TestEngineLib', since this namespace was already imported with 

The purpose of import is to declare namespace. schemaLocation is just a hint which may be omitted. So DiffGenerator works as expected.

So second testcase (Test.wsdl) may be removed while first testcase (TestParent.wsdl) still make sense. DiffGenerator doesn't compare WSDL imports.

P.S. To include schemas with the same namespace 'include' tag should be used.