Description Usage Arguments Value Author(s) References See Also Examples
This is used to call a SOAP method in a SOAP server, passing the relevant arguments from S and converting the response into an S object. The communication between S and the SOAP server is handled via connections.
1 2 3 4 5 6 | .SOAP(server, method, ..., .soapArgs = list(), action, nameSpaces = SOAPNameSpaces(),
xmlns = NULL, handlers = SOAPHandlers(), .types = NULL,
.convert = TRUE, .opts = list(), curlHandle = getCurlHandle(),
.header = getSOAPRequestHeader(action, .server = server),
.literal = FALSE, .soapHeader = NULL, .elementFormQualified = FALSE,
.returnNodeName = NA)
|
server |
a |
method |
the name of the SOAP method to invoke |
... |
name=value arguments to pass to the |
.soapArgs |
an alternative mechanism for passing arguments to the
.SOAP call. This is a |
action |
the SOAPAction string to put in the HTTP header. This is
required. If it is an object of class |
nameSpaces |
a named character vector giving the
XML namespaces to add to the Body. These are given
as a named character vector with the names giving the
local namespace identifier and the value being the
URI corresponding to that namespace identifier.
For ease of use, one can identify the collections
corresponding to the 1999 or 2001 schema using
the simpler strings "1.1" and "1.2" respectively.
If |
xmlns |
the name space to use for the XML nodes which specify the actual method call, i.e. within the BODY. This is either a single string, or a name-value pair given as a character vector. The name is the namespace identifier and the value is the URI. |
handlers |
a collection of functions that, if present, are called
at different points in the SOAP invocation to
process the input and output.
These can be thought of as event callbacks and include
|
.types |
[not yet implemented] allows one to explicitly control the conversion of the arguments to the appropriate/desired SOAP type. This is useful when you know what the server is expecting. |
.convert |
a function, a logical value or a |
.opts |
a named list of elements that are passed to the
curlPerform function which actually invokes the SOAP
method. These options control aspects of the HTTP request, including
debugging information that is displayed on the console, e.g.
|
curlHandle |
this is passed to |
.header |
a named character vector of elements which are used in the HTTP header for the SOAP request. These are calculated by default within the .SOAP call, but the parameter allows them to be pre-computed and supplied in the call. |
.literal |
a logical value indicating whether to use the literal encoding for serializing the data being sent to and from the server. |
.soapHeader |
this allows the caller to specify the SOAP content for the Header part of the SOAP request. This is sometimes used to supply information such as login and password or other forms of authentication and authorization. The value for this parameter can be the text of the XML header node, an XML node itself, or alternatively a function that returns such a node (or text with the XML content). The function is called with the SOAP document being created and the name of the SOAP method. |
.elementFormQualified |
a logical value. If this is |
.returnNodeName |
the name of the node in the SOAP response that
is the container for the content of the response. This is often
|
An S object representing the return value from the SOAP method invocation.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
http://www.w3.org/TR/SOAP/ http://www.omegahat.org/SSOAP, http://www.omegahat.org/bugs.
writeSOAPMessage
isHTTPError
curlPerform
postForm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | ## Not run:
.SOAP(SOAPServer("services.xmethods.net", "soap"),
"getRate", country1="England", country2 = "Japan",
action="urn:xmethods-CurrencyExchange")
.SOAP(SOAPServer("services.xmethods.net", "soap/servlet/rpcrouter"),
"getPrice", "0596000278",
action="urn:xmethods-BNPriceCheck")
s <- SOAPServer("http://services.xmethods.net/soap")
.SOAP(s,
"getQuote", "AMZN",
action="urn:xmethods-delayed-quotes#getQuote")
.SOAP(SOAPServer("services.soaplite.com", "temper.cgi"),
"c2f", 37.5,
action="http://www.soaplite.com/Temperatures")
# Different action and namespace.
# Specify handlers=NULL to avoid the additional processing of the
# SOAPAction string, i.e. the appending of the method name.
# This kills off all the handlers. If we want to remove only the
# "action" element, we have to be more explicit.
s1 <- SOAPServer("services.soaplite.com", "interop.cgi")
.SOAP(s1,
"echoString", "From R",
action="urn:soapinterop",
xmlns=c(namesp1="http://soapinterop.org/"),
handlers =NULL)
## End(Not run)
## Not run:
# This adds a Header to the request with user name and password
# It is NOT needed for this service, but we are just using it as an
# example of how we can pass the authentication information.
.SOAP("http://soap.genome.jp/keggapi/request_v6.2.cgi", "list_databases",
action = "SOAP/KEGG#list_databases",
.soapHeader = auth)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.