2014-09-12 75 views
0

我收到一个名为Exception type的错误:EmptyPartException错误。我的工作是在邮件成功发送到sendPort之后发送邮件。使用的编排是 enter image description here ConstructMessage_3构造SucessMessage引用System.Xml.XmlDocument类型的Multipart消息SuccMsg。异常类型:BizTalk中的EmptyPartException错误

在Message_Assignment我

SuccEmailPort(Microsoft.XLANGs.BaseTypes.Address) = "mailto:[email protected]"; 
SucessMessage.SuccEmail = MsgVariable; 
SucessMessage(SMTP.CC) = "[email protected]"; 
SucessMessage(SMTP.Subject) = "Employee Feed"; 
SucessMessage(SMTP.From) = "[email protected]"; 
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 

我在做这个过程的权利,或者有没有其他的方式来做到这一点。我在这里做了什么错误。任何帮助将不胜感激。

+0

检查您的MsgVariable,如果它获得一个有效的xml文档。也不知道为什么内容类型被指定为文本/纯文本 – 2014-09-12 17:06:43

+0

MsgVariable指的是类型为System.Xml.XmlDocument的变量。 – trx 2014-09-12 17:10:37

回答

0

在表达式形状添加

SucessMessage =新System.Xml.XmlDocument();

相关问题