Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: XMLHttpRequest (XHR) within Pentaho Data Integration

  1. #1
    Join Date
    Dec 2012
    Posts
    5

    Default XMLHttpRequest (XHR) within Pentaho Data Integration

    I'm using the step "REST Client" to call a web service that returns the initial data in json format.
    The number of the returned records is limited to 50.

    Code:
    {
    
    Therefore I have to read the nested property "nextPage" within the json object to have access to the next 50 records.
    I tried to work with a XMLHttpRequest in Javascript but it failed with the following log message "ReferenceError: "XMLHttpRequest" is not defined".

    Code:
    var jsonObject = JSON.parse(jsonAllJobsStream.getString());
    var nextPage = jsonObject.metadata.links.nextPage;
    var xmlhttp = new XMLHttpRequest();
    So how can I do a XMLHttpRequest within Pentaho Data Integration?
    Or is there any other way to follow nested links within a json stream?

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Rhino has no XMLHTTPRequest support.

    Some of your options are

    • Find a pure JavaScript implementation
    • Access a Java class from JavaScript
    • Drop JavaScript in favor of a User Defined Java Class altogether
    • Refrain from scripting at all, using calculated links
    So long, and thanks for all the fish.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.