调用 RestFul 服务
Calling RestFul Services
我正在尝试从 BizTalk 2013 R2 调用 RestFull 服务。我正在尝试使用 Http 适配器更改现有适配器并使用 Wcf-WebHttp Adapter
System.Diagnostics.EventLog.WriteEntry("ABC", Message_Datasheets(FILE.ReceivedFileName));
varNewSearchDataLoadURL = System.Configuration.ConfigurationManager.AppSettings["NewSearchDataLoadURL"];
varNewXmlMsg = new System.Xml.XmlDocument();
varNewXmlMsg.LoadXml(@"<path>" + Message_Datasheets(FILE.ReceivedFileName) + @"</path>");
Message_NewUnZip = varNewXmlMsg;
Message_NewUnZip(WCF.HttpMethodAndUrl) = @"<BtsHttpUrlMapping><Operation Name = 'RESTGet' Method ='GET'/></BtsHttpUrlMapping>";
Port_NewSearch_API(Microsoft.XLANGs.BaseTypes.Address) = varNewSearchDataLoadURL + "?path=" + Message_Datasheets(FILE.ReceivedFileName);
Port_NewSearch_API(Microsoft.XLANGs.BaseTypes.TransportType) = "WCF-WebHttp";
Message_NewUnZip(WCF.SuppressMessageBodyForHttpVerbs) = "GET";
我不确定这样做是否正确。我可以在不使用 BtsVariablePropertyMapping 的情况下调用而不创建模式并提升它吗?
下面的代码可以工作,无需使用 BtsVariablePropertyMapping
System.Diagnostics.EventLog.WriteEntry("ABC", Message_Datasheets(FILE.ReceivedFileName));
varNewSearchDataLoadURL = System.Configuration.ConfigurationManager.AppSettings["NewSearchDataLoadURL"];
varNewXmlMsg = new System.Xml.XmlDocument();
varNewXmlMsg.LoadXml(@"<path>" + Message_Datasheets(FILE.ReceivedFileName) + @"</path>");
Message_NewUnZip = varNewXmlMsg;
Message_NewUnZip(WCF.HttpMethodAndUrl) = @"<BtsHttpUrlMapping><Operation Name = 'RESTGet' Method ='GET'/></BtsHttpUrlMapping>";
Port_NewSearch_API(Microsoft.XLANGs.BaseTypes.Address) = varNewSearchDataLoadURL + "?path=" + Message_Datasheets(FILE.ReceivedFileName);
Port_NewSearch_API(Microsoft.XLANGs.BaseTypes.TransportType) = "WCF-WebHttp";
Message_NewUnZip(WCF.SuppressMessageBodyForHttpVerbs) = "GET";
我正在尝试从 BizTalk 2013 R2 调用 RestFull 服务。我正在尝试使用 Http 适配器更改现有适配器并使用 Wcf-WebHttp Adapter
System.Diagnostics.EventLog.WriteEntry("ABC", Message_Datasheets(FILE.ReceivedFileName));
varNewSearchDataLoadURL = System.Configuration.ConfigurationManager.AppSettings["NewSearchDataLoadURL"];
varNewXmlMsg = new System.Xml.XmlDocument();
varNewXmlMsg.LoadXml(@"<path>" + Message_Datasheets(FILE.ReceivedFileName) + @"</path>");
Message_NewUnZip = varNewXmlMsg;
Message_NewUnZip(WCF.HttpMethodAndUrl) = @"<BtsHttpUrlMapping><Operation Name = 'RESTGet' Method ='GET'/></BtsHttpUrlMapping>";
Port_NewSearch_API(Microsoft.XLANGs.BaseTypes.Address) = varNewSearchDataLoadURL + "?path=" + Message_Datasheets(FILE.ReceivedFileName);
Port_NewSearch_API(Microsoft.XLANGs.BaseTypes.TransportType) = "WCF-WebHttp";
Message_NewUnZip(WCF.SuppressMessageBodyForHttpVerbs) = "GET";
我不确定这样做是否正确。我可以在不使用 BtsVariablePropertyMapping 的情况下调用而不创建模式并提升它吗?
下面的代码可以工作,无需使用 BtsVariablePropertyMapping
System.Diagnostics.EventLog.WriteEntry("ABC", Message_Datasheets(FILE.ReceivedFileName));
varNewSearchDataLoadURL = System.Configuration.ConfigurationManager.AppSettings["NewSearchDataLoadURL"];
varNewXmlMsg = new System.Xml.XmlDocument();
varNewXmlMsg.LoadXml(@"<path>" + Message_Datasheets(FILE.ReceivedFileName) + @"</path>");
Message_NewUnZip = varNewXmlMsg;
Message_NewUnZip(WCF.HttpMethodAndUrl) = @"<BtsHttpUrlMapping><Operation Name = 'RESTGet' Method ='GET'/></BtsHttpUrlMapping>";
Port_NewSearch_API(Microsoft.XLANGs.BaseTypes.Address) = varNewSearchDataLoadURL + "?path=" + Message_Datasheets(FILE.ReceivedFileName);
Port_NewSearch_API(Microsoft.XLANGs.BaseTypes.TransportType) = "WCF-WebHttp";
Message_NewUnZip(WCF.SuppressMessageBodyForHttpVerbs) = "GET";