Anything posted to the servlet is assumed to be xml to be optimized.
All posts will return a token that can be used to get status and result.
After a successful post you will receive something that looks like this:
If something goes wrong the response will contain error msg. Like this.
You may then use the returned token to request status and input/output.
For example http://somehost:8080/optimizer/optservlet?status&token=2014-11-05_13-10-29-745
could give you the following response:
The "token" parameter must always be present. Possible values for the request are:
If the job is running there will be a progress indication, in percent, included in the response. Like this:
The jobs stay on the server for some time before they are removed.
The time they stay before being removed is a configurable value that
may be set in the opt.properties file on the server.
You need to restart the server for any changes to apply.
A new feature (since 1.7) is that you may request a sychronized response.
This is done by adding the querystring sync.
The default timeout for a synchronized request is 600 seconds.
You may control the timeout length by adding timeout=xxx to the querystring.
Where xxx is the number of seconds you want the timeout to be.
You could for example post like this:
You could for example post like this:
curl --data-binary '@est.xml' 'http://localhost:8080/optimizer/optservlet?sync&timeout=60