This project has moved and is read-only. For the latest updates, please go here.

Need help with CheckInFile web service...

Aug 10, 2012 at 2:17 PM
Edited Aug 10, 2012 at 2:18 PM


I've trying out the CheckInFile service, using the following code:

<script src="" type="text/javascript"></script>  
<script type="text/javascript" src=""></script>  

<script type="text/javascript">
var bookURL = "<url removed>";
var divId = "#WSOutput";

    $().ready(function () {
        operation: "CheckInFile",
        async: false,
        pageUrl: bookURL,
        comment: "This has been checked in using SP Services",
        CheckInType: 1,
        completefunc: function (xData, Status) {
          //$(xData.responseXML).find("errorstring").each(function() {
          //  alert($(this).text() + " Please save all of your changes before attempting to check in the document.");
          //  success = false;

          var out = $().SPServices.SPDebugXMLHttpResult({
	    node: xData.responseXML,
	    outputId: divId


<div id="WSOutput" />

I'm struggling to get it working, and I'm not sure where I've gone wrong - can anyone help please? I had tried originally with the 3 lines currently commented out, before commenting them out and replacing it with a call to just view all of the XML - if I use the first 3 lines, then I always get the error text shown "Input string was not in a correct format...".

I don't know if it is the URL I'm using - I've had to remove it for security, but it is a valid link, although it uses a port number and an encoded space in the URL; this shouldn't affect it, should it?



Aug 10, 2012 at 2:53 PM

bookURL should be (I believe) the exact same format that you'd use if you were to go to the document in the browser.


Aug 10, 2012 at 2:59 PM

Mmm - I did check it manually in my browser, and the URL I used was valid; I've not shown it here for security reasons? It's in the format of http://<servername>:<port>/Shared%20Documents/navigator.jpg - am I correct in assuming that this web service should work on any format of document, and not just web pages? I could get the CheckOutFile service working fine using the same URL, so I know the URL is good - just not sure why it's not working when using it with the CheckInFile service...? (I did also try with a proper space in the URL, instead of the (%20) encoding, as well as with and without quotes - this didn't make any difference...)