Calling Restful Services Dynamically

I have an existing orchestration which calls the services with the below configuration.

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(HTTP.RequestTimeout) = 3600;
Port_NewJaxMiceSearch_API(Microsoft.XLANGs.BaseTypes.Address) = varNewSearchDataLoadURL + "?path=" + Message_Datasheets(FILE.ReceivedFileName);
Port_NewJaxMiceSearch_API(Microsoft.XLANGs.BaseTypes.TransportType) = "HTTP"

Here NewSearchDataLoadURL holds the address of the webservice that needs to be called in the config file.And the path holds the received file name.So the called URI will be "http://new.abc.org/AbcSearchWebApi/api/search/loaddatafeed?path=\\share01\BizTalk\data\out\20150723" 

Now I have to change that to the Restful services which uses WebHttp Adapter. I am trying to follow the here

but I dont understand the BtsVariablePropertyMapping because I dont have schema that has the value to be promoted. How can I approach this. Any help will be greatly appreciated.


  • Edited by vdha Thursday, July 23, 2015 12:16 PM
July 23rd, 2015 12:15pm

Thanks Pi_xel_xar

But the \\share01\BizTalk\data\out\20150723  is dynamic. It is nothing but the path of the Received File Name. It keeps changing according to the File name. I get it using the property

Message_Datasheets(FILE.ReceivedFileName)

In the line

Port_NewJaxMiceSearch_API(Microsoft.XLANGs.BaseTypes.Address) = varNewSearchDataLoadURL + "?path=" + Message_Datasheets(FILE.ReceivedFileName);


Also can you give me an example how can I use in variable mapping because in the link I mentioned they are using the promoted property in schema.
  • Edited by vdha Thursday, July 23, 2015 1:53 PM
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2015 1:52pm

The below code works, without using the 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";
July 27th, 2015 10:46am

Can you please let us know why do u use a dynamic configuration here as static configuration can be done in this case.

Its always good to use Static ports instead of dynamic if its possible.

Free Windows Admin Tool Kit Click here and download it now
July 28th, 2015 2:29am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics