469,625 Members | 1,059 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

SharePoint UpdateList--Problem--Help

I am building an ASP.Net site and wish to use a SharePoint to hold the information. I am trying to add an entry to a list using Sharepoint webservices and keep getting a SOAP exception. I have know its not a credential problem because I have been successful in using the GetList to bind a list to a gridview. I am running Windows Sharepoint Services 3.0



I created an empty list and wish to use the UpdateList webservice to add an item (row) to a list. I have one column in the list "Title" and wish to grab data from a textbox and update the list.



Here is the code I am using:



Expand|Select|Wrap|Line Numbers
  1. Dim doc As New XmlDocument
  2.         Dim updates As XmlElement = doc.CreateElement("Batch")
  3.  
  4.         updates.InnerXml = "<Method ID='1' Cmd='New'><Field
  5. Name='Title'>" + TextBox1.Text + "</Field></Method>"
  6.  
  7.         Dim returnNode As XmlNode =
  8. VideoLists.UpdateListItems("{B3D403D3-73BB-49C7-AD83-9008E085C74C}",
  9. updates)


The error message

Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerExcepti on'
was thrown.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Web.Services.Protocols.SoapException:
Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerExcepti on'
was thrown.

Source Error:

Line 665:
[System.Web.Services.Protocols.SoapDocumentMethodAt tribute("http://schem
as.microsoft.com/sharepoint/soap/UpdateListItems",
RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/",
ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/",
Use=System.Web.Services.Description.SoapBindingUse .Literal,
ParameterStyle=System.Web.Services.Protocols.SoapP arameterStyle.Wrapped)
]
Line 666: public System.Xml.XmlNode UpdateListItems(string
listName, System.Xml.XmlNode updates) {
Line 667: object[] results = this.Invoke("UpdateListItems",
new object[] {
Line 668: listName,
Line 669: updates});

Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary
ASP.NET
Files\vchannvideo\1d71390d\8e1d0fde\App_WebReferen ces.fp3a0m8w.0.cs
Line: 667

Stack Trace:

[SoapException: Exception of type
'Microsoft.SharePoint.SoapServer.SoapServerExcepti on' was thrown.]

System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapCl
ientMessage message, WebResponse response, Stream responseStream,
Boolean asyncCall) +1547
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters) +205
collwss.Lists.UpdateListItems(String listName, XmlNode updates) in
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
Files\vchannvideo\1d71390d\8e1d0fde\App_WebReferen ces.fp3a0m8w.0.cs:667
ad.Button1_Click(Object sender, EventArgs e) in C:\Documents and
Settings\JG7523\My Documents\Visual Studio
2005\WebSites\VCHANNVideo\ad.aspx.vb:54
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
System.Web.UI.WebControls.Button.RaisePostBackEven t(String
eventArgument) +97

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.Rai
sePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+4919
May 8 '07 #1
1 3973
NeoPa
32,202 Expert Mod 16PB
I'm afraid, particularly bearing in mind the fully worded and explained question, that this doesn't really fit into the Access Forum very well. I personally, know very little about SharePoint so I wouldn't even know which forum, if any, it would be better suited to.
In the circumstances, I can't think you'll be lucky enough to find a helpful answer. If however, you think another forum here may suit this question better, then please just ask and I will get it moved for you.

Sorry I couldn't be of more help :(
May 15 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Michael S | last post: by
reply views Thread by Joe L via .NET 247 | last post: by
3 posts views Thread by Robin | last post: by
15 posts views Thread by (PeteCresswell) | last post: by
8 posts views Thread by GaryDean | last post: by
20 posts views Thread by Neil | last post: by
2 posts views Thread by =?Utf-8?B?S2plbGw=?= | last post: by
reply views Thread by ivandatasync | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.