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.


#TechXchangePresenter
 View Only
  • 1.  executing quip from java

    Posted Sun May 22, 2005 03:12 PM

    We are using this java function to call quip from java :

    import java.util.;
    import com.softwareag.xtools.quip.xqueryAPI.
    ;
    import java.lang.*;

    public class TestAPI {
    public static void main(String args){
    Properties prop = new Properties();
    try {
    prop.put(“quipcmd”,“quip.exe” );
    Connection conex
    = DriverManager.getConnection( “C:/QuiP/bib.xml”, prop );
    QueryResult res = conex.executeQuery((String)args[0]);
    System.out.println(res.getRawString());
    }catch (XQueryException e) {
    System.out.println("XQueryException: " + e.getMessage());
    }
    }
    }

    our xml file is bib.xml the path is c:/QuiP/bib.xml and when we execute the java function as written above we get the message :

    C:\QuiP>java TestAPI quippy.xquery
    Exception in thread “main” java.lang.NullPointerException
    at TestAPI.main(TestAPI.java:12)

    For our test I execute a very simple Xquery query ( to check if the connection works properly but It seems not to… ) :

    { document("C:/QuiP/bib.xml")//book[2]/author/la }

    Its name is quippy.xquery and the path is c:/QuiP/quippy.xquery
    I don’t know where to indicate the source of the xml data, and I’m not sure of what is written in red in the java function.
    If somebody could help me…


    #API-Management
    #webMethods
    #Tamino