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

Issue: IS MIME Service to extract Body Part content

  • 1.  Issue: IS MIME Service to extract Body Part content

    Posted Wed January 29, 2003 02:30 AM

    Trying to extract Excel attachments from mail box and process using IS flow services. Below is the logic using to extract the data and convert into input stream to pass into Excel API which can accept the stream.

    #1. Configured one IS SMTP port listener to read mails from IMAP mail server.

    #2. Written a custom content handler to process the MIME message with Excel body part. The handler will convert the entire MIME message into a String.

    #3. Converting the output Siring into a stream data “using stringToStream” sample service. Stream object is now type of “java.io.StringBufferInputStream”.

    #4. Using IS MIME service “createMimeDate” to convert the stream into a MIME Object. Now I can see the MIME object with headers and one Body Part as object “java.io.ByteArrayInputStream”.

    #5. Using getBodyPartContent MIME service to convert the MIME data part to a content stream.

    #6.Passing the content stream to the Excel API, which is using the code “File f = new File(contentStream)”.

    Getting an run time error for #6 as “Input file is not found” and Null pointer exception.

    So to debug, added another step after #5, to convert the content stream again to string using “streamToString” sample service. But in pipeline the string is null.

    Your help would be great.


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 2.  RE: Issue: IS MIME Service to extract Body Part content

    Posted Wed July 16, 2003 08:57 AM

    jeyaraman

    Did you get your content handler to work with excel files ?

    I have written the code to read excel by usinh the POI API, but not the content handler.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General