SYNTAX
====================

	java [-Djavax.net.ssl.trustStore=<truststore> -Djavax.net.ssl.trustStorePassword=<password>] -jar medraClient.jar ( (-u | -cu | -r | -q ) <file> | -v <doi> ) [-transform <label>] [-validate]
	[-url <WS-URL>] [-username <name> -password <word>] [-debug] [-crossref] [-amode (01|02)]
	[-lang (ita|ger|eng)]
	
mEDRA
---------------------

###DOI submission in mEDRA
	java -jar medraClient.jar -u <onix-metadata-2.0.xml>
	java -jar medraClient.jar -u <jats-metadata-1.0.xml> -transform JATS

###DOI citation submission in mEDRA
	java -jar medraClient.jar -cu <citations.xml>

###View metadata in mEDRA
	java -jar medraClient.jar -v 10.1390/gdl0508_Guadalajara

CrossRef
---------------------

###DOI submission both in mEDRA and CrossRef
	java -jar medraClient.jar -u <onix-metadata-2.0.xml> -crossref
	java -jar medraClient.jar -u <jats-metadata-1.0.xml> -transform JATS -crossref

###DOI citation submission both in mEDRA and CrossRef
	java -jar medraClient.jar -cu <citations.xml> -crossref

###Query submission in CrossRef
	java -jar medraClient.jar -q <query.xml> -debug -crossref -amode 01 -lang ita
	
TRUST-STORE
====================
The client uses the default jvm truststore to check if the SSL certificate is trusted.
If you get an SSL exception, please check if the root of the certification chain is in the default jvm trustore. To do that, you can launch the command with the option -Djavax.net.debug=all
For example

	java -Djavax.net.debug=all -jar medraClient.jar -u <onix-metadata-2.0.xml>

If you cannot add the root of the certification chain to the default truststore, you can always create a local truststore and add the root of the certification chain to it using the following command:

	keytool -import -file <rootcertificate.crt> -alias <alias> -keystore cacerts -storepass changeit
	
Then you can launch the client adding the following system properties:
-Djavax.net.ssl.trustStore=cacerts -Djavax.net.ssl.trustStorePassword=changeit
For example
	
	java -Djavax.net.ssl.trustStore=cacerts -Djavax.net.ssl.trustStorePassword=changeit -jar medraClient.jar -u <onix-metadata-2.0.xml>

