Freigeben über


FrontPage RPCs are Here To Stay, Too

If you’ve been at a talk delivered by me, Bryan Jeffries, or Richard Mareno entitled something like “Programming with Windows SharePoint Services’ Lists and Document Libraries”, you’ll have heard the following explanation, but in case you haven’t, or if you’d like to see it repeated in print…

If you want to work with documents in SharePoint Document Libraries, and you need to do so remotely, you’d be well-served to get familiar with FrontPage RPCs.  Why?

  • Our object model isn’t remotable.  If you’re doing work on the server, this isn’t a problem.  But if you’re doing server-to-server work or smart client work, this matters a lot.

  • SOAP can’t chunk; specifically, it doesn’t have a means to break up an envelope into multiple transmissions, send them across, and reassemble them on the other side.  Do you want to send a 50mb file over the wire in what amounts to a 75mb all-or-nothing post?  I didn’t think so.  SOAP is fine for enumerating and accessing everything about a document but its contents, but you’ll need to supplement it with something else to do the actual I/O.

  • WebDAV does chunk.  But it doesn’t know how to version (which is funny, since DAV stands for Distributed Authoring and Versioning).  It also doesn’t know how to do a checkin or checkout.  Batch operations?  Forget it.

    Now you could opt for a SOAP/WebDAV combination.  Do the actual PUT/GET via WebDAV, and use SOAP for everything else.  LISTS.ASMX can handle metadata already.  The checkin/checkout you’d have to do by addiing a new Web service of your own (see Writing Custom Web Services for SharePoint Products and Technologies for details).  But you’d still have trouble getting at old versions of documents.  And if someone turned on automatic versioning, you’d run the risk of generating an extra version when you set custom metadata.  Moreover, if someone wanted to make some SOAP metadata changes to a document for which a WebDAV lock was in effect, the SOAP calls would fail.

Ultimately there’s only one technique that lets you get/set metadata, perform checkouts/checkins, read/write documents, and easily get at their various versions — FrontPage RPCs.  It’s an umbrella term for a set of techniques we’d kill if we could, but (1) they support everything we and you would need, and (2) they’re backward-compatible.  What are FrontPage RPCs?

  • When we say FrontPage RPCs in general, we’re really talking about both the FrontPage Remote Procedure Call methods (which have nothing to do with the DCE RPCs that normally come to mind when we hear “RPC”) implemented by both the FrontPage Server Extensions and by Windows SharePoint Services, as well as the Windows SharePoint Services RPC methods implemented only by WSS.
  • They’re structured commands either passed directly to OWSSVR.DLL as query string parameters (a.k.a. the URL Protocol) or sent to OWSSVR.DLL as a set of batched commands formatted as CAML XML.
  • They’re what Office client applications use to handle document I/O and checkins/checkouts of documents in SharePoint libraries.  (SOAP is, however, what’s used in the Shared Workspace task pane.)
  • They’re documented at https://msdn.microsoft.com/library/en-us/spptsdk/html/SPPTWSSClientAPI_SV01072206.asp, although that documentation is pretty much all references without examples or “how-to” tips.

Given that FPRPCs are here to stay for some time, we’ll do something about documenting them better over the next several weeks and months.  I’m going to get a number of examples posted to GotDotNet.  I’m also checking with a few people to see if someone’s willing to write a .NET helper class that handles the most common uses of FPRPCs; you could just insert this in your projects and have an easier time of working with SharePoint library content.

In the meantime, though, you can and should look into the subject on MSDN.  Also check out a Webcast that covers this subject in part:  Programming SharePoint Site Lists and Document Libraries.  And stay tuned for more.

Comments

  • Anonymous
    March 18, 2005
    I just finished writing a .NET wrapper class around FPRPC and if anybody is interested in doing beta testing around it - send e-mail to masa[at]grapecity.com


    thanks,

  • Anonymous
    March 21, 2005
    "SOAP can’t chunk"

    isn't that exactly the reason W3C added MTOM to the soapspec, so it would be able to efficiently send large binary files.

    http://www.w3.org/TR/2005/REC-soap12-mtom-20050125/

  • Anonymous
    March 31, 2005
    Does FrontPage RPC work for posting large size documents? I'm trying to use "put document" method but I keep getting HTTP timeout errors for anything over ~100K.

  • Anonymous
    May 30, 2005
    I haven’t blogged for a while, but I’m hoping to make up for it — starting with this…...

  • Anonymous
    August 29, 2005
    FP RPC is good but is it possible to update document property without make new version of document. Or how to use FPRPC in event handler on wss document library because after update of document, application pool become author of document.

  • Anonymous
    February 27, 2006
    The comment has been removed

  • Anonymous
    March 29, 2006
    The comment has been removed

  • Anonymous
    August 27, 2007
    Un petit post en réponse à une question que j'ai vu sur le newsgroup français de SharePoint. En résumé,

  • Anonymous
    June 02, 2009
    PingBack from http://woodtvstand.info/story.php?id=56412

  • Anonymous
    June 15, 2009
    PingBack from http://unemploymentofficeresource.info/story.php?id=7421

  • Anonymous
    June 17, 2009
    PingBack from http://patioumbrellasource.info/story.php?id=180

  • Anonymous
    June 17, 2009
    PingBack from http://pooltoysite.info/story.php?id=6207