R: Functions for making SOAP calls via HTTP GET or POST requests

.SOAPHttpGet {SSOAP} | R Documentation

## Functions for making SOAP calls via HTTP GET or POST requests

### Description

These functions provide the basic functions for implementing a SOAP request via HTTP GET or POST bindings rather than the regular SOAP Envelope and Body bindings. These are often easier to use manually as they allow the caller to think of the request as a form or simple URL with named parameters.

The functions can be used in generated code derived from processing a WSDL.

### Usage

    .SOAPHttpGet(.url, ..., .params = list(...), .convert = TRUE, .opts = list())
    .SOAPHttpPost(.url, ..., .params = list(...), .convert = TRUE, .opts = list(), .style = 'POST')

### Arguments

`.url` | the full URL (as a string) identifying the SOAP method
`...` | a named list of parameters that are passed directly to the HTTP request.
`.params` | this is a list of the parameters. This can be used by a caller who already has the inputs to the SOAP request in a list.
`.convert` | a value that controls how the result is returned. If this is `FALSE`, the text of the HTTP request is returned directly. If this is `TRUE`, we use `fromXML` to convert the XML content to an R object. If `.convert` is an object derived from the `GenericSchemaType` class that describes a data structure, then we use that data desciption to convert the XML to the corresponding R data type.
`.opts` | a list of named options that are passed to `getForm` and `postForm` to control the RCurl request. See `listCurlOptions`.
`.style` | this is the `style` parameter of `postForm` and should be either "POST" or "HTTPPOST".

### Value

Either the text of the SOAP response or an R object converted from the XML content.

### Author(s)

Duncan Temple Lang

### See Also

`.SOAP`

### Examples

     .SOAPHttpGet("http://www.chemspider.com/MassSpecAPI.asmx/SearchByMass2", mass = 89.0476, range = 0.01)

    ## Not run:
        # need token
      .SOAPHttpGet("http://www.chemspider.com/MassSpecAPI.asmx/GetExtendedCompoundInfoArray", CSIDs = c("23500", "23543"), token = token)

    ## End(Not run)

[Package SSOAP version 0.91-0 Index]