オーケストレーション内のメッセージ割り当て図形でこのエラーを受け取りました。この代入シェイプ内で、XPath クエリを実行して、WCF が受信したメッセージから base64 でエンコードされた文字列を抽出しようとしています。次に、作成したヘルパー クラスによって生成された Stream を使用して XmlDocument 変数を読み込もうとしています。base64 文字列は、PDF または Excel ファイルの内容になります (注: これは XML ではありません)。これができると読んだことがあります。
これが私のメッセージ割り当てで使用された表現です:
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 エンジン イベント ログ エントリ: キャッチされない例外 (以下の「内部例外」を参照) により、サービス「IAS.Integration.Services.Orchestrations.MainOrchestration(fcad6d68-ce54-bfa2-d035-56608b99ef52)」のインスタンスが中断されました。サービス インスタンスは、管理上再開または終了されるまで中断されたままになります。再開された場合、インスタンスは最後に永続化された状態から続行され、同じ予期しない例外が再スローされる可能性があります。InstanceId: c398fd2a-b654-4981-be13-94146d640375 Shape name: Send_StreamedDocument ShapeId: bc7a463b-eed2-4222-b2f7-3fdb1e44a3c5 スローされる例外: セグメント 1、進行状況 25 内部例外: メッセージ 'Output' の部分 'part' にゼロが含まれていますバイトのデータ。
例外の種類: EmptyPartException ソース: Microsoft.XLANGs.Engine ターゲット サイト: System.IO.Stream Persist(System.String ByRef, Boolean) 以下は、Microsoft.XLANGs.Core.Part で例外が発生した場所を特定するスタック トレースです。 .Persist(String& encoding, Boolean wantEncoding) at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.StagePartData(Part part) at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.PrepareMessage(XLANGMessage msg, IList PromoteProps, IList toPromote) Microsoft. Microsoft.BizTalk.XLANGs.BTXEngine.BTXLogicalPortBinding.SendMessage( XLANGMessage メッセージ、Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage (Int32 iOperation、XLANGMessage msg、Correlation[] initCorrelations、Correlation[] followCorrelations、Context cxt、 Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)**ActivityFlags フラグ) IAS.Integration.Services.Orchestrations.MainOrchestration.segment1(StopConditions stopOn) で Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)**ActivityFlags フラグ) IAS.Integration.Services.Orchestrations.MainOrchestration.segment1(StopConditions stopOn) で Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)**