Accessing SOAP Web Services

  • Deborah Nolan
  • Duncan Temple Lang
Part of the Use R! book series (USE R)


This chapter looks at another mechanism used to access Web services—SOAP—which is similar to XML-RPC and to some extent REST. SOAP is more structured and general than XML-RPC and REST. It is also ostensibly more complex and more difficult to understand because of all of the details about how to format and send requests as XML documents. However, much of the complexity of SOAP is hidden from users as we can programmatically generate code in R (and other languages) to access any SOAP-based Web service and its collection of methods using the genSOAPClientInterface() function. This hides all of the details underlying XML and HTTP while still leaving the user with a lot of flexibility and control. In this chapter, we describe how to access SOAP Web services from within R and how to generate the interfaces from WSDL documents describing the service’s methods and data structures. For more advanced programmers, we also discuss approaches to customize how this code is generated and how to use the .SOAP() function directly to gain more control for more sophisticated applications of SOAP in R.


Simple Object Access Protocol Wrap Function Coercion Method Default Server Simple Object Access Protocol Request 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    Don Box, David Ehnebuske, Gopal Kakivaya, Andrew Layman, Noah Mendelsohn, Henrik Frystyk Nielsen, Satish Thatte, and Dave Winer. Simple Object Access Protocol (SOAP), version 1.1. Worldwide Web Consortium, 2000.
  2. [2]
    Ethan Cerami. Web Services Essentials: Distributed Applications with XML-RPC, SOAP, UDDI & WSDL. O’Reilly Media, Inc., Sebastopol, CA, 2002.Google Scholar
  3. [3]
    Erik Christensen, Francisco Curbera, Greg Meredith, and Sanjiva Weeraearana. Web Service Description Language (WSDL) 1.1. Worldwide Web Consortium, 2001.
  4. [4]
    Martin Gudgin, Marc Hadley, Noah Mendelsohn, Jean-Jacques Moreau, Henrik Frystyk Nielsen, Anish Karmarkar, and Yves Lafon. SOAP Version 1.2 Part 1: Messaging Framework. Worldwide Web Consortium, 2007.Google Scholar
  5. [5]
    Minoru Kanehisa. KEGG: Kyoto Encyclopedia of Genes and Genomes., 2012.
  6. [6]
    National Aeronautics and Space Administration. Moderate resolution imaging spectroradiometer: MODIS Website., 2012.
  7. [7]
    R Core Team. Condition Handling and Recovery, 2012.
  8. [8]
    Royal Society of Chemistry. ChemSpider: The free chemical database., 2012.
  9. [9]
    James Snell, Doug Tidwell, and Pavel Kulchenko. Programming Web Services with SOAP. O’Reilly Media, Inc., Sebastopol, CA, 2001.Google Scholar
  10. [10]
    Duncan Temple Lang. RXMLHelp: XML format and tools for R documentation., 2011. R package version 0.1-0.
  11. [11]
    Duncan Temple Lang. XML: Tools for parsing and generating XML within R and S-PLUS., 2011. R package version 3.4.
  12. [12]
    Duncan Temple Lang. RCurl: General network (HTTP, FTP, etc.) client interface for R., 2012. R package version 1.95-3.
  13. [13]
    Duncan Temple Lang. SSOAP: Client-side SOAP access for R., 2012. R package version 0.9-0.
  14. [14]
    Duncan Temple Lang. XMLRPC: Remote procedure call (RPC) via XML in R., 2012. R package version 0.2-5.
  15. [15]
    Duncan Temple Lang. XMLSchema: R facilities to read XML schema., 2012. R package version 0.7-0.
  16. [16]
    Wikipedia contributors. Mass spectrometry., 2012.

Copyright information

© Springer Science+Business Media New York 2014

Authors and Affiliations

  • Deborah Nolan
    • 1
  • Duncan Temple Lang
    • 2
  1. 1.Department of StatisticsUniversity of CaliforniaBerkeleyUSA
  2. 2.Department of StatisticsUniversity of CaliforniaDavisUSA

Personalised recommendations