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.  saving pdf attachment from eMail listener

    Posted Tue March 27, 2007 02:58 PM

    Hello

    I receive a pdf file through my eMail listener.
    When I save it to a file I get an empty pdf document
    GetBodyPartContent
    streamToString
    writeToFile

    When I do a base 64 decoding a get an invalid pdf format error
    GetBodyPartContent
    streamToString
    base64Decode
    byteToFile

    Other order of flows give errors about wrong variable types.

    I’ve been looking in vain through the forums for an answer.

    Can anyone help me please?

    Stef


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


  • 2.  RE: saving pdf attachment from eMail listener

    Posted Tue March 27, 2007 05:25 PM

    Stop calling streamToString. PDF data is not a string. Write the stream or bytes to file. Do not try to convert it to a string.


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


  • 3.  RE: saving pdf attachment from eMail listener

    Posted Wed March 28, 2007 10:45 AM

    A working solution:

    pub.flow:getTransportInfo
    pub.io:streamToBytes
    bytesToFile

    with thank to my american Fisher colleague and reamon

    stef


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


  • 4.  RE: saving pdf attachment from eMail listener

    Posted Mon October 25, 2010 10:50 PM

    Stef,

    Can you point out where byteToFile is located? I’m trying to convert the attachment from getBodyPartContent to a file so that I can map it to the attachment in the smtp.

    Thanks,
    Jin


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