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?
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.
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…
User Name ******
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.
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
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.
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]
We are also facing similar issue with XML in email body contains "&".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,