Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/writeGeneratedCode.R
This function allows the user to take a programmatically
generated interface such as with
genSOAPClientInterface
and write the code to a file for inclusion in an R package
or to be source'd into a different R session.
Note that this is not essential. One can save
the
interface generated by genSOAPClientInterface
in RDA format and then use load
that into
a different R session, potentially on a different machine,
and the interface will work as is.
1 | writeInterface(iface, file = stdout(), where = globalenv())
|
iface |
the interface object created via a call to |
file |
the name of the file to which to write the code. |
where |
the position or package name used to find the
class definitions associated with this interface.
This is passed to |
Currently, this has to handle deparseing S4 objects directly. Also, it undoes the use of environments within the functions to store the "cached" information about the operation and the SOAP server location. Instead, it adds these as explicit parameters and to the body of the code.
This function is used for its side effect of writing
content in the specified file
Duncan Temple Lang
genSOAPClientInterface
processWSDL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | w = processWSDL(system.file("examples", "KEGG.wsdl", package = "SSOAP"))
iface = genSOAPClientInterface(w)
f = tempfile()
writeInterface(iface, f)
source(f)
## Not run:
db = list_databases()
class(db)
class(db[[1]])
## End(Not run)
u = "http://gmd.mpimp-golm.mpg.de/webservices/wsGoBioSpace.asmx?WSDL"
z = processWSDL(u, port = 1)
iface = genSOAPClientInterface(z)
f = tempfile()
writeInterface(iface, f)
source(f)
a = GetAdducts()
d = GetDepositors()
session = CreateSession(DepositorIds = c(3, 6, 8), AdductIds = c(2L, 3L))
sm = SearchMass12C(SessionID = session, mass = 579.1705, tolerance = 0.001)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.