Skip to content

hsharma86/ern-validator-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DDEX XML Validator

The DDEX Message Validator is an API that provides methods to validate DDEX XML based messages against the set of active schema versions and profile schematrons.

Development Requirements

  • Windows, Linux or MacOS
  • Maven
  • JDK 1.8+

Building

To build the source execute the following maven targets:

mvn clean install

After execution a file with the name ddex-message-validator-api-1.0-SNAPSHOT-bin.zip will appear in 'target/' directory. Unzip the file and and you will see three folders bin, etc, repo. Within the bin folder you will also see start-api.sh and start-api.bat. In your command line you can start the API by typing the following below.

start-api <port>

If a port is not specified the default port is 6060. The default profile has been set to "dev", this can be changed by setting spring.profiles.active environment variable.

In cases where you are using IntelliJ or Eclipse you can also run it from within your IDE locally.

Try the below URL in your browser to see if the service is running.

localhost:6060/api/status

Working with the code

If you don't have a personal IDE preference we recommend you use IntelliJ when working with the code. We use the maven assembly and appassembly plugin for wrapper script packaging support.

Technologies

  • Java
  • Spring
  • Embedded Jetty
  • SAX
  • Logback

The API uses Spring-WebMVC framework which provides a Model-View-Controller architecture. Having a MVC structure in our application allows for the input logic, business logic, and UI logic to be seperated but still have the flexible ability to loosely couple these elements together.

As an alternative to creating a stand-alone bundled WAR app we have incorporated Embedded Jetty as our application instantiator. By doing this you're able to instantiate Jetty within your Java program.

Ways to use API

  • Curl
  • DDEX XML Validator React Client

You can use cURL command line tool to use the API to validate your XML documents.

Schema (XSD) example

curl -X POST -F 'messageSchemaVersionId=ern/341' -F 'messageFile=@location\xml\sme-album.xml' -F 'releaseProfileVersionId=commonreleasetypes/14/AudioAlbumMusicOnly' localhost:6060/api/json/validate

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • XSLT 99.6%
  • Java 0.4%