Check the "Advanced" checkbox.

find_real_file.png

The body of the script can be generated using REST Message.

  1. From the Navigator, go to "System Web Services" > " Outbound" > "REST Message".
  2. Create a new REST Message by clicking on the "New" button.
  3. Fill in the Endpoint (i.e. enter the URI of the external url. e.g. http://xxx.aaa.com:8080)
  4. Select "Authenentication type" from pull down
  5. If there is a HTTP Request header, select the "HTTP Request" tab and insert the required headers.
  6. Select the "New" button next to the HTTP Methods
  7. Enter the "Name" and the "HTTP method".
  8. To test the uri and if there is argument to be passed in the uri, click on the "New" button next to the "Variable Substitution". For example, to replace "id" with some value such as "abc"
  9. Click the "Test" link under "Related Links" to test the endpoint.
  10. If all goes well, click on the "Preview Script Usage" link under the "Related Links". This will generate JavaScript code template.
  11. Paste the generated source code to business rule.
  12. If using MID Server, edit the source code as needed.

To parse JSON response, 

      var responseBody = response.getBody();
      var response= JSON.parse(responseBody);
      for(i=0;i<response.length;i++) {
        // process json object
      }

 

View solution in original post