This project has moved and is read-only. For the latest updates, please go here.

Workflow web service error

Jun 10, 2010 at 10:46 PM

I'm trying to call the Workflow web service operations--GetWorkflowDataForItem, GetToDosForItem, GetTemplatesForItem, and GetWorkflowTaskData--on list items, and I'm receiving the following error in the SOAP response:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="" xmlns:xsi="" xmlns:xsd="">
<faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring>
<detail><errorstring xmlns="">Value does not fall within the expected range.</errorstring></detail>

I am passing the URL of the list item on which I want Workflow data, which has the format http(s)://server/site/Lists/ListName/DispForm.aspx?ID=5 (I've also tried http(s)://server/site/Lists/ListName?ID=5, and several other variations).  In this case, it's the Announcements list, but I've tried with other custom lists with the same result.  I have successfully called the workflow service operations on items in a Document Library, which have the format http(s)://server/site/DocLib/document.doc, and I've only ever seen Document Library item URLs used in the Workflow web service documentation, blogs, examples, and such.

So my question is: can the Workflow Web Services be called for custom list items, or does the service only work for document library items?  If it can work for a custom list, how would I format the URL input parameter?  Any help with this would be very much appreciated.

Jun 14, 2010 at 4:56 AM


Sorry for the delayed response. Could you post the calls you are trying to make so that I can try to reproduce the issue in my environment?  To be honest, I haven't done much with the Workflow Web Service since I added it to SPServices, but I'd be happy to take a look.


Jun 14, 2010 at 2:19 PM

Hi Marc,

I broke rule #1 of help forums, and didn't post my code!  Sorry about that.  Here are the calls (sanitized) that result in the error response above:

  operation: "GetWorkflowDataForItem",
  webURL: "https://domain/site",
  item: "https://domain/site/Announcements?ID=5",
  completefunc: function(xdata, status) {

where 'workflowData' is the jQuery object wrapping the DOM element into which I'm inserting the text.  The above call yields the error I posted above.  The following call, however, successfully returns workflow data:

  operation: "GetWorkflowDataForItem",
  webURL: "https://domain/site",
  item: "https://domain/site/page.html",
  completefunc: function(xdata, status) {

 Any help you could give me would be very much appreciated!

Jun 14, 2010 at 2:42 PM


Have you tried this syntax for the item URL


where 5 is the item's ID?


Jun 14, 2010 at 3:09 PM


I had tried that format during my thrashings, as that is the format returned by GetListItems, with the same result.  However, encouraged by your above post, I tried several different iterations of that format, and found one that worked:


The problem I had in previous attempts using this format was that I used the literal string copied from the response from GetListItems, which included unencoded spaces in the URL.  When I replaced the spaces with '%20', the call succeeded.

Thank you very much, Marc, for your helpful response and for your great jQuery library!



Jun 14, 2010 at 3:12 PM

Awesome. Glad you got it working. Gotta love the SDK for stuff like this. Clear as mud would be a complement.