Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 1st, 2004, 12:15 AM
Registered User
 
Join Date: Aug 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error Updating document property using web service

Dear All
I am updating file properties using Lists.asmx web service of Sharepoint Portal Server 2003.

The Lists.asmx is also available for Windows SharePoint
Services. I have tried on SharePoint Portal server as well
as Sharepoint Portal Services and Lists.asmx is available
at both. And I am getting the same error at both location.
Please suggest.

I am trying the example given in Sharepoint SDK, after executing the example I am receiving the error as ‘ Invalid text value ‘My Field Type is single line text
following is my code any pointer for this error is highly appreciated –


// Declare and initialize a variable for the Lists Web Service.
spps.Lists listService = new spps.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://spps/_vti_bin/Lists.asmx";

//Create an XmlDocument object and construct a Batch element and its attributes.
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
System.Xml.XmlElement batchElement = doc.CreateElement("Batch");

/* Specify methods for the batch post using CAML. In each method include the ID of the item to update and the value to place in the specified column.*/
batchElement.InnerXml = "<Method ID='1' Cmd='Update'><Field Name='ID'>2</Field><Field Name='mycol'>ABCD</Field></Method>";

// Update list items.
System.Xml.XmlNode reElement =listService.UpdateListItems("DocumentLibrary", doc);
MessageBox.Show(this,reElement.OuterXml);

--------------------- ERROR I AM RECEIVING --------------------------
<Results xmlns="http://schemas.microsoft.com/sharepoint/soap/"><Result ID="1,Update"><ErrorCode>0x81020018</ErrorCode><ErrorText>Invalid text value
A text field contains invalid data. Please check the value and try again.</ErrorText>
-----------------------------------
Thanks in advance
----- Somesh (Please Mail Me)


 
Old June 24th, 2005, 11:26 PM
Registered User
 
Join Date: Aug 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am glad to say you that, I overcome this difficulty. I develop my new custom web service and put it in the ISAPI folder,
which is referred then as http://<Server Name>/_vti_bin/MyWebService.asmx
I use this custom developed web service in may next many projects.

To develop the custom web service you can find the article at :
Writing custom web service for Sharepoint
http://msdn.microsoft.com/library/en...rame=true&_r=1

The problem is in the Lists.asmx web service.
I confirm from Microsoft Support that, they have a problem in this web service. And they may find patch in there next release.
Link Specify the bug in Lists.asmx (Read the last paragraph ‘NOTE’)
http://www.msd2d.com/newsletter_tip....6-15798480bcf7








Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Service Error aliirfan84 .NET Web Services 0 February 14th, 2007 01:01 AM
Web Service Configuration Error DudeBori82 ASP.NET 2.0 Professional 0 November 13th, 2006 01:31 PM
Error to Add Web Reference from a Web service jdjbarrios ASP.NET 2.0 Professional 0 July 18th, 2006 02:58 PM
web service error redwood_lin Classic ASP Basics 6 January 6th, 2006 07:06 AM
Web service Compilation error belete Classic ASP Databases 1 June 28th, 2004 10:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.