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

filepolling problem

  • 1.  filepolling problem

    Posted Thu January 10, 2008 12:25 PM

    Hi,
    i am facing problems while working filepolling with xml. i have tried many ways but i am not getting where exactly error is comming.always the given xml file is moving into error directory.
    i set the content type all of the possible ways.

    1. application/xml
    2. text/xml
    3. no content type
      i tried many ways by giving the input pipeline variable of the service as
    4. ffdata(object)
    5. node(object)
      can u please tell me how to rectify this.

    i couldn’t find the documentation from advantage… site .where can i get the documentation related to this (filepolling wih xml).i would like to know the exact process.how can i handle error when any error comes while processing.

    i tested for flatfile whether it is working or not.i set the content type as application/x-wmflatfile and pipeline variable as ffdata.interestingly it is working fine.but in the case of xml i am getting problems.

    Adv Thanks,
    chandu


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


  • 2.  RE: filepolling problem

    Posted Thu January 10, 2008 04:36 PM

    “i set the content type as application/x-wmflatfile and pipeline variable as ffdata.interestingly it is working fine.but in the case of xml i am getting problems.”

    What happens in this case? With the content type set to application/x-wmflatfile you should always get an ffdata object, even when the file contains xml. Is that not happening?

    If you don’t specify a content type on the the file polling port, the filename extension is used to determine the content type and the content handler. In this case, the service that is invoked will need to determine which pipeline variable is present (e.g. ffdata, node, content, etc.) and take the appropriate action.

    The IS Administrator’s Guide has information on the file polling port. The Flat File Schema Developer’s Guide has information for flat files.


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


  • 3.  RE: filepolling problem

    Posted Fri January 11, 2008 06:12 AM

    Hi reamon,
    thanks for the reply.i tried by putting flatfile (csv) in the monitoring directory and set the parameters content type as application/x-wmflatfile and pipeline variable as ffdata.it worked fine.but in case of xml its not working.what would be the content type for processsing xml and what would be the variable i need to take.

    Regards,
    chandu


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


  • 4.  RE: filepolling problem

    Posted Fri January 11, 2008 03:17 PM

    Content-type = text/xml
    Input variable = node

    Monitor your server log next time the file polling runs. If the file is being moved to the error directory, then an error must be occurring, and most likely, it is being written to the server log. Once you discover what the error is, post it here.

    • Percio

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


  • 5.  RE: filepolling problem

    Posted Fri January 11, 2008 05:31 PM

    Keep in mind that if you set the content type for a particular file polling port, all files must be of that content type. If you toss an XML file into a directory being monitored by a polling port configured with application/x-wmflatfile as the content type, you’ll still get an ffdata object (an InputStream) and not a node.

    If you need to process multiple types of files, you have a couple of choices:

    1. as Percio described, create a file polling port for each type, setting the content type as needed; each port will need to monitor its own directory (e.g. can’t have 2 ports monitoring the same directory)

    2. create one file polling port with an empty content type; the polling port will invoke the appropriate content handler based on the file extension; so foo.xml will cause a node object to be placed in the pipeline, while other extensions will cause other vars to be put in the pipeline, depending on the content handler associated with the file extension


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


  • 6.  RE: filepolling problem

    Posted Fri January 11, 2008 07:38 PM

    Rob,

    Not that I think it’s a good idea to have two polling ports monitor the same directory, but if the file name extensions are known, you could theoretically monitor the same directory with two separate polling ports as long as the “File Name Filter” is used, right?

    Thanks,
    Percio


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


  • 7.  RE: filepolling problem

    Posted Fri January 11, 2008 07:44 PM


  • 8.  RE: filepolling problem

    Posted Fri January 25, 2008 04:09 PM

    Hi reamon and others

    sorry for late reply.thanks for your cooperation.i got it now.
    i have given pipeline variable as node (object)
    and content type as text/xml
    now it is working pretty good.

    Regards,
    Chandu


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


  • 9.  RE: filepolling problem

    Posted Thu July 17, 2008 08:39 PM

    A 3rd option:

    1. Specify application/x-wmflatfile as the content type in the file polling port. Then use some mechanism to determine what kind of file you really have (e.g. csv, xml, txt, etc.) and process it as needed. One obvious way of determining what you have is by the incoming filename. Another way would be to read the first few bytes of the stream (you’ll need to read it in such a way as to be able reset the stream to the beginning for processing–there are a couple of ways to do that).

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


  • 10.  RE: filepolling problem

    Posted Fri March 23, 2012 04:07 PM

    File Polling Problem

    In server log I’m getting this error [666]2012-03-23 20:02:10 IST [FF.0001.0033C] Error processing service: [FPL.0002.0004] Server Error:
    What does this mean.

    When I’m trying to monitor a file using file polling it is moving to error Dir.
    Please help me


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


  • 11.  RE: filepolling problem

    Posted Fri March 23, 2012 06:38 PM

    Can you give few more details about your flow service …


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


  • 12.  RE: filepolling problem

    Posted Sun March 25, 2012 11:18 AM

    First of all i have created a flow service to send a ff to IS via file polling
    In developer I’ve created a fs with name readFileTest

    pub.io:streamToBytes
    pub.string:bytesToString
    pub.flow:debugLog

    i have created this flow service inside “ffmonitorsample” folder, and name of the service is readFileTest

    After that i have created a file polling port on IS

    for that what i did is

    Security>ports>Add Port>webMethods/FilePolling>submit
    Package name WmRoot
    Run services as user Developer/Administrator
    Monitoring Directory as C:\Users\Vimala\Desktop\mon
    Working Dir C:\Users\Vimala\Desktop\mon\work
    Completion Dir C:\Users\Vimala\Desktop\mon\done
    Error Dir C:\Users\Vimala\Desktop\mon\error
    Processing service ffmonitorsample:readFileTest
    File Polling Interval (seconds) 5
    Log only when directory availability changes No
    Directories are NFS mounted file system No
    Cleanup Service (optional) unspecified
    Cleanup At Startup Yes
    Cleanup File Age (optional) (days) 7
    Cleanup Interval (optional) (hours) 24
    Maximum Number of Invocation Threads 5
    Content Type (optional) application/x-wmflatfile

    Port Service Access Settings
    Access Mode Allow by Default

    Enabled the package

    When I’m polling a file into the monitoring Dir it is moving to error

    And I’m seeing a message on the server log as
    [341]2012-03-25 14:57:38 IST [FF.0001.0033C] Error processing service: [FPL.0002.0004] Server Error:

    Note: The same program is working fine on another system


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


  • 13.  RE: filepolling problem

    Posted Mon March 26, 2012 06:21 PM

    I take it that IS is running on your local machine. Is it running as a Windows service? If so, what is the “Log on as” setting?

    My guess is this may be a permissions issue of some sort because the IS process doesn’t have access to the Users directory. But that’s a guess.


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


  • 14.  RE: filepolling problem

    Posted Tue March 27, 2012 08:55 AM

    Hi Krishna,

    Please check the below link hope it helps …
    [URL]wmusers.com

    Thanks,
    Amol.


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


  • 15.  RE: filepolling problem

    Posted Fri May 04, 2012 03:03 PM

    Hi all
    im new new to webMethods
    im working on building a service where i can enable/disable file polling from a dsp page.
    i have used ports.listListeners
    than LOOP over /listeners
    ->BRANCH on /listeners/protocol
    –>FilePolling:SEQUENCE
    —>listenerDisable
    when i run it i get message The parameter ‘port’ is required.
    file polling as far i know doesnt has any port no
    and in the listListeners port for file polling shows as 0
    when i pass 0 i get msg “Nothing is listening on 0”
    disable doent work :frowning:
    someone please help


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


  • 16.  RE: filepolling problem

    Posted Fri May 04, 2012 03:33 PM

    this is UAT server running on unix (solaris)
    n wher do i check the log on as?
    i have logged in as Administrator
    n thanks for the quick reply… appreciate it


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