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

Exttracting e-mail body from email received via email port on 65

  • 1.  Exttracting e-mail body from email received via email port on 65

    Posted Fri September 18, 2009 04:08 PM

    I am having issue with mail pooling port. While doing the pooling i am able to get the email subject but could not get the body of the mail. My mail is a plain text mail and it does not contain any attachment. Its urgent could anyone please throw some light on this issue.


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


  • 2.  RE: Exttracting e-mail body from email received via email port on 65

    Posted Fri September 18, 2009 07:45 PM

    Did you service input object “contentStream” and further steps you know stream to bytes,bytes to string …Also for debugging put these steps:

    pub.flow:getTransportInfo (check the results pipeline after this step)
    savepipeline

    HTH,
    RMg


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


  • 3.  RE: Exttracting e-mail body from email received via email port on 65

    Posted Sat September 19, 2009 10:29 AM

    Thanks for the response ,

    But i am unable to get anythinfg out of this. Below is the extract of the log i am getting.
    Content type: text/plain; charset=utf-7 Subject: COLTAVAYATICKETS.maps:getMailFromAvayaMailBox
    2009-09-19 09:52:06 BST [ISP.0068.0025V2] No content handler for content type TEXT/PLAIN. Service COLTAVAYATICKETS.maps:getMailFromAvayaMailBox called without content handler.
    2009-09-19 09:52:06 BST [ISS.0014.0016V4] Invoking service COLTAVAYATICKETS.maps:getMailFromAvayaMailBox
    2009-09-19 09:52:06 BST [ISC.0049.0005V3] Invoke : index=1 depth=1
    2009-09-19 09:52:06 BST [ISS.0014.0016V4] Invoking service pub.flow:debugLog
    2009-09-19 09:52:06 BST [ISP.0090.0003V3]
    2009-09-19 09:52:06 BST [ISC.0049.0005V3] Invoke : index=1 depth=1
    2009-09-19 09:52:06 BST [ISS.0014.0016V4] Invoking service pub.flow:getTransportInfo
    2009-09-19 09:52:06 BST [ISC.0049.0005V3] Invoke : index=1 depth=1
    2009-09-19 09:52:06 BST [ISS.0014.0016V4] Invoking service pub.flow:debugLog
    2009-09-19 09:52:06 BST [ISP.0090.0003V3]
    2009-09-19 09:52:06 BST [ISC.0049.0005V3] Invoke : index=1 depth=1
    2009-09-19 09:52:06 BST [ISS.0014.0016V4] Invoking service pub.flow:savePipelineToFile
    2009-09-19 09:52:06 BST [ISC.0076.0007W] XMLCoder decode invalid data type: java.io.ByteArrayInputStream
    2009-09-19 09:52:06 BST [ISC.0076.0007W] XMLCoder decode invalid data type: java.io.ByteArrayInputStream
    2009-09-19 09:52:06 BST [ISC.0049.0004V4] Branch : index=1 depth=1
    2009-09-19 09:52:06 BST [ISC.0049.0003V3] Branch : invoking child email
    2009-09-19 09:52:06 BST [ISC.0049.0008V3] Sequence email: index=1 depth=2
    2009-09-19 09:52:06 BST [ISC.0049.0004V4] Branch : index=1 depth=3
    2009-09-19 09:52:06 BST [ISC.0049.0002V3] Branch : child TEXT/PLAIN; charset=utf-7 not found, invoking default child $default
    2009-09-19 09:52:06 BST [ISC.0049.0008V3] Sequence $default: index=1 depth=4
    2009-09-19 09:52:06 BST [ISC.0049.0004V4] Branch : index=3 depth=3
    2009-09-19 09:52:06 BST [ISC.0049.0008V3] Sequence email: index=2 depth=2
    2009-09-19 09:52:06 BST [ISC.0049.0004V4] Branch : index=2 depth=1
    2009-09-19 09:52:12 BST [ISS.0069.9998V4] (Complex Job Manager, 30.0, 1253350332050, running) was successfully allocated a thread


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


  • 4.  RE: Exttracting e-mail body from email received via email port on 65

    Posted Mon September 21, 2009 04:20 PM

    I still suspect on this

    No content handler for content type TEXT/PLAIN. Service COLTAVAYATICKETS.maps:getMailFromAvayaMailBox called without content handler

    Also try to use pub.flow:savePipeline (instead of savePipelineToFile)

    Can you elaborate on your flow steps?

    HTH,
    RMG


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


  • 5.  RE: Exttracting e-mail body from email received via email port on 65

    Posted Mon September 21, 2009 08:36 PM

    Thanks for the response.
    3 days back i changed savepipelinetofile to savePipeline and i started getting contentStream.
    contentStream=java.io.byteArrayInputStream is appearing in the pipeline.
    I am unable to convert this in the stream.

    My is simple i am calling

    pub.flow.gettransportinfo
    savePipeline
    restorepipeline
    branch on Protocol
    processing


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


  • 6.  RE: Exttracting e-mail body from email received via email port on 65

    Posted Mon September 21, 2009 11:14 PM

    OK,if you see contentStream in the pipeline try to convert to String by using services:

    restorepipeline (for debugging)
    streamToBytes
    bytesToString (this extracts the email body readable content)

    HTH,
    RMG


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


  • 7.  RE: Exttracting e-mail body from email received via email port on 65

    Posted Tue September 22, 2009 11:29 AM

    i am getting contentStream = java.io.ByteArrayInputStream and this is not getting converted into Bytes.

    contentType =TEXT/PLAIN; charset=utf-7

    Pipe line is

    <?xml version="1.0" encoding="UTF-8"?> -1 7 java.io.ByteArrayInputStream email java.io.ByteArrayInputStream RE: test mail body TEXT/PLAIN; charset=utf-7 Sat Sep 19 21:22:46 BST 2009 Sat Sep 19 21:22:46 BST 2009 "Kumar, Punit" "Kumar, Punit" "Kumar, Punit"

    Please suggest .

    I never had such tricky problem before its great learning but breathtaking as well.


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


  • 8.  RE: Exttracting e-mail body from email received via email port on 65

    Posted Tue September 22, 2009 04:57 PM

    Hi RMG,

    Thansk alot for your responses.

    I got the solution. It is very simple, i end up laughing on myself.
    I never realized that “Stream” can not be traced , it can only checked at run time.

    I realized this once i followed the below steps.

    Service in my flow is give below

    getTransportInfo
    savepipeline
    restorepipeline
    pub.io.stream to bytes
    bytestoString
    savepipeline
    restorepipeline

    steps
    Keep both restore pipeLines disable
    send a test mail to mail box.
    once the mail is polled from mail box.
    disable the following
    savepipeline ( both)
    pub.io.stream to bytes
    bytestoString

    Now trace it.

    while tracing just modify the protocol to “email”.
    you can see the mail body.


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


  • 9.  RE: Exttracting e-mail body from email received via email port on 65

    Posted Tue September 22, 2009 05:44 PM

    Yes streams can’t be saved/restored…Based on the steps above,you should be on the right track now!..You can remove those debug steps once your flow is ready.

    HTH,
    RMG


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


  • 10.  RE: Exttracting e-mail body from email received via email port on 65

    Posted Wed September 23, 2009 05:38 AM