<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Web Services</title><link>https://www.infopathdev.com:443/forums/48.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: UpdateListItem on a Form Library</title><link>https://www.infopathdev.com:443/forums/thread/31454.aspx</link><pubDate>Thu, 14 Aug 2008 12:46:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31454</guid><dc:creator>mjaneczk</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31454.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=31454</wfw:commentRss><description>&lt;p&gt;Anyone?&lt;/p&gt;</description></item><item><title>UpdateListItem on a Form Library</title><link>https://www.infopathdev.com:443/forums/thread/31444.aspx</link><pubDate>Wed, 13 Aug 2008 19:11:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:31444</guid><dc:creator>mjaneczk</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/31444.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=48&amp;PostID=31444</wfw:commentRss><description>&lt;p&gt;This is probably teh last hurdle I have to overcome to finish my project, so I am anxious, especially since I have come this far.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I have a form library from which I read all the columns into a repeating table.&amp;nbsp; The user will select, via checkbox, which ones he wants to process.&amp;nbsp; Upon clickign a button, I use some C# code to process all the records in that table.&amp;nbsp; No problem, there.&amp;nbsp; Now, I need to update one of the columns in hte underlying form library, markign the record as &amp;quot;done&amp;quot;.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I have searched a whole bunch on the UpdateListItem web service.&amp;nbsp; The CAML I ome up with is:&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&amp;lt;Method ID=&amp;quot;1&amp;quot; Cmd=&amp;quot;Update&amp;quot;&amp;gt;&amp;lt;Field Name=&amp;quot;ID&amp;quot;&amp;gt;3&amp;lt;/Field&amp;gt;&amp;lt;Field Name=&amp;quot;FileRef&amp;quot;&amp;gt;[MYURL1]&amp;lt;/Field&amp;gt;&amp;lt;Field Name=&amp;quot;Status&amp;quot;&amp;gt;done&amp;lt;/Field&amp;gt;&amp;lt;/Method&amp;gt;&lt;/p&gt;
&lt;p&gt;The code I use is like this:&lt;/p&gt;&lt;font size="2"&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;/*Declare and initialize a variable for the Lists Web service.*/&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;sitesWebServiceLists.&lt;/font&gt;&lt;font color="#008080" size="2"&gt;Lists&lt;/font&gt;&lt;font size="2"&gt; listServiceU = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; sitesWebServiceLists.&lt;/font&gt;&lt;font color="#008080" size="2"&gt;Lists&lt;/font&gt;&lt;font size="2"&gt;();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;//Authenticate the current user by passing their default&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;//credentials to the Web service from the system credential cache. &lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;listServiceU.Credentials = System.Net.&lt;/font&gt;&lt;font color="#008080" size="2"&gt;CredentialCache&lt;/font&gt;&lt;font size="2"&gt;.DefaultCredentials;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font size="2"&gt;listServiceU.Url = &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;[MYURL2]/_vti_bin/lists.asmx&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;sRequestGUID = &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;Requests&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#008080" size="2"&gt;XmlNode&lt;/font&gt;&lt;font size="2"&gt; ndReturn1 = listServiceU.UpdateListItems(sRequestGUID, elBatchUpdate);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;font size="2"&gt; (ndReturn1.FirstChild.FirstChild.InnerText != &lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;0x00000000&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;thisXDocument.UI.Alert(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;Error Occurred: &amp;quot;&lt;/font&gt;&lt;font size="2"&gt; + ndReturn1.FirstChild.FirstChild.InnerText);&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;continue&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;&lt;/blockquote&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;NOTE: I have&amp;nbsp;disguised the URLs with [MY URLX]&amp;nbsp;&amp;nbsp; MYURL1 is&amp;nbsp;the URL to the document I am updating.&amp;nbsp; MYURL2, appended with &amp;quot;_vti_bin/lists.asmx&amp;quot; points to the web service.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I have tried using teh name and GUID for the form library name.&amp;nbsp; I can cut and paste the URL for the web service into a borwser and the web service page comes up.&amp;nbsp; The URL in my CAML brings up teh correct document.&amp;nbsp; Yet it throws the error HTTP 404 Not Found.&amp;nbsp; What am I doing wrong?&lt;/p&gt;</description></item></channel></rss>