Skip to main content

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 :

Empty Web Request.png

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.

 

SOAP.png

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:

 

Web Request.png

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.

Good stuff! Thanks for sharing Vadim.

Now off to make magic happen in the cloud!


A giant leap forward!.


Hi Abhjeet,

you can't modify Nintex Forms with SPD.  That is not supported.

But if you want to customize a SharePoint page with SPD, that is definitely do-able.

cheers,

Vadim


Hi Vadim,

thanks for your post.

I'm struggling with the Web Service GetUserCollectionFromGroup.

The Web Request itself runs successfully. But as soon as I want to store the Content Response in a variable, I get the following error message: "Invalid text value. A text field contains invalid data. Please check the value and try again."

Here are some screenshots:

2015-03-20_15-12-50.jpg

2015-03-20_15-15-45.jpg

2015-03-20_15-22-07.jpg


Hi Raphael,

unfortunately, I was not able to reproduce this.  It works fine when I tested it out on my tenant.

I'd suggest you reach out to Nintex Support.

cheers,

Vadim


Learning: The content response gets stored in a text variable. I had to define how many characters the variable contains. If this value is higher than 255, the workflow can’t handle it and crashes. Like the name of the web service says, it should be possible to store it in a collection variable. Anyway, I wasn't able to store the whole information:

WF1.jpg


Just to add to this, the limitation is not the number of characters that a Text variable can hold.

It's the limitation of SharePoint and how many characters it can log into the history list.  That is why the Extract Substring action was used above.  To pull out a specific number of characters from the response from the Web Request, store it in another variable and log that.

cheers,

Vadim


Hi Tony,

so when it comes to that web service, when it asks for the LoginName, the only format that has worked for me, is this :

i:0#.f|membership|<email address>

I tried the email address, just the account name and they didn't work.  But the above format worked.

Not sure if that will help you.

cheers,

vadim


Hi Tony,

The web service action, when used in a workflow on a document library, has the ability to pass the current item along in the SOAP call.


Hi,



 



I have to send information from Nintex online to Springboard, so I have to use the Soap call web service.



Is anyone knows how to create the Web request and call the web service? and how to generate the header for Soap web service with Nintex workflow?



 



Thanks,


Can anybody complete a basic auth request with the supplied username and password fields? 

also, when returning a token in the response of a WebRequest is there a way to store it in not a text variable? It seems that these are capped at 255 char. 


Reply