Web Service sample in .NET

Created: 2015-10-13 17:59:46

To run this sample, you should first set up a web service with the following C# code:

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services;

namespace TrabsEsicnece { [WebService(Namespace = "http://trabsescience.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] public class Service1 : System.Web.Services.WebService {

[WebMethod] public string Trabs(string input1, string input2) { Random rand = new Random(); int error = rand.Next(1, 100);

if (error > (100-Convert.ToInt32(input2))) { throw new Exception("Unknown error!"); }

int slp = Convert.ToInt32(input1);

System.Threading.Thread.Sleep(slp*1000); return "I've " + slp + " seconds"; } } }

Then you should add its WSDL sample into workflow and link:

- The output from first XML-Splitter goes into the WSDL service; - The output from WSDL service goes into the second XML splitter; - CalcTime should be executed after the WSDL service finishes.

Information Preview

Information Run

Run this Workflow in the Taverna Workbench...

Option 1:

Copy and paste this link into File > 'Open workflow location...'
http://www.myexperiment.org/workflows/4742/download?version=1
[ More InfoExpand ]


Information Workflow Components

Information Authors (0)
Information Titles (0)
Information Descriptions (0)
Information Dependencies (0)
Inputs (4)
Processors (4)
Beanshells (2)
Outputs (3)
Datalinks (9)
Coordinations (0)

Information Workflow Type

Taverna 2

Information Uploader

Information License

All versions of this Workflow are licensed under:

Information Version 1 (of 1)

Information Credits (0)

(People/Groups)

None

Information Attributions (0)

(Workflows/Files)

None

Information Tags (0)

None

Log in to add Tags

Information Shared with Groups (0)

None

Information Featured In Packs (0)

None

Log in to add to one of your Packs

Information Attributed By (0)

(Workflows/Files)

None

Information Favourited By (0)

No one

Information Statistics

 

Citations (0)

None


Version History

In chronological order:



Reviews Reviews (0)

No reviews yet

Be the first to review!



Comments Comments (0)

No comments yet

Log in to make a comment




Workflow Other workflows that use similar services (0)

There are no workflows in myExperiment that use similar services to this Workflow.