オーケストレーション内のメッセージ割り当てシェイプにこのエラーが表示されます。この割り当てシェイプ内で、WCFで受信したメッセージからbase64でエンコードされた文字列を抽出するXPathクエリを実行しようとしています。私は、私が書いたヘルパークラスによって生成されたストリームでXmlDocument変数をロードしようとしています。 base64文字列はPDFファイルまたはExcelファイルのいずれかの内容になります(注:これはXMLではありません)。私はこれができることを読んだ。ここでBizTalkメッセージ '<MessageName>'の 'part'に0バイトのデータが含まれています
は、私のメッセージの割り当てに使用される式である:ここでは
messageCreator = new IAS.Integration.Services.Helpers.MessageCreator();
System.Diagnostics.EventLog.WriteEntry("IAS.Integration.Services.Orchestration", "MessageCreator Object created");
base64 = xpath(PerformTransformationResponse, "string(/*[local-name()='PerformTransformationResponseWrapper' and namespace-uri()='http://www.iasreo.com/integration/servicetypes']/*[local-name()='TransformedPayload'])");
//System.Diagnostics.EventLog.WriteEntry("IAS.Integration.Services.Orchestration", System.String.Format("Base64 from xpath: {0}", base64));
Output = new System.Xml.XmlDocument();
System.Diagnostics.EventLog.WriteEntry("IAS.Integration.Services.Orchestration", "Output instantiated as XmlDocument");
messageCreator.CreateMyMessage(Output, base64);
System.Diagnostics.EventLog.WriteEntry("IAS.Integration.Services.Orchestration", "messageCreator.CreateMyMessage(Output, base64)");
は、私はこの表現をサポートするために書いたヘルパークラスです:
[Serializable]
public class MessageCreator
{
public void CreateMyMessage(XLANGMessage outMessage, string binaryStringMessage)
{
outMessage[0].LoadFrom(new StreamFactory(binaryStringMessage));
}
}
[Serializable]
public class StreamFactory : IStreamFactory
{
private string messageContent;
public StreamFactory(string inMessageContent)
{
messageContent = inMessageContent;
}
public Stream CreateStream()
{
byte[] messageBytes = Convert.FromBase64String(messageContent);
return new MemoryStream(messageBytes, 0, messageBytes.Length, true, true);
}
}
は最後に、これは私が受信エラーでありますイベントビューアで:
xlang/sエンジンイベントログエントリ:キャッチされない例外(下記の「内部例外」を参照)にはsuspeがありますサービス 'IAS.Integration.Services.Orchestrations.MainOrchestration(fcad6d68-ce54-bfa2-d035-56608b99ef52)'のインスタンスが見つかりました。 サービスインスタンスは、管理上再開または終了するまで中断されたままです。 インスタンスを再開すると、インスタンスは最後の永続状態から継続し、同じ予期しない例外を再スローする可能性があります。 のInstanceId:c398fd2a-b654-4981-be13-94146d640375 形名:Send_StreamedDocument ShapeId:からスローbc7a463b-eed2-4222-b2f7-3fdb1e44a3c5 例外:セグメント1、進捗25 内部例外:メッセージの一部 '一部' '出力'にはゼロバイトのデータが含まれます。
例外タイプ:EmptyPartException ソース:Microsoft.XLANGs.Engine ターゲットサイト:System.IO.Streamは(可能System.StringのByRef、ブール)永続 は、以下の例外が が発生した場所を識別するスタックトレースでありますMicrosoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.PrepareMessageでMicrosoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.StagePartData(その部分) でMicrosoft.XLANGs.Core.Part.Persist(文字列&符号化、ブールwantEncoding) (XLANGMessageでmsg、IList promoteProps、IList toPromote) Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.WriteMessageState(IBTPEPInfoLookup pepLookup、Guid portId、XLANGMe IList toPromote) at Microsoft.BizTalk.XLANGs.BTXEngine.BTXLogicalPortBinding.SendMessage(XLANGMessage msg、XlangStoreストア、Segment seg、OperationInfo op、IList additionalProps、IList toPromote、IListプロモート、 IList toPromote、Boolean ignoreRoutingFailure) Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage(Int32 iOperation、XLANGMessage msg、相関[] initCorrelations、相関[] followCorrelations、コンテキストcxt、セグメントseg、ActivityFlagsフラグ) at IAS.Integration Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(セグメントs、StopConditions stopCond、例外& EXP)で.Services.Orchestrations.MainOrchestration.segment1(StopConditions STOPON) **