Hi,
I captured the raw HTTP stream, the REST GET function does not inject JSON data, the parameter value '28' goes into the uri attribute
POST http://localhost:9081/JobUI/___proxy HTTP/1.1Host: localhost:9081Connection: keep-aliveContent-Length: 176Origin: http://localhost:9081User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36Content-Type: application/jsonrequest;charset=UTF-8Accept: */*Referer: http://localhost:9081/JobUI/JobOperator-en_US.htmlAccept-Encoding: gzip, deflateAccept-Language: en-GB,en-US;q=0.8,en;q=0.6Cookie: LtpaToken2=lljF/2d6jHWToLybT6EDLcIv7bUSEcKOLkCtHUTdTCU5ayFwrLKiVr2ocv9P2481DHtFEENtu/uc2mC2l0grrUN6Di78VsCeaMJPVW/nnOFCW0PUBTVvq8cE8ajNY5k6wbRex35Oz6Vz6nWMCdc/u1HhIdh9y2mhPk29Ikk8nAw7Er95aWGWg8vsZ7QhV8Ea3O6SYcaN3UUYCZFDUTBx2XAYBfQdnB/Zp5toA8TvwxcSh52seoL0iKBjw1GRw73rso5K6DkGb2mjRQISZ0Y3MFUAUu5/24OMFLQ+ZN4dzkUlg2mE5myW4L8TVrN5O4h9; JSESSIONID=0000OdbZIovAwrTmKxC0unOZuFW:0fc91fbf-a21c-47ee-9628-ad54ebda0c97{"uri":"https://localhost:9444/ibm/api/batch/jobinstances/28","queryParameters":{},"method":"GET","body":"","headers":{"Authorization":"Basic d2xwYWRtaW46YzByM3BnbTE="}} while the REST POST function put the JSON data into the body attribute
POST http://localhost:9081/JobUI/___proxy HTTP/1.1Host: localhost:9081Connection: keep-aliveContent-Length: 362Origin: http://localhost:9081User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36Content-Type: application/jsonrequest;charset=UTF-8Accept: */*Referer: http://localhost:9081/JobUI/JobOperator-en_US.htmlAccept-Encoding: gzip, deflateAccept-Language: en-GB,en-US;q=0.8,en;q=0.6Cookie: LtpaToken2=lljF/2d6jHWToLybT6EDLcIv7bUSEcKOLkCtHUTdTCU5ayFwrLKiVr2ocv9P2481DHtFEENtu/uc2mC2l0grrUN6Di78VsCeaMJPVW/nnOFCW0PUBTVvq8cE8ajNY5k6wbRex35Oz6Vz6nWMCdc/u1HhIdh9y2mhPk29Ikk8nAw7Er95aWGWg8vsZ7QhV8Ea3O6SYcaN3UUYCZFDUTBx2XAYBfQdnB/Zp5toA8TvwxcSh52seoL0iKBjw1GRw73rso5K6DkGb2mjRQISZ0Y3MFUAUu5/24OMFLQ+ZN4dzkUlg2mE5myW4L8TVrN5O4h9; JSESSIONID=0000OdbZIovAwrTmKxC0unOZuFW:0fc91fbf-a21c-47ee-9628-ad54ebda0c97{"uri":"https://localhost:9444/ibm/api/batch/jobinstances/","queryParameters":{},"method":"POST","body":"{\"applicationName\":\"SleepyBatchletSample-1.0\",\"moduleName\":\"SleepyBatchletSample-1.0.war\",\"jobXMLName\":\"sleepy-batchlet.xml\",\"jobParameters\":{\"sleep.time.seconds\":\"10\"}}","headers":{"Authorization":"Basic d2xwYWRtaW46YzByM3BnbTE="}} I tried using IBM JDK8 and the error still occurs.
Am I calling the third-party REST within EGL/RUI the wrong way?
// supply target URI myJSR352 ICallJSR352{@RestBinding {baseURI = "https://localhost:9444/ibm/api/batch/jobinstances/"}}; // change to appropriate values ServiceLib.setHTTPBasicAuthentication(myJSR352, "wlpadmin","xxxxxxxxx"); // NOTE: these EGL calls are asynchronous // submit a java batch job call myJSR352.invokePost("", myJSONdata) returning to showResult onException serviceError; // show a finished java batch job, e.g., 28 (28th java batch job request) call myJSR352.invokeGet("28") returning to showResult onException serviceError; Thanks,
Julius
jmarb