Saturday, August 5, 2023

File System (XML) to DB (MySQL)

 This example shows how to validate XML data with XML schema and send the data to MySQL.

1. Create XML Schema (document) by using client provided Schema, which will be used for validation later.

2. Get the file from File System by using getFile (wMPublic) service

3. Validate the XML by using validate service. Where isValid is very important..if it's true means XML data has been validated successfully means positive path. Else, XML is wrong...which goes to negative path

4. For processing Converted data to DB, call subservice. Which makes our life easy.

5. Use Try/Catch strategy everywhere.




Finally, data has been inserted successfully..





GitHub: Source Code



Thanks for reading..

No comments:

Post a Comment

How to debug a Java Service.?

Please read my previous blog on Java Service Implementation to understand basics. After you have implemented Java Service successfully and e...