Programming Web Services with XML-RPC
by Simon St. Laurent, Dave Winer, Joe Johnston, Edd Wilder-James
Chapter 7. Bridging XML-RPC and COM: XML-RPC in ASP
XML-RPC is about breaking down the barriers of language and platform. With it, you are free to use your preferred operating system with your preferred programming language to get at the computer resources you need. If you’re a Unix hacker, you may be frustrated by Microsoft Windows programs that don’t provide adequate support for remote usage. If you’re a Windows coder, you might want a standard way to get at the resources on a Unix machine. The answer to both of these problems is XML-RPC, a protocol well-suited to creating platform-independent gateways to server resources. Designing those gateways to and from Microsoft Windows is the subject of this chapter.
This chapter demonstrates how to build XML-RPC listeners and
clients using the ASP library written in VBScript. To get a flavor of the
typical cross-language use of XML-RPC, Perl clients and servers are also
shown briefly. If you don’t understand Perl, please have a look at Chapter 4, which talks more about using
Perl’s Frontier::RPC library.
Using XML-RPC with ASP
For the impatient, Example 7-1 shows the contents of a file called rpc_sum.asp. It is a brief example of an ASP XML-RPC listener that merely returns the sum of the two integers passed to it.
<!--#include virtual="/jjohn/xmlrpc.asp" --> <% rpcserver Function add_em( a, b ) add_em = a + b End Function %>
Example 7-2 shows an ASP client, stored in the file ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access