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.  Email Listener and Special Characters

    Posted Wed August 04, 2004 09:29 PM

    Hi,

    We are trying to receive xml strings via email. We have configured an email port for the same.
    We are able to receive the xml strings and process them in the IS correctly.
    Certain xmls with special characters like & and % are behaving strangely.
    Incase of & (xml resevered char &), characters before the ‘&’ become the variable name and characters after ‘&’ eg. amp; become the value.
    Incase of % no value is passed to the pipeline variable.

    Has anyone seen this kind of a behaviour?
    Can you let us know how you took care of it?


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


  • 2.  RE: Email Listener and Special Characters

    Posted Wed August 04, 2004 10:04 PM

    Sastry,

    Have you compared the receiving XML Document with Initiator that sending the same XML?

    Also provide us with the info of your Port “Email Client Listener Configuration” settings?May if these settings are not inplace then it can raise this issue.

    HTH,


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


  • 3.  RE: Email Listener and Special Characters

    Posted Wed August 04, 2004 11:13 PM

    RMG,

    I did compare the receiving XML Document with the original and found that a ‘+’ in the original document is replaced with ’ '(space).

    “XML Services Developer’s Guide” on the Advantage site mentions that ‘&’ is used as a delimiter for field names. In such a case how do you deal with ‘&’ used in normal course as text?

    Here are the settings of the Email Listener:
    Package Name: WmRoot
    Host Name IP…
    Type IMAP
    User Name ******
    Password ********
    Time Interval (seconds) 5
    Port (optional) unspecified
    Log out after each mail check Yes
    Run services as user Administrator
    Require authorization within message No
    Global Service (optional) Samples:emailporttest
    Default Service (optional) unspecified
    Send reply email with service output Yes
    Send reply email on error Yes
    Delete valid messages (IMAP only) No
    Delete invalid messages (IMAP only) No
    Multithreaded processing (IMAP only) Yes
    Number of threads if multithreading turned on 3
    Invoke service for each part of multipart message No
    Include email headers when passing message to content handler No
    Email body contains URL encoded input parameters Yes

    Appreciate your help.
    Thanks


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


  • 4.  RE: Email Listener and Special Characters

    Posted Wed August 04, 2004 11:23 PM

    John,

    All the settings looks fine except this,

    Can you make a change in the below settings to yes and test it.

    Delete valid messages (IMAP only) Yes
    Delete invalid messages (IMAP only) Yes
    Invoke service for each part of multipart message --yes

    this setting try with both options.
    Email body contains URL encoded input parameters–Yes/No

    HTH,


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


  • 5.  RE: Email Listener and Special Characters

    Posted Wed August 04, 2004 11:29 PM

    Actually the receiving XML data should come with for character &(&)otherwise XMLNodeToDocument parsing will fail at first point itself.
    Please force your partner to send the valid encoded xml’s all the time when sending these special characters or else you have to do some messy replace mechanism.

    HTH,


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


  • 6.  RE: Email Listener and Special Characters

    Posted Thu August 05, 2004 12:04 AM

    John,
    I guess all you need to do is encode the xml b4 sending via email… this will take care of the problem… and is your best bet…

    if sending encoded xml is not possible (outside your scope for change), I think you can overcome the issue by writing your own custom content handler… but, I think, you are better off not going that route… [besides the fact, I am not sure if this will be a working solution or not for email port]

    HTH,
    Saurabh.


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


  • 7.  RE: Email Listener and Special Characters

    Posted Mon January 24, 2005 05:23 PM

    Hi There,

       We are also facing similar issue with XML in email body contains "&AMP".When the flow service "getTransportInfo" is invoked to receive the email, we always end up in getting truncated XML body message. 
    

    If anybody has got any clue please give a shout.

    Thanks in advance,

    SAK


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