I want to integrate with Warewolf
Warewolf was designed from the ground up to be as easy to integrate with as possible. All Warewolf services are exposed as restful web services by the Warewolf server. These services can that can be queried as XML or JSON.
Integrating with Warewolf is as simple as connecting to the URL of the Service that you wish to consume, and submitting a get request.
It is possible to integrate with Warewolf from any modern programming language with basic network capabilities.
Security is handled by windows authentication; as such the context under which, the calling process runs is important.
A full set of examples can be found in the examples folder, when installing Warewolf
Integrating from C#
public static XElement PostDataToWebserverAsRemoteAgent(string workflowName, string querystring, Guid requestID)
{
var postUrl = string.Format("http://localhost:3142/services/{0}?{1}", workflowName, queryString);
var req = WebRequest.Create(postUrl);
req.Credentials = CredentialCache.DefaultNetworkCredentials;
req.Method = "GET";
using(var response = req.GetResponse() as HttpWebResponse)
{
if(response != null)
{
using(var reader = new StreamReader(response.GetResponseStream()))
{
var output = reader.ReadToEnd();
return XElement.Parse(output);
}
}
}
return new XElement("<Error></Error>");
}
Integrating from JavaScriptfunction loadData(callback) {
var oReq = new XMLHttpRequest();
oReq.withCredentials = true; //Required to ensure that Warewolf Server correctly authenticates.
oReq.open("GET", "<a href="http://localhost:3142/services/Sample Project/GetCategoryTable.json">http://localhost:3142/services/Sample Project/GetC...</a> true);
oReq.onload = function (e) {
var data = oReq.responseText // The data received from the workflow execution.
callback(data);
}
oReq.send();
}Kundesupport af UserEcho