IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Connection QuiP <--> Tamino through Java API

    Posted Mon July 22, 2002 06:40 PM

    I try to connect Quip with Tamino database through the Java API with the following code (picked from a previous post):

    import java.util.Properties;

    import com.softwareag.xtools.quip.xqueryAPI.Connection;
    import com.softwareag.xtools.quip.xqueryAPI.DriverManager;
    import com.softwareag.xtools.quip.xqueryAPI.QueryResult;
    import com.softwareag.xtools.quip.xqueryAPI.XQueryException;

    public class Quip {
    public static void main(String args) {
    Properties prop = new Properties();
    try {
    String dbLocation =
    http://localhost/tamino/myDB”;
    //for memory issues
    prop.put(“qmachineoptions”,“+RTS -M200M -RTS”);
    prop .put(“quipcmd”, “D:\QuiP\quip.exe”);
    String query = “let $x := fromCollection("ino:etc")/myFirstElement/mySecondElement return $x”;
    // → Here is the problem ←
    Connection connect = DriverManager.getConnection(dbLocation, prop);
    QueryResult result = connect.executeQuery(query);

    System.out.println(result.getRawString());
    } catch (XQueryException XQEx) {
    System.out.println("XQueryException: " + XQEx.getMessage());
    }
    }
    }

    When I execute this code, an error occured (“NullPointerException”) when the DriverManager try to get the connection.
    But when I use a XML file as source, all is OK.

    What’s the problem ? Thanks !


    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: Connection QuiP <--> Tamino through Java API

    Posted Tue July 23, 2002 05:48 PM

    Hi Sollan,

    I don’t want to ask a silly question, but…
    Does this query work on your machine:
    http://localhost/tamino/myDB/ino:etc?_xql=/myFirstElement/mySecondElement ?

    If this works, something is wrong with the QuiP setup. If it doesn’t, then you have found the problem!

    Cheers,
    Trevor.


    #Tamino
    #API-Management
    #webMethods


  • 3.  RE: Connection QuiP <--> Tamino through Java API

    Posted Tue July 23, 2002 06:13 PM

    Yes, the query using the URL is working.

    But using Java, it seems to be a problem with the URI of the database.
    When I set dbLocation to “file:whatever”, the error is not the same (QuiP does not achieve to locate the file (normal behavior), but I don’t get the “nullPointerException”).

    Is there any prefix to put before the database URL, like “file:” for a file ?


    #Tamino
    #webMethods
    #API-Management


  • 4.  RE: Connection QuiP <--> Tamino through Java API

    Posted Tue July 23, 2002 06:27 PM

    Hi Sollan,

    Puny just gave me a heads-up regarding access to Tamino via the QuiP API.

    I’ll pass all the information along to the appropriate people in Development, and we’ll see what can be done.

    Thanks in advance for your patience(!),
    Trevor.


    #webMethods
    #Tamino
    #API-Management