0

我收到一个称为异常类型的错误: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

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

4

1 回答 1

0

在表达式形状中添加

SucessMessage = new System.Xml.XmlDocument();

于 2014-10-04T13:11:43.943 回答