membrane / soa-model

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

Compare non-backward compatible Differences #251

Closed davidkuehner closed 8 years ago

davidkuehner commented 8 years ago

Feature: Get the list of non-backward compatible Differences between two wsdl files.

Same as WsdlDiffGenerator:compare without the following backward compatible Differences :

Definitions wsdl1 = parser.parse("resources/diff/1/article.wsdl");
Definitions wsdl2 = parser.parse("resources/diff/2/article.wsdl");
WsdlBackwardCompatibilityGenerator backCompatGen = new WsdlBackwardCompatibilityGenerator(wsdl1, wsdl2);
List<Difference> lst = backCompatGen.compare();

Links:

predic8 commented 8 years ago

Thanks for the list. We build our own understanding of backward compatibility into SOA model e.g. adding an optional Schema element often breaks the interface. If a party is receiving the new element that does not understand it, it will raise an error. Unfortunately there only few tools that ignore optional elements. So you have to consider the direction. We build that into our tool. Have a look at:

https://www.wsdl-analyzer.com/diff/show/2023352896?version=1&modifiedVersion=2

to see it in action. You can reverse the direction of the compare and see that you get different results. Much better would be, if you can specify what tools you are using and the lib considers this. But this are Web Services that are made for interoperability. So if there are some tools that break then the interface breaks.

davidkuehner commented 8 years ago

Ok thanks for the info. Is the Difference.breaks() your backward compatibility flag?

predic8 commented 8 years ago

yes

davidkuehner commented 8 years ago

Nice. And what means null ? Cannot be defined?

predic8 commented 8 years ago

I think so in the meaning of null. You can not tell. But I have not look in the code for a long time.