There is no surprise for those who work with web-services a lot that they get updated from time to time. And you always need to track changes of these updates.
In my par
The raised question is actually very common for any system that is built on top of SOA. You typically have a few consumers for a WSDL, or a few services that use the same WSDL, and now that WSDL needs to be updated.
And no, neither diff for WSDL nor diff for generated XML can reliably help.
In addition to schema changes, WSDL can change the way the payload is structured (body/header), encoding/qualification, SOAP Action, binding properties - any of which can cause the loss of interoperability.
To make things even more tricky, some types of changes made in input break the "updated to old" scenario, while in the output they should be considered non-breaking. For instance, a new optional element in request would break the old service if passed, but the same element in response will not be generated by the old service (because it doesn't know about it), and the element lack will be tolerated by the updated client because the element is optional.
My team faces these tasks roughty once a week. Up until recently we did a manual diff of the WSDL/schema files and tried to figure out the impact. Sometimes it is obvious, but sometimes our approach led to mistakes. We needed a better way.
Membrane SOA was some help. Unfortunately, in some occasions it fails to detect the changes in schema, erroneously reporting an operation as not impacted, while in fact it is broken. It is also not immediately clear from the output what scenario ("old to updated" or "updated to old") is reported.
So after a couple of years of pain I had to write my own code that answers the questions above in a way I can directly provide to our BAs/PMs as supporting documentation for the impact assessment.
See here: https://wsdldiff.mockmotor.com/
That is not to say that one should blindly rely on tools such as this one, but it saves a lot of time when doing the impact assessment.
This may only be a partial solution but you could analyse the old and new WSDL in SOAPui.
You should be able to tell from the generated methods and example requests what has changed whether it be types or methods.
hope that is some help
http://membrane-soa.org has a Java API for comparing WSDL in their SOA Model.
package sample.wsdl;
import java.util.List;
import com.predic8.wsdl.*;
import com.predic8.wsdl.diff.WsdlDiffGenerator;
import com.predic8.soamodel.Difference;
public class CompareWSDL {
public static void main(String[] args) {
compare();
}
private static void compare(){
WSDLParser parser = new WSDLParser();
Definitions wsdl1 = parser.parse("resources/diff/1/article.wsdl");
Definitions wsdl2 = parser.parse("resources/diff/2/article.wsdl");
WsdlDiffGenerator diffGen = new WsdlDiffGenerator(wsdl1, wsdl2);
List<Difference> lst = diffGen.compare();
for (Difference diff : lst) {
dumpDiff(diff, "");
}
}
private static void dumpDiff(Difference diff, String level) {
System.out.println(level + diff.getDescription());
for (Difference localDiff : diff.getDiffs()){
dumpDiff(localDiff, level + " ");
}
}
}
After executing you get the output shown in listing 2. It is a List of differences between the two WSDL documents.
Port ArticleServicePTPort removed.
Port ArticleServicePTPort2 added.
Operation create removed.
Operation create2 added.
Schema http://predic8.com/wsdl/material/ArticleService/1/ has changed:
Element createResponse has changed:
ComplexType has changed:
Sequence has changed:
Element NewElementForTest added.
For an example of the output from the tool, http://www.service-repository.com/ offers an online WSDL Comparator tool that returns a report of the differences between two WSDL. The report is not a simple XML diff.