• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2890
  • Last Modified:

"Exception of type Microsoft.SharePoint.SoapServer.SoapServerException was thrown." when calling UpdateList

Hi,

I am trying to execute the code attached and I just get the very helpful error message "Exception of type Microsoft.SharePoint.SoapServer.SoapServerException was thrown." Can anyone see what I am doing wrong?

James :-)


Dim w2 As New WSS2.Lists
            w2.Credentials = System.Net.CredentialCache.DefaultCredentials
            w2.Url = "http://fcssharepoint.dg.dgcouncil.net/TS/PM/ti/_vti_bin/Lists.asmx"
 
            Dim destinationListName As String
 
            destinationListName = "{576830B0-B9EA-4B7C-AA72-96D86E6E66ED}"
 
            Dim ndList As XmlNode = w2.GetList(destinationListName)
            Dim ndVersion As XmlNode = ndList.Attributes("Version")
 
            Dim xmlDoc As New System.Xml.XmlDocument()
            Dim ndProperties As XmlNode = xmlDoc.CreateNode(XmlNodeType.Element, "List", "")
            Dim ndTitleAttrib As XmlAttribute = CType(xmlDoc.CreateNode(XmlNodeType.Attribute, "Title", ""), XmlAttribute)
            Dim ndDescriptionAttrib As XmlAttribute = CType(xmlDoc.CreateNode(XmlNodeType.Attribute, "Description", ""), _
                XmlAttribute)
 
            ndTitleAttrib.Value = ndList.Attributes("Title").Value
            ndDescriptionAttrib.Value = ndList.Attributes("Description").Value
 
            ndProperties.Attributes.Append(ndTitleAttrib)
            ndProperties.Attributes.Append(ndDescriptionAttrib)
 
            Dim ndDeleteFields As XmlNode = xmlDoc.CreateNode(XmlNodeType.Element, "Fields", "")
            Dim ndUpdateFields As XmlNode = xmlDoc.CreateNode(XmlNodeType.Element, "Fields", "")
            Dim ndNewFields As XmlNode = xmlDoc.CreateNode(XmlNodeType.Element, "Fields", "")
 
            ndNewFields.InnerXml = "<Method ID=""1""><Field Type=""Boolean"" DisplayName= ""RFC""/></Method><Method ID=""1""><Field Type=""Boolean"" DisplayName= ""Post Project Task""/></Method>"
 
            
            Dim responseNode As XmlNode = w2.UpdateList(destinationListName, _
                                                        ndProperties, _
                                                        ndNewFields, _
                                                        ndUpdateFields, _
                                                        ndDeleteFields, _
                                                        ndVersion.Value)

Open in new window

0
culshaja
Asked:
culshaja
  • 2
1 Solution
 
Bob LearnedCommented:
Do you have the exception details?  Are you getting anything like 'Method not found' in the exception?

Bob
0
 
culshajaAuthor Commented:
Hi,

there was no other detail. I have fixed the issue now though. Turmns out the call should have been as noted below.

james :-)
Dim responseNode As XmlNode = w2.UpdateList(destinationListName, _
                                                        ndProperties, _
                                                        ndNewFields, _
                                                        ndUpdateFields, _
                                                        ndDeleteFields, _
                                                        ndVersion.Value)

Open in new window

0
 
culshajaAuthor Commented:
Oops that should have been
responseNode = w2.UpdateList(destinationListName, _
                                                            ndProperties, _
                                                            ndNewFields, _
                                                            Nothing, _
                                                            Nothing, _
                                                            ndVersion.Value)

Open in new window

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now