Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.

$
0
0

Hello

I am using following code from http://msdn.microsoft.com/en-us/library/office/ms429658(v=office.14).aspx to pull the data from SharePoint 2003. I am pulling data from IssueList where Ihave total 7000+ Issues and n number of version with each issue. If you clubbed Issues and their versions it is coming as 62000. My Min Issue Id is 15 and max Issue Id is 56234. Lot of issue deleted in last five years, that is why issue ID is increased to 56234. Using following code I can fetch the rowcount till 45000, once I creased to 45000 to 45100 o3 more than 45000, it is throwing "Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown. " error. I am not sure what is the cause and how do I pull all the items, please advise

/*Declare and initialize a variable for the Lists Web service.*/
ListsWebSrv.Lists listService = new ListsWebSrv.Lists();
/*Authenticate the current user by passing their default 
credentials to the Web service from the system credential cache.*/
//listService.Credentials = System.Net.CredentialCache.DefaultCredentials;
/*Set the Url property of the service for the path to a subsite.*/
listService.Url = "http://Server_Name/Subsite_Name/_vti_bin/Lists.asmx";
listService.Credentials = new NetworkCredential(struserid,strpwd,strdomain);
/* Instantiate an XmlDocument object */
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
string listName = "{63831A37-5073-4A2F-807F-1C43724A2BEA}";
string rowLimit = "45000";
/*Use the CreateElement method of the document object to create 
elements for the parameters that use XML.*/
System.Xml.XmlElement query = xmlDoc.CreateElement("Query");
System.Xml.XmlElement viewFields = xmlDoc.CreateElement("ViewFields");
System.Xml.XmlElement queryOptions = xmlDoc.CreateElement("QueryOptions");
/*To specify values for the parameter elements (optional), assign 
CAML fragments to the InnerXml property of each element.*/
query.InnerXml = "<Where><Or><IsNull> <FieldRef Name='Title' /></IsNull><IsNotNull><FieldRef Name='Title' /></IsNotNull></Or></Where>";
viewFields.InnerXml = "<FieldRef Name=\"Title\" /><FieldRef Name=\"IssueID\" />";
queryOptions.InnerXml = "<ViewAttributes Scope='RecursiveAll'/>";
/* Declare an XmlNode object and initialize it with the XML response 
from the GetListItems method. The last parameter specifies the GUID 
of the Web site containing the list. Setting it to null causes the 
Web site specified by the Url property to be used.*/
System.Xml.XmlNode nodeListItems = listService.GetListItems(listName,"", query, viewFields,rowLimit, queryOptions);
/*Loop through each node in the XML response and display each item.*/
foreach (System.Xml.XmlNode listItem in nodeListItems)
{
	// label1.Text += listItem.OuterXml;
}


Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>