EAI XML Converter一般都会和EAI Siebel Adapter联合一起用,代码中主要是使用IntObjHierToXMLDoc方法,可以做借鉴。
后期如果整理出其他方法会持续更新
var bsQuoteMsg = TheApplication().GetService("EAI Siebel Adapter"); var psInputs = TheApplication().NewPropertySet(); var psOutputs = TheApplication().NewPropertySet(); if(objId != "") { psInputs.SetProperty("PrimaryRowId",objId); } psInputs.SetProperty("OutputIntObjectName",intObjectName); if(searchExpr != "") { psInputs.SetProperty("SearchSpec",searchExpr); } psInputs.SetProperty("ExecutionMode", "ForwardOnly"); bsQuoteMsg.InvokeMethod("Query", psInputs, psOutputs); //var serialNo = "GCRM"+psOutputs.GetChild(0).GetProperty("MessageId") var serialNo = GetMessageIdByDateTime(); var sblMsg = psOutputs.GetChild("SiebelMessage"); var numOutputObjects = psOutputs.GetProperty("NumOutputObjects"); //数据转换 var bsCon = TheApplication().GetService("EAI XML Converter"); var psInputsCon = TheApplication().NewPropertySet(); var psOutputsCon = TheApplication().NewPropertySet(); psInputsCon.SetProperty("EscapeNames","false"); psInputsCon.SetProperty("GenerateNamespaceDecl","false"); psInputsCon.SetProperty("UseSiebelMessageEnvelope","false"); psInputsCon.SetProperty("GenerateProcessingInstructions","false"); psInputsCon.AddChild(sblMsg); bsCon.InvokeMethod("IntObjHierToXMLDoc", psInputsCon, psOutputsCon); var conMsg = psOutputsCon.GetValue(); var realMsg = conMsg.substring(38);
时间: 2024-12-15 01:19:57