Web Services Updating List Content

From: Dewo (devranerogul_at_yahoo.com)
Date: 04/29/04


Date: Thu, 29 Apr 2004 16:27:50 +0300

Hi,

I developed a web service that uses Sharepoint's web services(List) and a
client application on remote server that passes data web service.

I want to describe my architecture briefly :

    Assume I have a list named "customers". Then i put data in list with
bulk updating.

    Then i developed a software that runs on a remote server on internet.
That client supposed to read remote servers customers database and and
detect updated and added rows in customers table.

    Then post this records to My Web Service. This My Web Service contains
two method : Add, Update. Both of them gets parameters ( a parameter array
from client) and creates CAML document
    for adding or updating items in customer list. It uses Sharepoint
Server's Lists web service ( another application so cant use object model
can i?),UpdateListItems method of this built -in service.

        Architecture Schema :

            Remote Server
Sharepoint Server
Sharepoint Server Sharepoint Portal Server DB
            Client Application -------- XML (data) ------> My
Web Service --------- XML / CAML ------> List Web
e ---------------> Customers List(custom list)

        Adding new rows to customer list is working perfectly. But Updating
records generate error ( see below of my message pls)... But when i manually
find this record via Sharepoint's default
        interface and edit it ( Edit ----> Save And Close ) without changing
any field in record ; then i run client application , updating records
method does update only this record succesfully but keeps
        generating error rest of records.

        I tried updating using a object model (for every records near
35000). But it doesnt work from client.

        I have some idea about this nightmare:

            When I post CAML sharepoint pulls record in XML format (like
<z:row ows_Title="Something" ows_SomeField="blabla" ...../>) ...But when
exception thrown returned XML does not contain
            some fields those i added to list recently...Sharepoint does not
know changed fields ,so does not know correct schema ,so can not produce
correct XML.
            When i perform "edit ->save and close " , it somehow 'learns'
current schema for only this record (row) and updates record succesfully. Is
it sci-fiction?

     Does any one know this problem.? Any one can help me?

    Thanks for your help already.

    DEVRAN 'Locked'

ERROR MESSAGE :

System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: Server was unable to process
request. ---> System.Exception: Error Status : System.Exception: Return
Status : <Result ID="1,Update"
xmlns="http://schemas.microsoft.com/sharepoint/soap/"><ErrorCode>0x80004005<
/ErrorCode><ErrorText>Cannot complete this action.

Please try again.</ErrorText><z:row ows_Title="KIMTEKS TEKS.INS.TIC.VE SAN.
A.S" ows_Domain="blabla@blabla.com" ows_Type="Firm"
ows__x0031__x002e__x0020_Telephone="0322 3943049"
ows__x0031__x002e__x0020_Fax="0322 3943573" ows_E_x002d_Mail="mailto:
blabla@blabla.com, blabla@blabla.com" ows_Adress="Address ows_District="Boş"
ows_Aktif="-1" ows_ID="56106" ows_Modified="2004-04-27 20:39:09"
ows_Created="2004-01-29 11:57:24" ows_Author="11;#Devran Erogul"
ows_Editor="11;#Devran Erogul" ows_owshiddenversion="4" ows_Attachments="0"
ows__ModerationStatus="0" ows_LinkTitleNoMenu="KIMTEKS TEKS.INS.TIC.VE SAN.
A.S" ows_LinkTitle="KIMTEKS TEKS.INS.TIC.VE SAN. A.S"
ows_SelectTitle="56106" ows_Order="5610600.00000000"
ows_GUID="{5FA87A1D-78CC-4A89-8E16-6DCD732A58C6}" ows_Country="Türkiye"
xmlns:z="#RowsetSchema" /></Result>
   at TTN_WebService1.Organizations.UpdateOrganization(String taxNumber,
parameterarray[] args) in
\\water\wwwroot\ttn_sharepoint_webservice\ttn_webservice1\ttnwebservice1.asm
x.cs:line 121 ---> System.Exception: Return Status :

   at TTN_WebService1.Organizations.UpdateOrganization(String taxNumber,
parameterarray[] args) in
\\water\wwwroot\ttn_sharepoint_webservice\ttn_webservice1\ttnwebservice1.asm
x.cs:line 121
   --- End of inner exception stack trace ---
   at TTN_WebService1.Organizations.UpdateOrganization(String taxNumber,
parameterarray[] args) in
\\water\wwwroot\ttn_sharepoint_webservice\ttn_webservice1\ttnwebservice1.asm
x.cs:line 125
   --- End of inner exception stack trace ---
   at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream, Boolean
asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
   at SPWSClient.Water.Organizations.UpdateOrganization(String taxNumber,
parameterarray[] args)
   at SPWSClient.Module1.SyncDataBases()



Relevant Pages