Consuming REST services in OpenSpan
This topic is about consuming REST web services in OpenSpan. Problem Statement Process to be automated involves REST service calls to retrieve data from a website. OpenSpan only supports WSDL services and therefore calls for creating a custom component that can be integrated with OpenSpan. Solution Creation of C# based custom component that takes 3 parameters namely URL, Method and Body and output the JSON string result. This result can be further parsed by converting it into XML and later on iterating through the required nodes. Automation Logic Calling Rest Web Service via C# public void CreateObject(string _URL, string _BODY, string _method, out string response) { string URL = _URL.Trim(); string DATA = _BODY.Trim(); response=string.Empty; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL); request.Method = _method; request.ContentType = "application/json"; request.Conte