With the release of the Nintex Workflow for Office 365 Web Request action, it opens a whole new world of functionality to your Nintex Workflows. SharePoint online still exposes a number of ASMX web web services. You can now call those web services and get the data or update data as you need it.
Not only can you call ASMX web services, but you can also perform HTTP GETs, POSTs, PUTs and you can also build your own HTTP packets for your requests.
In this post, you'll see how to make a call to an ASMX web service. Specifically, the SharePoint Lists.asmx web service, in order to call the GetList web method.
This is what the Web Request action looks like :
Calling an ASMX Web Service
You can build up the url dynamically, using common properties, or for testing, you can simply put in the entire URL.
eg. http://mysite.sharepoint.com/_vti_bin/Lists.asmx
Once that is placed in the URL field, you can choose the appropriate Method. Usually, either SOAP 1.1 or SOAP 1.2 for ASMX web services. In this example, we'll use SOAP 1.1.
When you select SOAP 1.1, you'll be provided with a "Soap action" field to fill in. To find out what you need to put in there, navigate to the ASMX page, click on the web method you're interested in and you'll see the SOAP Action.
SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/GetList"
The data you need to enter into the Soap action field is what you see in the quotation marks.
The next part, is the SOAP packet itself. This is also something you can get from accessing the ASMX web service in a browser and seeing what the packet looks like.
Once you have all the fields filled in, you'll need to store the response in a Text variable. That's the final step of making a web service call, using the new Web Request action. The Web Request action will look something like this:
The Web Request Response
The data that comes back from the Web Request can be in a number of formats. Flat text, XML, or JSON.
When calling an ASMX web service, the data that comes back is in XML format. You can then use the Query XML action to pull information out of it, store it in Nintex Workflow variables and use the data throughout your workflow.
There are many web services in SharePoint and you can call all of those using the Web Request action.
Feel free to share what you use it for, as a lot of readers in the community would be really interested in seeing what can be done.