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

Regarding Java Service, getData() method

  • 1.  Regarding Java Service, getData() method

    Posted Thu August 21, 2008 08:28 AM

    Hi,

    I have a java service with me that fetches the current user who has logged in to the IS. Now I want to fetch the user data for which I use getData() method, which returns a “Values” object, from there I am trying to fetch data into a string array using the method getStringArray(key).

    I dont have any idea what will be the key here. The service is throwing null pointer exception.

    The code goes somewhat like this.

    InvokeState is = InvokeState.getCurrentState();
    User user = is.getCurrentUser();
    String strUsername = user.getName();
    Values v = new Values();
    v = user.getData();
    String strData = v.getStringArray(“data”);
    IDataCursor idcPipeline = pipeline.getCursor();
    idcPipeline.insertAfter(“username”, strUsername);
    idcPipeline.insertAfter(“userdata”, strData);
    idcPipeline.destroy();

    Can anyone please help

    Thanks in Advance,
    Sudarshan


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods