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

Error in simple file polling

  • 1.  Error in simple file polling

    Posted Wed October 12, 2011 04:26 PM

    Hi,

    I am running a simple file polling flow service downloaded from SAG.

    I have created a file polling port and able to see the file disappearing from the folder.
    But in the flow service, i am not able to see the content of the file using debugLog.
    The error encountered is:

    can someone suggest a solution for this pls…?

    –Regards,
    –Sagar


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


  • 2.  RE: Error in simple file polling

    Posted Wed October 12, 2011 06:16 PM

    Can you share the steps of your FLOW service?


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


  • 3.  RE: Error in simple file polling

    Posted Thu October 13, 2011 05:43 AM

    pub.flow:tracePipeline is your friend to try and work out what’s in the pipeline. It might be that you’re trying to do a String operator on something that is a Stream or it might be a node if it’s xml for instance…


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


  • 4.  RE: Error in simple file polling

    Posted Thu October 13, 2011 02:26 PM

    The steps are:
    pub.io:streamToBytes
    pub.string:bytesToString
    pub.flow:debugLog

    Today the service is running fine, i dont know how…:confused: i haven’t made any changes to the service or IS !!!

    Thanks a lot for your replies, will definitely share if i am able to find out the reason behind the error.

    Regards,
    Sagar


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


  • 5.  RE: Error in simple file polling

    Posted Tue October 18, 2011 10:29 AM

    base on the error dump, the input pipeline for pub.io:streamToString is string instead of stream.

    later that may be you have changed something on your input service which you are not aware of.

    the flow service can be simplify as below instead.
    pub.io:streamToString
    pub.flow:debugLog


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


  • 6.  RE: Error in simple file polling

    Posted Tue October 18, 2011 05:25 PM

    Hi,

    There is no such service which you have mentioned. Even i implemented the same flow steps which Ssagar had flowed but i am getting error like;“error processing service” for file polling.Please help me.


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


  • 7.  RE: Error in simple file polling

    Posted Wed October 19, 2011 03:17 AM

    i have checked from the documentation, pub.io:streamToString service only available in webMethods 8.x and above.


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


  • 8.  RE: Error in simple file polling

    Posted Wed October 19, 2011 06:14 AM

    hi guys,

    i have tried to create a file polling service (txt file), below is my finding.
    for performance and i/o overhead consideration, option 1 is preferable.

    option 1:

    1. create a service input named “ffdata” (without quote) as object.
    2. write the flow service as below.
      pub.io:streamToBytes
      pub.string:bytesToString
      pub.flow:debugLog

    or

    option 2:

    1. write the flow service as below.
      pub.flow:getTransportInfo
      pub.file:getFile (base on filepolling->filename)
      pub.io:streamToBytes
      pub.string:bytesToString
      pub.flow:debugLog

    ssagar, check the input type you have defined for “ffdata”, it must be defined as object.
    if you are receiving xml file, then you will need to define a “node” object for your input instead.
    you can always use pub.flow:tracePipeline at the begining of the flow service to know what kind of input pipeline you will received.

    tanveer, your error description is too brief, for development, it’s advisable to turn your debug log level to more details


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


  • 9.  RE: Error in simple file polling

    Posted Wed October 19, 2011 11:35 AM

    okay, thats all right. i was seeing in 7.1. Thanks


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