SPServices GetListItems throws intermittent issue

Dec 3, 2012 at 10:25 PM
Edited Dec 3, 2012 at 11:25 PM

Hello,

 

Please help!

 

I am using jquery.SPServices-0.7.2.min.js , and calling SPServices GetListItems in the following fashion. It is working intermittently and throws error in xData status

Error message:

xData
{...}
    readyState: 4
    responseText: "<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring><detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">Method not found: 'Microsoft.SharePoint.Utilities.SPChunkedStringBuffer Microsoft.SharePoint.SPListItemCollection.GetXmlInternal(Boolean, System.Collections.Hashtable, Boolean, Boolean)'.</errorstring></detail></soap:Fault></soap:Body></soap:Envelope>"
    responseXML: {...}
    status: 500
    statusText: "Internal Server Error"

 

Function Call:

 

function TestThis(companyName)
    {
       

         
         var issueColors = '';
        $().SPServices({
                    operation: 'GetListItems',
                    async: false,
                    listName: '4dfa0b5f-213f-4126-bb7b-72daa7ee29bd',
                    CAMLViewFields: '<ViewFields><FieldRef Name="IssueColor" /><FieldRef Name="Title" /></ViewFields>',
                    completefunc: function (xData, Status) {
                    //debugger;
                        //alert(xData.responseXML.innerXML);
                        $(xData.responseXML).find("z\\:row, row").each(function() {
                       
                        var issueColor = $(this).attr('ows_IssueColor');
                        var compName = $(this).attr('ows_Title');
                        if ( companyName.toUpperCase() == compName.toUpperCase() )
                        {
                            issueColors +=  issueColor + ',';
                        }
                   
   
                      });
                    }
          });
         

         

    }

Coordinator
Dec 4, 2012 at 1:33 PM

I haven't seen that error before. Do you have any custom fieldtypes on your list?

M.

Dec 4, 2012 at 2:33 PM

No custom fieldtypes in the list. When debug the jQuery source code on GetListItems call, at the ajax call code , received the following error. And this error is intermittent. Status 500, Internal server error.. Do you think this is because something went wrong at server side?

 

Error message:

xData
{...}
    readyState: 4
    responseText: "<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring><detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">Method not found: 'Microsoft.SharePoint.Utilities.SPChunkedStringBuffer Microsoft.SharePoint.SPListItemCollection.GetXmlInternal(Boolean, System.Collections.Hashtable, Boolean, Boolean)'.</errorstring></detail></soap:Fault></soap:Body></soap:Envelope>"
    responseXML: {...}
    status: 500
    statusText: "Internal Server Error"

Coordinator
Dec 4, 2012 at 4:24 PM

Well, the responseText is coming from the server, so yes, it's a problem server-side. Try using the list's name rather than the GUID.

M.