webMethods

webMethods

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.  Need "wmsamples" package

    Posted Tue January 12, 2010 07:25 AM

    Can you please provide me the “wmsamples” package, that’s required for file-writing.


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


  • 2.  RE: Need "wmsamples" package

    Posted Tue January 12, 2010 03:48 PM

    Visit the Software AG Community pages on the web. You can find the samples there.

    Redistributing code from SAG/wM via wMUsers is not permitted.


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


  • 3.  RE: Need "wmsamples" package

    Posted Wed January 13, 2010 05:40 AM

    Can you please provide me the url of Software AG Community pages?


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


  • 4.  RE: Need "wmsamples" package

    Posted Wed January 13, 2010 05:51 AM

    https://empower.softwareag.com/
    https://advantage.webmethods.com


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


  • 5.  RE: Need "wmsamples" package

    Posted Thu January 14, 2010 05:46 AM

    If you required only for file write, you can use below code.

    FileOutputStream OutputStream fout = null;
    String successFlag = “false”;
    try {
    FileOutputStream OutputStream fout = null;
    // Check to see if the overwriteFlag was set to overwrite
    if (strOverwriteFlag.equals(“overwrite”)) {
    //Create a new FileOutputStream object that will overwrite the old file
    fout = new FileOutputStream(strFilename, false);
    }
    else { // append for all other values
    //Create a new FileOutputStream object that will append to the old file
    fout = new FileOutputStream(strFilename, true);
    }
    OutputStream bout= new BufferedOutputStream(fout);
    OutputStreamWriter out = new OutputStreamWriter(bout, strCharset);
    out.write(strFileContent);
    out.flush();
    out.close();
    //Set the success flag because the service was successful
    successFlag = “true”;
    }
    catch (Exception e) {
    //Set the success flag because the service failed
    successFlag = “false”;
    }


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