Using Coded Workflows for SOAP requests via the service definition file (requires Visual Studio)

Intro

This short tutorial is an extended showcase of how to use the Coded Workflows feature in Studio to send your SOAP request based on the definition file of your SOAP service.

I took my inspiration from this stackoverflow post and the following Microsoft documentation article.

As a working sample, we will use this service:
https://ecs.syr.edu/faculty/fawcett/Handouts/cse775/code/calcWebService/Calc.asmx

If you’d like to learn a bit more about the basics of Coded Workflows, please refer to my previous tutorials:

You can also consult our documentation over here.

Given that the guide is dedicated to more advanced users, I will not focus on details, and rather provide the major guidelines instead.

Step 1

Use the WCF Web Service Reference Provider Tool of Visual Studio to generate the reference code for your service.
You can either refer to the linked source material above or follow this short video:

After you are done, simply copy and paste the output Reference.cs file into your Studio project directory:
image => image

You can now close the Visual Studio project.

Step 2

Create a new Coded Workflow file in your Studio project, and use the source code from the reference file to execute your SOAP request:

Make sure that the correct namespace is added to your Coded Workflow file. In our case, it is a simple:

using Calculator;

Step 3

Be fancy. For this sample, our Coded Workflow returns an integer:
image

And we invoke it from the Main.xaml to get the result:

Project files

You can download the sample project below:
SOAPServiceSampleProject.zip (4.6 KB)

What do you think?

Feel free to share your feedback below. Our team is always listening :slight_smile:

2 Likes

@loginerror A great help for soap requests in windows based projects . will give a try for sure

1 Like