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

Help sending email via TN

  • 1.  Help sending email via TN

    Posted Fri April 11, 2003 07:51 PM

    Receiving the following error from TN:
    Task h4cdas00uhutjeel0000004k failed with no more retries available. Reason for failure - Delivery service for h4cdas00uhutjeel0000004k failed with a status of fail and status message of com.wm.app.b2b.server.ServiceException: javax.mail.SendFailedException: Sending failed;
    nested exception is:
    javax.mail.MessagingException: IOException while sending message;
    nested exception is:
    java.io.IOException: “text/xml” DataContentHandler requires String object, was given object of type class [B

    I am calling wm.tn:submit after createNewEnvelope using the appropriate Doc and Sender/Receiver Ids. And addContentPart with partName ‘xmldata’. I generate the bytes for the contentpart by using pub.string:stringToBytes with encoding set to ‘UTF-8’ TN is using the processing rule set to deliver to receiver via PrimarySMTP, but gives the above error on the delivery.

    Where am I going wrong? Help!


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport


  • 2.  RE: Help sending email via TN

    Posted Fri April 11, 2003 07:52 PM


  • 3.  RE: Help sending email via TN

    Posted Thu October 21, 2004 05:15 PM

    Rob,

    I’m having the same problem. Did you find a solution?

    Thanks,
    Percio


    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: Help sending email via TN

    Posted Thu October 21, 2004 05:19 PM

    Rob,

    I’m having the same problem. Did you find a solution?

    Thanks,
    Percio


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport


  • 5.  RE: Help sending email via TN

    Posted Thu October 21, 2004 05:29 PM

    Percio,

    Can you elaborate on your process and error you are seeing,so that it will be easy for everyone to respond and resolve.

    Regards,


    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport
    #webMethods


  • 6.  RE: Help sending email via TN

    Posted Thu October 21, 2004 07:45 PM

    percio,

    How are you submitting the xml to TN?is it via external http post(setting content-type:text/xml)or ISAdminPage/WmTNWeb using document submission or from a flowservice tn.receive or routeXML service sending as a node object?

    Looks like the TN is not receiving the data with content-type “text/xml” ,so delivery is failing.

    HTH,
    RMg


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: Help sending email via TN

    Posted Thu October 21, 2004 08:26 PM

    RMG,

    I am actually using an HTML page with a form that contains a text area called $xmldata. The form submits the text area data to the URL of a service that is very similar to wm.tn:receive. This page works for every other XML document we post to TN, so I don’t think this is the problem.

    However, I went ahead and tried using the WmTNWeb Document Submission tool and I also tried executing pub.client:http with url=http://server:post/wm.tn/receive, method=post, loadAs=bytes, data/string=the XML message, and headers=[Content-Type=text/xml]. Both resulted in the same error.

    By the way, I’m running IS 6.0.1 with TN 6.0.1 Build 550 and these are the current updates on the IS:
    IS_6-0-1_SP2
    IS_6-0-1_Fix87
    IS_6-0-1_SP1_Fix43
    TNS_6-0-1_Fix8
    IS_6-0-1_SP1_Fix143

    Thanks,
    Percio


    #Integration-Server-and-ESB
    #webMethods
    #webmethods-Protocol-and-Transport


  • 8.  RE: Help sending email via TN

    Posted Thu October 21, 2004 08:49 PM

    Hello,
    I saw in the original post the [B. That means that you had a byte array. You can use the pub.string.bytesToString service. Then take the string (if it is XML) to your other input. Or you may be able to use the pub.io.bytesToStream service and do something similar. Good day.


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport


  • 9.  RE: Help sending email via TN

    Posted Thu October 21, 2004 09:03 PM

    Yemi,

    Thanks for the reply. However, my goal here is to avoid having to develop a new service. All I really need is for the document to be e-mailed to the receiver based on the Primary E-mail on their profile, and if at all possible, I’d like to accomplish that via TN only.

    Thanks,
    Percio


    #webMethods
    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport


  • 10.  RE: Help sending email via TN

    Posted Thu October 21, 2004 10:45 PM

    Hello,
    I see you want something different.
    In TN, you will setup a processing rule for this customer and document. You will on the “action” tab select the “deliver document by” check box and also pick the either the “receiver’s preferred protocol” radio button if this will be shared between multiple TP and they use different protocols or you will pick “immediate delivery” and pick “primary e-mail” from the drop down menu.
    If you use the former, make sure that the profile for each partner on the “delivery method” tab has the protocol needed for transport", the e-mail address filled in and the check box just below saying “use as preferred protocol” is selected for ONLY that protocol.

    That should be fine for you. You should use this throughout your flow services that call send message flows and use different protocol. Use the “preferred protocol”. Good day.


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 11.  RE: Help sending email via TN

    Posted Thu October 21, 2004 11:06 PM

    Yemi,

    That’s exactly what I’m doing currently and that’s how I’m getting the error.

    Thanks anyway,
    Percio


    #webMethods
    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB


  • 12.  RE: Help sending email via TN

    Posted Thu October 21, 2004 11:13 PM

    Percio,

    Please look in the Advantage site and see if there is any fix released for this issue.Since you have tested all the possible ways mentioned above.

    I will let you know if there anything missing in the process.

    HTH,
    RMG


    #Integration-Server-and-ESB
    #webMethods
    #webmethods-Protocol-and-Transport


  • 13.  RE: Help sending email via TN

    Posted Fri January 20, 2006 09:21 PM

    Rob Ham/Percio Castro/Others:

    I am receiving a very similar error in my IS flow service when I try to pass a filename (fully qualified) to the pub.client:smtp service’s attachment doclist. Here it is …

    [javax.mail.MessagingException: IOException while sending message;
    nested exception is:
    java.io.IOException: “text/plain” DataContentHandler requires String object, was given object of type class java.io.FileInputStream]

    Could you please let me know how if you were able to resolve your respective issues, if so how?

    Thanks in advance!


    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB
    #webMethods


  • 14.  RE: Help sending email via TN

    Posted Mon January 23, 2006 04:08 PM

    In the filename you dont need to give fully qualified path name,any file name with .txt or .dat would be fine.

    Also are you specifying Attachments/content-type=text/plain and passing bytes or string object?

    HTH,
    RMG


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB