2

I am an iOS developer and implementing SharePoint integration in iPhone through one of my application. From the API information I got that there are 3 APIs related to Check In/Check Out/Undo Check Out functionality provided by SharePoint 2010.

But In the result information, I get only a boolean(true/false) for each operation. There are many conditions,

  1. I try to check out a document which is already checked out by some other(since I am from my iPhone and is not synced with latest status of the site, how could I know the reason is "the file has already been checked out")

  2. I try to check in a document which is not checked out by myself/as per my current status it is not checked out.(There may be 2 reasons for the "false" response, a)The file has been already checked out by some one else. b)The file has not been checked out by you). One way I could make an assumption is like, since I have not checked out the file I can not check in that. How can get the info if the condition is former one(a)?

These are the APIS given from SharePoint for the these functionalities,

URL : /_vti_bin/Lists.asmx

Check In : /_vti_bin/Lists.asmx?op=CheckInFile
SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/CheckInFile"

Check Out : /_vti_bin/Lists.asmx?op=CheckOutFile SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/CheckOutFile"

Undo Check Out : /_vti_bin/Lists.asmx?op=UndoCheckOut SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/UndoCheckOut"

Please consider my question and give answers if possible.

1 Answer 1

0

Reading the MSDN pages for the CheckInFile Method and CheckOutFile Method, it looks like what you've said is correct -- the methods return only a boolean value. If the check in (or check out) succeeds, the method will return true. If it fails for whatever reason it will return false with no added detail. From this information, I don't think there is a way to determine the reason for failure.

(BTW those links are for v3/Office 12/WSS 3.0/MOSS 2007 but should still be applicable for v4/Office 14/SharePoint 2010).

What I'm about to say likely is of no help to you developing in iOS, but the SharePoint object model methods SPFile.CheckIn and SPFile.CheckOut throw an SPException when they fail which will likely contain more detail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.