Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WSDL generating repeatable build

I have been asked to look at the build process of an existing service based application. It has several service based modules in which some of the services are provided by a 3rd party. The wsdls used in the build process are brought down and into the build via http. For competeness, I am using maven 3 and axistools-maven-plugin to generate the classes from the wsdl.

This started me thinking. If the remote server is down my build will fail. If the wsdl changes my build may also fail. Do I want this? The remote wsdls are versioned in the service/wsdl name, so no major changes should be made to the APIs, but they are 3rd party and I cant really rely on this convention.

Would it not be better to download the wsdl locally and build against a file that is under source control? I would have a proper repeatable build then with no danger of the remote server being unavailable. This doesnt seem very agile though. If I adopt this approach, how do I then become aware of any changes in the remote wsdl?

I'm sure I'm not the first person to wonder the best practice on building from wsdls. Can anybody highlight what mechanism is deemed the best pratice way to produce a repaeatable build from services generated from remote wsdls?

like image 998
theINtoy Avatar asked Oct 05 '22 16:10

theINtoy


1 Answers

If you want fast and reliable builds then the golden rule is not to rely on anything you don't control!

In your case I would be caching the WSDL locally so that the build does not fail if the original source is unavailable or changes. However, if you are at all concerned that the WSDL might change, then I would also be creating a separate build job that runs each day and compares the cached copy with the original, failing if they are different. That gives you the best of both worlds... repeatable builds and early warning if the WSDL changes.

Where/how you cache the WSDL is entirely up to you, but sticking it in version control is a quick and simple option.

like image 159
Craig Aspinall Avatar answered Oct 10 '22 02:10

Craig Aspinall