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
Expand all | Collapse all

Help on PSUtilities package

  • 1.  Help on PSUtilities package

    Posted Wed March 22, 2006 06:35 AM

    Hi All,

    I’am trying to write XML string to file and for that I’am using writetofile service of PSUtilities package. Could you please let me knw how to configure it.

    Thanks in Advance.
    uwhiz


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


  • 2.  RE: Help on PSUtilities package

    Posted Wed March 22, 2006 11:41 AM

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


  • 3.  RE: Help on PSUtilities package

    Posted Wed March 22, 2006 11:48 AM

    Hi uwihz,

    writeToFile service in PSUtilities has default (allowed write paths) in \IntegrationServer\packages\PSUtilities\config\PSUtilities.So u can mention the required path there.

    I dint try this but it may work.

    But wat i dint is i copied the service to required folder & edited some code.

    // *** Check if path is on the allowed list ***
    //try
    //{
    // if (!checkPathValidity(strFullFilename, “write”))
    // {
    // throw new ServiceException(“Specified path is not on the write allowed list in the PSUtilities configuration file!”);
    // }
    //}
    //catch (Exception e)
    //{
    // throw new ServiceException(e.getMessage());
    //}
    // *** End check ***

    The above lines in code i commented & its working fine.

    Surya.


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


  • 4.  RE: Help on PSUtilities package

    Posted Wed March 22, 2006 06:54 PM

    Hi surya,

    I commented out the code but did’nt worked out . could u plz let me knw hw to tackle this and also let me knw hw to specify path. For the filename field I’am setting the input as C:\Test12\test. test is the filename…

    Is that correct. plz help me

    Thanks,
    Satya


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


  • 5.  RE: Help on PSUtilities package

    Posted Wed March 22, 2006 07:01 PM

    Satya,

    A statement like “didn’t worked out” doesn’t help us too much. Be more specific about what you did and what errors you received.

    Mark


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


  • 6.  RE: Help on PSUtilities package

    Posted Wed March 22, 2006 07:05 PM

    It is Saying that specified path is not on the write allowed lists in the PSUtilites config file


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


  • 7.  RE: Help on PSUtilities package

    Posted Thu March 23, 2006 05:00 AM

    Hi,

    The 2nd thing which i mentioned below is working i.e editing the code…

    Can u specify the error u are getting.

    Surya.


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


  • 8.  RE: Help on PSUtilities package

    Posted Thu March 23, 2006 06:13 AM

    Thanx fr ur help . Its working nw, but i have another problem nw which is

    I’am pulling data from the database and publishing the doucment on the broker and using trigger i’am subscribing that document and i have to write that in the local disk.

    These are the steps in the hanlder service;

    1)Map set service name
    2) pub:xmldoctostring
    3) psutil:writetofile

    and i’am getting these exceptions com.wm.lang.flowexception while execting the trigger: Rejecting document from trigger store
    and in the IS logs it is saying tha com.lang.FlowException at pub:xmldoctostring. I’am successfully able to write it into the local disk when iam using simple doctype when it comes to the doclist which is coming from the DB its throwing this exception.

    IF you have any idea abt this plz reply

    Thanks,
    uwhiz:confused:


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


  • 9.  RE: Help on PSUtilities package

    Posted Thu March 23, 2006 02:53 PM

    Hi uwhiz,
    pub:xmldoctostring can convert only document to string not documentlist to string. Loop over the document list and then convert each document to the string and write it to the disk.
    Thanks,
    Jay


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


  • 10.  RE: Help on PSUtilities package

    Posted Fri March 24, 2006 09:20 AM

    Thanks,

    As told by jaya, u can loop over the document list & then write to file.

    It’s working fine.

    Surya.


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


  • 11.  RE: Help on PSUtilities package

    Posted Sun July 08, 2007 02:29 PM

    Hello can any one help me to find out Sample.io.test:writetofile

    without this am unable to write into file
    and from where i can find this one " psutil:writetofile"
    Plz help me


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


  • 12.  RE: Help on PSUtilities package

    Posted Sun July 08, 2007 02:30 PM

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


  • 13.  RE: Help on PSUtilities package

    Posted Sun July 08, 2007 06:01 PM

    If you have an advantage site account you can login and search under:

    Home > Knowledge Base > Knowledge Base Home > Integration Server 6.5 > PSUtilities Package

    Its avaiable for free download.

    -Leon


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


  • 14.  RE: Help on PSUtilities package

    Posted Wed July 25, 2007 02:30 PM

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


  • 15.  RE: Help on PSUtilities package

    Posted Wed July 25, 2007 02:34 PM

    Hi uwhiz;
    i m facing same prob help me out .It is Saying that
    specified path is not on the write allowed lists in the PSUtilites config file.
    i have edited some code as told by surya but after that there is b2b server exeption err.
    u have solved this one plztell me


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


  • 16.  RE: Help on PSUtilities package

    Posted Wed July 25, 2007 04:39 PM

    We had the same problem and authored our own or modified PSUtilities

    IDataCursor pipelineCursor = null;

    try
    {
    pipelineCursor = pipeline.getCursor();
    String directory = IDataUtil.getString( pipelineCursor, “directory” );
    String filename = IDataUtil.getString( pipelineCursor, “filename” );
    String content = IDataUtil.getString( pipelineCursor, “content” );

    if(directory == null)
    {
    throw new ServiceException("Input parameter \'directory\' not found");
    }
    
    if(filename == null)
    {
    throw new ServiceException("Input parameter \'filename\' not found");
    }
    
    if(content == null)
    {
    throw new ServiceException("Input parameter \'content\' not found");
    }
    
    String sep = System.getProperty("file.separator");
    
    BufferedWriter out = new BufferedWriter(new FileWriter(directory + sep + filename));
    out.write(content);
    out.close();
    

    }
    catch(IOException ioex)
    {
    throw new ServiceException(ioex.toString());
    }
    catch(Exception e)
    {
    throw new ServiceException(e.toString());
    }
    finally
    {
    pipelineCursor.destroy();
    }


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


  • 17.  RE: Help on PSUtilities package

    Posted Wed July 25, 2007 04:44 PM

    webMethods HOW TO - PSUtilties Errors need Modification

    This file needs to be set to allow access to file and directories
    Modify this data on wmwin-dev e:/IntegrationServer/packages/PSUtilities/config/PSUtilities.cnf

    Once you have modified this data you will have to go to the IS Packages|Management and click the reload button

    This will reload the cnf file and allow you to move forward


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


  • 18.  RE: Help on PSUtilities package

    Posted Mon April 28, 2008 06:18 PM

    Dear All,
    Im facing an error while im trying to use WritoTOFile from PSUtilities … "Specified path is not on the write allowed list in the PSUtilities configuration file! ",

    Please suggest…
    I m editing the allowedWritePaths in PsUtilites cnf file , and even im getting the above error.
    Pls help me in this.

    Thanks,


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