How To Use Openlegacy File (Meili) Connector

Step By Step Guide.

  1. Create a new SDK project and select File Connector as a backend and click Next.

     

  2. Specify the Base Path to which folder we want to save a file, and specify File Name Pattern, you can decide whether or not produce a file, and click Finish.

  3. Right-Click on XSD file OpenLegacy -> Generate Model XSD.

     

  4. Give your model a name, mark Generate JUnit Test, and click OK.

     

  5. Test the file connector:
    Right Click on generated JUnit test and click Run AsJUnit Test.

     

  6. After the JUnit test complete, go to the path we set in step 2 and you should see a generated XML file, open the file and validate that attribute has been added to the root level element.



 

Instead of saving the file, you can get a byte[] by following the next simple steps:

  1. Go to application.yml

  2. Set the property save-file to false save-file: false.

  3. Run the test/ API again.

  4. At the console log response, you'll receive a field name content with the file’s byte[] value.


    Note: whether you producing the file or not you will receive the byte[] in the response.