WSo2 ESB, v4.8.1 uses an XML DSL as the actual source code for the componenets built by users of the platform, examples of these components are SOAP Proxies and API's. I use either a text editor or Eclipse to edit these source code files, then an Eclipse Maven build to build a car file and deploy the car file to the WSo2 ESB server.
Currently if I make a mistake in my API source code file (which is actually an XML document), this will often not be detected until the car file is deployed onto the WSo2 ESB Server and the deployment fails. That process normally takes a couple of minutes.
If the mistake in my source code causes my XML source code to be non-well formed XML, then Eclipse will show that in the UI, however, my car file build will still progress. I guess I need to add an XML well formed check to the build, to handle that.
However, if the mistake causes my XML source code to be well formed XML, but invalid WSo2 ESB DSL, then this error will not be detected until car file deployment fails.
It should be possible to perform XML XSD validation against the API source code file, to determine if the XML is not valid, well before the car is built and the car is deployed to the server.
My questions:
Is an XML XSD available for the purpose of validating the source code of API's and Proxies, if so, where is it
How can I configure Eclipse to use that XSD for development time validation of my source, in real-time highlighting errors in my code.
Perhaps, I am going about this all wrong and there is another way to improve my build process/chain. Please advise.
For completeness:
- Yes - I could directly edit the xml source on the server via the
Management console, but that has it's own issues:
- it tends to break future deployments via a car file
- inbuilt editor lacks features
- there is some transformation between the native XML source and the source visible in the Management console, e.g HTTP and HTTPS protocols transformed to "1" and "2".
- I do not use the Wso2 Eclipse graphical IDE mode as that has a range of issues making it unworkable, I do use the XML source view within Eclipse.
I tend to develop with a lot of trial and error / iteration and I am trying to reduce my iteration time.
Thanks, Matt.