2014-09-12 76 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();

相關問題