Marvin JS Web Services is a small, simple web service application embedding Marvin JS and providing tools for transforming, exporting, converting chemical structures. It contains the latest webjar release of Marvin JS.
This documentation describes installation, administration and usage of Marvin JS Web Services.
Windows, Linux, or Mac OS
Java 8 is needed. Beside Oracle JDK, Marvin JS Web Services is also tested against AdoptOpenJDK 8. Note: In the case of AdoptOpenJDK libfontconfig package must be included
Required license: Marvin JS license
Put the Marvin JS license file under <userhome>/chemaxon/licenses/ (on Windows) or <userhome>/.chemaxon/licenses/ (on Linux) folder or apply any of the options listed on the Installing to Servers page.
Configuration file application.properties is available under the installed mjs-webservice/config/ folder.
In application.properties file you can set the followings:
For more settings possibilities see spring documentation page.
default CORS in application.properties
You can find more information here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
You can set a list of values by separating the individual values with a comma.
how to disable cross origin endpoints.cors.allowed-headers=
This setting accepts same-origin requests only.
Enable Cross origin calls from origin1.com and origin2.example.com endpoints.cors.allowed-headers=*
By default, the REST endpoints use plain HTTP as a transport. You can switch to HTTPS easily, by adding a certificate to your configuration in e.g. skipper.yml.
[Tip] You can reference the Yaml file using the following parameter: --spring.config.location=skipper.yml
server: port: 8443 (1) ssl: key-alias: yourKeyAlias (2) key-store: path/to/keystore (3) key-store-password: yourKeyStorePassword (4) key-password: yourKeyPassword (5) trust-store: path/to/trust-store (6) trust-store-password: yourTrustStorePassword (7)
As the default port is 7577, you may choose to change the port to a more common HTTPs-typical port.
The alias (or name) under which the key is stored in the keystore.
The path to the keystore file. Classpath resources may also be specified, by using the classpath prefix: classpath:path/to/keystore
The password of the keystore.
The password of the key.
The path to the truststore file. Classpath resources may also be specified, by using the classpath prefix: classpath:path/to/trust-store
The password of the trust store.
For more details see spring configuration-security.
Start the service application by
run-mjs-webservice.exe (or run-mjs-webservice.sh)
The service application (mjs-webservice.exe or mjs-webservice.sh) can also be set as a service, and started/stopped by the operating system.
For installing as a service in Windows , run
Open Marvin JS on <serverhost>:<port>. Default: localhost:8080
The red labeled icons below on the top toolbar of Marvin JS serve for executing structure transformations.
Click on the WebServices API icon on the right bottom corner of Marvin JS.
The opening Marvin JS Web Services page contains API examples and a link to the API documentation.