Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.12
-
None
Description
Current Situation
- When the user call the API /api/jobscheduler/commands using curl command line tool, the response is malformed. The closing XML tags are missing.
- Request :
Request : http://localhost:4446/joc/api/jobscheduler/commands
- Parameters :
<?xml version="1.0" encoding="UTF-8"?> <jobscheduler_commands jobschedulerId="jobscheduler12_4412"> <show_order job_chain="/sos/dailyplan/CreateDailyPlan" order="createDailyPlan" what="payload,log" /> </jobscheduler_commands>
- Response from REST Client
<?xml version="1.0" encoding="ISO-8859-1"?> <spooler> <answer time="2018-10-29T08:27:19.605Z"> <order created="2018-10-29T07:23:28.505Z" history_id="614" id="createDailyPlan" in_process_since="2018-10-29T08:27:18.343Z" initial_state="Create" job="/sos/dailyplan/CreateDailyPlan" job_chain="/sos/dailyplan/CreateDailyPlan" log_file="C:/ProgramData/sos-berlin.com/jobscheduler/jobscheduler12_4412/logs/order.sos,dailyplan,CreateDailyPlan.createDailyPlan.log" name="CreateDailyPlan,createDailyPlan" order="createDailyPlan" order_source_type="Permanent" path="/sos/dailyplan/CreateDailyPlan,createDailyPlan" priority="0" start_time="2018-10-29T08:27:17.280Z" state="Create" task="3430" touched="yes"> <file_based file="C:/ProgramData/sos-berlin.com/jobscheduler/jobscheduler12_4412/config/live/sos/dailyplan/CreateDailyPlan,createDailyPlan.order.xml" last_write_time="2018-10-23T15:43:18.000Z" state="active"> <requisites> <requisite path="/sos/dailyplan/createdailyplan" type="Job_chain"/> </requisites> </file_based> <payload> <params count="2"> <param name="day_offset" value="31"/> <param name="SCHEDULER_JOC_USER_ACCOUNT" value="root"/> </params> </payload> <log highest_level="info" last_info="
Order createDailyPlan - Protocol starts in C:/ProgramData/sos-berlin.com/jobscheduler/jobscheduler12_4412/logs/order.sos,dailyplan,CreateDailyPlan.createDailyPlan.log" level="info" mail_from="jobscheduler-sosmp@sos-berlin.com" mail_on_error="yes" mail_on_warning="yes" mail_to="mp@sos-berlin.com" smtp="localhost">2018-10-29 09:27:17.282+0100 [info] 2018-10-29 09:27:17.282+0100 [info] Order createDailyPlan - Protocol starts in C:/ProgramData/sos-berlin.com/jobscheduler/jobscheduler12_4412/logs/order.sos,dailyplan,CreateDailyPlan.createDailyPlan.log 2018-10-29 08:23:28.505+0100 [info] SCHEDULER-891 Configuration file 'C:/ProgramData/sos-berlin.com/jobscheduler/jobscheduler12_4412/config/live/sos/dailyplan/CreateDailyPlan,createDailyPlan.order.xml' (2018-10-23 17:43:18.000+0200) is going to be be loaded into this new Standing_order 2018-10-29 08:23:32.927+0100 [info] SCHEDULER-938 Order will be processed at 2018-10-29 23:01:00.000Z 2018-10-29 08:23:32.927+0100 [info] SCHEDULER-893 Standing_order is 'active' now 2018-10-29 09:27:17.287+0100 [info] (Task sos/dailyplan/CreateDailyPlan:3430) SCHEDULER-842 Task is going to process Order sos/dailyplan/CreateDailyPlan:createDailyPlan, state=Create, on JobScheduler 'http://EC2AMAZ-D2SBRU6:44412', Order's Process_class 2018-10-29 09:27:17.289+0100 [info] (Task sos/dailyplan/CreateDailyPlan:3430) 2018-10-29 09:27:17.289+0100 [info] (Task sos/dailyplan/CreateDailyPlan:3430) Task sos/dailyplan/CreateDailyPlan:3430 - Protocol starts in C:/ProgramData/sos-berlin.com/jobscheduler/jobscheduler12_4412/logs/task.sos,dailyplan,CreateDailyPlan.log 2018-10-29 09:27:17.296+0100 [info] (Task sos/dailyplan/CreateDailyPlan:3430) SCHEDULER-726 Task runs on this JobScheduler 'http://xxx:44412' 2018-10-29 09:27:17.296+0100 [info] (Task sos/dailyplan/CreateDailyPlan:3430) SCHEDULER-918 state=starting (at=never) 2018-10-29 09:27:19.558+0100 [info] (Task sos/dailyplan/CreateDailyPlan:3430) [stdout] 29 09:27:18.371 [INFO ] (JobSchedulerJobAdapter.java:82) - 1.12.7 (2018-10-23 15:17, revision e6e8fada927c7f1068361897468fa5cc29b58661) Copyright 2003-2018 SOS GmbH Berlin </log> </order> </answer> </spooler>
- Response from CURL
MacBook-Pro-2:jobscheduler Mahen$ curl -X POST http://localhost:4446/joc/api/jobscheduler/commands -H 'Content-Type: application/xml' -H 'X-Access-Token: bbe4d8b8-e0d6-4929-98fe-2843bc8b1b3f' -H 'cache-control: no-cache' -d '<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <jobscheduler_commands jobschedulerId="jobscheduler12_4412"> <show_order job_chain="/sos/dailyplan/CreateDailyPlan" order="createDailyPlan" what="payload,log"/> </jobscheduler_commands>' <?xml version="1.0" encoding="ISO-8859-1"?><spooler><answer time="2018-10-29T08:30:09.280Z"><order at="2018-10-29T23:01:00.000Z" created="2018-10-29T07:23:28.505Z" id="createDailyPlan" initial_state="Create" job="/sos/dailyplan/CreateDailyPlan" job_chain="/sos/dailyplan/CreateDailyPlan" log_file="C:/ProgramData/sos-berlin.com/jobscheduler/jobscheduler12_4412/logs/order.sos,dailyplan,CreateDailyPlan.createDailyPlan.log" name="CreateDailyPlan,createDailyPlan" next_start_time="2018-10-29T23:01:00.000Z" order="createDailyPlan" order_source_type="Permanent" path="/sos/dailyplan/CreateDailyPlan,createDailyPlan" priority="0" state="Create"><file_based file="C:/ProgramData/sos-berlin.com/jobscheduler/jobscheduler12_4412/config/live/sos/dailyplan/CreateDailyPlan,createDailyPlan.order.xml" last_write_time="2018-10-23T15:43:18.000Z" state="active"><requisites><requisite path="/sos/dailyplan/createdailyplan" type="Job_chain"/></requisites></file_based><payload><params count="1"><param name="day_offset" value="31"/></params></payload><log highest_level="info" last_info="
Order createDailyPlan - Protocol starts in C:/ProgramData/sos-berlin.com/jobscheduler/jobscheduler12_4412/logs/order.sos,dailyplan,CreateDailyPlan.createDailyPlan.log" level="info" mail_from="jobscheduler-sosmp@sos-berlin.com" mail_on_error="yes" mail_on_warning="yes" mail_to="test@sos-berlin.com" smtp="localhost">2018-10-29MacBook-Pro-2:jobscheduler Mahen$ ] set_state Create, Job /sos/dailyplan/CreateDailyPlanmData/sos-berlin.com/jobscheduler/jobscheduler12_4412/logs/order.sos,dailyplan,CreateDailyPlan.createDailyPlan.log MacBook-Pro-2:jobscheduler Mahen$ MacBook-Pro-2:jobscheduler Mahen$
Desired Behavior
- The response from the API when called from CURL should have well formed XML response.