"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

LVL 7
culshajaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.