【问题标题】:Exception type: EmptyPartException error in Biztalk异常类型:Biztalk 中的 EmptyPartException 错误
【发布时间】:2014-09-12 15:36:13
【问题描述】:

我收到一个称为异常类型的错误:EmptyPartException 错误。我的工作是在消息成功发送到 sendPort 后,发送一封电子邮件。使用的编排是, ConstructMessage_3 构造 SucessMessage,它引用 System.Xml.XmlDocument 类型的 Multipart 消息 SuccMsg。

在 Message_Assignment 下我有

SuccEmailPort(Microsoft.XLANGs.BaseTypes.Address) = "mailto:abc@gmail.com";
SucessMessage.SuccEmail = MsgVariable;
SucessMessage(SMTP.CC) = "abc@xyz.org";
SucessMessage(SMTP.Subject) = "Employee Feed";
SucessMessage(SMTP.From) = "BizTalk@sample.com";
SucessMessage(SMTP.EmailBodyText) = "The Upload Failed";
SucessMessage(SMTP.MessagePartsAttachments) = 1;
SucessMessage(SMTP.SMTPHost) = "smtp.mycompany.org";
SucessMessage(SMTP.SMTPAuthenticate) = 0;
SucessMessage(SMTP.EmailBodyTextCharset)="UTF-8";
SucessMessage.SuccEmail(Microsoft.XLANGs.BaseTypes.ContentType) = "text/plain";
SucessMessage.SuccEmail(MIME.FileName) = "emp.txt";

这里的 MsgVariable 指的是类型为 System.Xml.XmlDocument 的变量。尝试发送消息时,收到了消息,但没有收到电子邮件。它向我显示错误,

xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'ErrorHandling.Orchestration_1
The service instance will remain suspended until administratively resumed or terminated.
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId:
Shape name: Send_3
ShapeId:
Exception thrown from: segment 2, progress 14
Inner exception: The part 'SuccEmail' of message 'SucessMessage' contains zero bytes of data.
Exception type: EmptyPartException

我是在做正确的过程还是有其他方法可以做到这一点。我在这里犯了什么错误。任何帮助将不胜感激。

【问题讨论】:

  • 检查您的 MsgVariable,如果它被分配了一个有效的 xml 文档。也不知道为什么内容类型被分配为 text/plain
  • MsgVariable 指的是类型为 System.Xml.XmlDocument 的变量。

标签: biztalk biztalk-2010 biztalk-orchestrations


【解决方案1】:

在表达式形状中添加

SucessMessage = new System.Xml.XmlDocument();

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-08
    • 1970-01-01
    • 2012-02-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多