Lists.asmx, GetList and “Value cannot be null”

I discovered today that the GetList() method in lists.asmx web service has to be called very carefully or it’s prone to throw a mysterious “Value cannot be null” exception (and that’s assuming you can get past the even worse generic error message, “Exception of type ‘Microsoft.SharePoint.SoapServer.SoapServerException’ was thrown.”)  Specifically, I found that you can’t provide any kind of prefix on the GetList method.  The following jQuery snippet illustrates the point:


If you do that, the web service responds with “Value cannot be null” as per this fiddler-provided HTTP transcript:

<?xml version="1.0" encoding="utf-8"?>

        Exception of type ‘Microsoft.SharePoint.SoapServer.SoapServerException’ was thrown.
        <errorstring xmlns="">
Value cannot be null.

Of course, you probably wouldn’t add that “s0” prefix on your own, but some tools are prone to do it (like Eclipse).

This is all the more confusing / frustrating because other methods tolerate prefixes.  For instance, the GetListCollection method doesn’t mind if it’s been prefixed, even with nonsense prefixes like “xyzzy”:


This “value cannot be null” seems fairly common with lists.asmx so hopefully this will help someone out in future.


Subscribe to my blog.

Follow me on Twitter at

One thought on “Lists.asmx, GetList and “Value cannot be null”

Leave a Reply

Your email address will not be published. Required fields are marked *