Trying to call OIC service but not getting correct response

Hello friends,

I am trying to call a rest service of OIC from UI path with POST as method. I need to read an excel file and convert the records into JSON and then call the REST service which intern insert the records into a custom table in OIC.

REST service is working fine with the JSON payload when invoke from SOAP UI but while trying to do from UIPath it is giving correct response.

showing the configuration of http Request activity-

Please help me if i am missing anything. below is the JSON payload which i am using.

{“TaskID”:“AP010ZK”,“TaskName”:“AP: Open Next Account Payables Period”,“TaskType”:“TASK100”,“OrganizationalUnit”:“AU”,“Status”:“Closed”,“Severity”:“No”,“Day”:2,“StartTime”:“9:21”,“Duration”:10,“ScheduleStartDate”:“2018-08-02”,“ScheduleEndDate”:“2018-09-09”,“ActualStartDate”:“2018-08-02”,“ActualEndDate”:“2018-08-30”,“Module”:“Payables”}

What is the response you are getting back? You have your BodyFormat set to application/xml instead of application/json.

Check the headers sent and received in SOAP UI and make sure you are configuring HTTP Request activity in the same way.

Sure , let me try and get back.
Thanks a lot.

I was not passing the body variable, that is why it was failing. It is working now.

Thanks :slight_smile:

That would do it… while I noticed the BodyFormat in the image above, I completely neglected to notice the Body property didn’t have a value.