We will create a new web service which will be used in the following steps
- (page 2 of 6)
We will build a new web service in .net, though any other language (eg Java) may be used. More details instructions for creating a web service can be found in the Microsoft documentation. In this step I will provide the source code.
The web service defines a single method called GetInformation which takes a string parameter and returns a string.
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
namespace WorkflowWebServices
{
/// <summary>
/// Summary description for Test.
/// </summary>
[WebService(Namespace="http://antorg.com/workflowwebservices")]
public class Test : System.Web.Services.WebService
{
public Test()
{
//CODEGEN: This call is required by the ASP.NET Web Services Designer
InitializeComponent();
}
#region Component Designer generated code
//Required by the Web Services Designer
private IContainer components = null;
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
#endregion
#region TaskInformationWebService Members
[WebMethod]
public string GetInformation(long workflowInstance, string activityName, string parameter)
{
return "Hello world: "+parameter;
}
#endregion
}
}