locked
Subscribing System not able to parse xml attachment sent via email? RRS feed

  • Question

  • In my existing integration i have to send message as attachment to destination system.

    My destination system is TIBCO and it is trying parse the attachment, but when it is trying to parse that message they were  unable to due to few special char

    Can any one let me know if any property can suppress such character

    Friday, June 19, 2015 6:52 PM

Answers

  • You can try casting XYZData to an XmlDocument variable then serializing to a string variable using the .OuterXml property.  Then use that string variable as the attachment.
    • Marked as answer by Angie Xu Thursday, July 9, 2015 2:04 AM
    Monday, June 29, 2015 11:25 AM
    Moderator

All replies

  • This seems like BOM (Byte Order Mark). which pipeline you are using to assemble the message. Check Removing the BOM from Outgoing BizTalk Files blog post, I hope this may help you. 

    Greetings,HTH
    Naushad Alam

    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
    alamnaushad.wordpress.com

    Friday, June 19, 2015 8:28 PM
    Moderator
  • How good are you debate skills? :)  This is a case where both sides can credibly argue there interpretation is correct.

    Meaning a node called textContent contains text and since the BOM is a feature of text content, it can be there.

    Or, since the content is escaped, the encoding should be the same as the containing document, hence, the BOM is either superfluous or possible wrong.

    I lean slightly toward the latter so, it's on you to fix it.

    To give any advice, we need to know where the content of textContent comes from exactly.

    Saturday, June 20, 2015 12:16 PM
    Moderator
  • Hi,

    There is a setting on the XML Assembler component called 'PreserveBOM'. When you change this setting to False, the Byte Order Mark characters will be omitted in the sent message.

    For Reference you can look into below MSDN article

    How to delete a byte order mark from an outgoing message in BizTalk Server

    BizTalk Toolkit 2.1 ESB Add Namespace Pipeline Component and Encoding

    Thanks

    Abhishek

    Sunday, June 21, 2015 3:44 AM
  • Even after i set the Preserve Byte Order Mark property to False.

    Client is still reporting that they are gtting special char. Can any one suggeset me what could be the possible cause?

    Thursday, June 25, 2015 7:53 PM
  • We need to know where that text comes from exactly.
    Friday, June 26, 2015 12:38 AM
    Moderator
  • check whether the source system is sending up these special characters and check the encoding of your source and destination systems supports with.

    Are you reading the data into the stream and doing any manipulations at your pipeline/orchestration before being sent as an attachment? If yes, make sure to preserve your encodings according to agreed standards.


    Regards, Vignesh S

    Friday, June 26, 2015 3:49 AM
  • I am reading data from Teradata and attaching the message to attachment and sending it to client.

    I am using multipart mesage where

    body part is string---> which i am passing as blank.

    Attachment is the message type---> attaching message to it.


    msg.EmailBody ="";
    msg.EmailAttachment = XYZData;
    msg.EmailAttachment(MIME.FileName)="XYZData.xml";
    msg.EmailAttachment(Microsoft.XLANGs.BaseTypes.ContentType) = "text/xml";
    msg(SMTP.MessagePartsAttachments)=2;
    msg(SMTP.From)="BizTalk@XYZ.com";
    msg(SMTP.Subject)="DATA CONTENTS";
    msg(SMTP.SMTPHost) = "XYZ";
    EmailDATA(Microsoft.XLANGs.BaseTypes.Address)= "mailto:"+"Email address";

    Friday, June 26, 2015 7:10 AM
  • So, what exactly is XYZData?  A Typed (Schema) message, a String, XmlDocument?

    One option might be to execute a Send Pipeline with the XmlAssembler with it's Preserve Byte Order Mark = false in the Orchestration before creating the SMTP message.

    https://msdn.microsoft.com/en-us/library/aa562035.aspx

    Note however, the BOM is standard for UTF-8 encoded streams so the problem is really on their side.  I would first gently push back asking them to be more 'compliant'.  If they can't or refuse, make sure your management understands that this is their problem and you're spending extra time accommodating them.

    Friday, June 26, 2015 12:06 PM
    Moderator
  • XYZData is typed message
    Sunday, June 28, 2015 2:51 AM
  • Hi Mate ,

    This issue is much more related to incoming message from your partner end . As been suggested by Boatseller better option is to validate this from your partner end so that specific standard can be followed .

    Or else you need to go ahead with custom Pipeline component to remove the specific character from incoming message .

    Link : How to remove invalid character in incoming XML message using custom pipeline component

    Thanks

    Abhishek

    Monday, June 29, 2015 5:15 AM
  • You can try casting XYZData to an XmlDocument variable then serializing to a string variable using the .OuterXml property.  Then use that string variable as the attachment.
    • Marked as answer by Angie Xu Thursday, July 9, 2015 2:04 AM
    Monday, June 29, 2015 11:25 AM
    Moderator