Total number of elements: 193 Not yet completed: 101 High priority: 61 Completed: 92 |
---|
|
---|
Status | Count |
---|---|
no status | 2 |
(2) |
doc = htmlTreeParse("http://www.ebi.ac.uk/Tools/webservices/wsdl/list", useInternal = TRUE) wsdls = xpathApply(doc, "//a[@href]", xmlGetAttr, "href") wsdls = grep("[.?]wsdl$", wsdls, val = T) zz = mapply(function(i, x) {cat(i, x, "\n") ; processWSDL(x)}, seq(along = wsdls[-2]), wsdls[-2])(The second one gives a very short XML document which is just the SOAP envelope with a fault. So it is an error.)
Status | Count |
---|---|
high | 1 |
(1) |
Status | Count |
---|---|
no status | 1 |
(1) |
x = readSchema("../XMLSchema/inst/samples/XMCDA-2.0.0.xsd") class(x[[1]]$alternatives)This is a SimpleSequenceType and we didn't pull in the attributes.
library(SSOAP) w = processWSDL("http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php?wsdl") f = genSOAPClientInterface(,w) str = f@functions$NDFDgenByDay(38.9936, -77.0224, Sys.time() + 60*24*60, 5, "12 hourly")
library(XMLSchema) x = readSchema("../XMLSchema/inst/samples/XMCDA-2.0.0.xsd") trace(resolve, quote({print(c(class(obj), class(context))); print(obj)})) o = defineClasses(x, verbose = TRUE)
library(XMLSchema) k = readSchema("../XMLSchema/inst/samples/kml21.xsd") k[[1]]$LookAtTypeThis is an ExtendedClassDefinition.
s = readSchema("../XMLSchema/inst/samples/kml21.xsd") XMLSchema:::defClass(s[["anglepos90"]]) as(45, "anglepos90") as(145, "anglepos90") as(90, "anglepos90") as(0, "anglepos90") as(-10, "anglepos90")
a = readSchema("/Users/duncan/Rpackages/XMLSchema/samples/kml21.xsd")
k = readSchema("../XMLSchema/inst/samples/kml21.xsd") o = defineClasses(k, verbose = TRUE, baseClass = "VirtualXMLSchemaClass") k[[1]]$PointType@slotTypes[[1]] # has the correct URIBut
XMLSchema:::resolve(k[[1]]$PointType@slotTypes[[1]], k)gives a SOAPTypeReference and has the wrong nsuri. Points to 2001/XMLSchema (xsd)
Status | Count |
---|---|
done | 79 |
medium | 2 |
check | 17 |
high | 3 |
implementationNote | 1 |
partial | 1 |
gone | 2 |
note | 2 |
tidy | 1 |
done? | 1 |
low | 6 |
use | 1 |
improve | 2 |
no status | 49 |
(167) |
if(xmlName(type) == 'complexType' && all(names(type) %in% c("attribute", "attributeGroup")))clause at line 402 (now).
mb = processWSDL("http://www.massbank.jp/api/services/MassBankAPI?wsdl") mt = processWSDL("http://metlin.scripps.edu/soap/metlin.wsdl") cs = processWSDL("http://www.chemspider.com/MassSpecAPI.asmx?WSDL") wk = processWSDL("WSDLs/webservice.php?wsdl") brenda = processWSDL("http://www.brenda-enzymes.org/soap/brenda.wsdl") bri = genSOAPClientInterface(, brenda) w = processWSDL("http://sdw-ws.ecb.europa.eu/services/SDMXQuery?wsdl") oecd = processWSDL("http://stats.oecd.org/SDMXWS/sdmx.asmx?WSDL") oecdi = genSOAPClientInterface(, oecd)
library(SSOAP) w = c("http://www.massbank.jp/api/services/MassBankAPI?wsdl", "http://metlin.scripps.edu/soap/metlin.wsdl", "WSDLs/eutils.wsdl", "http://pubchem.ncbi.nlm.nih.gov/pug_soap/pug_soap.cgi?wsdl", "http://www.chemspider.com/MassSpecAPI.asmx?WSDL", "WSDLs/webservice.php?wsdl", "WSDLs/wsGoBioSpace.asmx?WSDL", # "http://sdw-ws.ecb.europa.eu/services/SDMXQuery?wsdl", # takes a long time "http://stats.oecd.org/SDMXWS/sdmx.asmx?WSDL", "http://xml.nig.ac.jp/wsdl/ARSA.wsdl", "http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php?wsdl", "http://soap.genome.jp/KEGG.wsdl", "http://www.brenda-enzymes.org/soap/brenda.wsdl" ) ans = lapply(w, function(x) {cat(x, "\n"); def = try({genSOAPClientInterface(, processWSDL(x)); cat("done\n") }); def}) w[sapply(ans, is, "try-error")]
f@functions$SearchByMass2(mas = 89.0476, ran = .01)The only gain would be that the user could see the names of the expected arguments and the defaults would be explicit.
library(SSOAP) w = processWSDL("http://www.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/eutils.wsdl") iface = genSOAPClientInterface(, w)
w = processWSDL("http://sdw-ws.ecb.europa.eu/services/SDMXQuery?wsdl") sdmx = genSOAPClientInterface(, w)Problem in createArrayClass with
if (el@nsuri %in% getXSDSchemaURIs(all = TRUE)) { : argument is of length zero
w = processWSDL("./WSDLs/Fedora-API-A.wsdl") iface = genSOAPClientInterface(,w)Should the 2nd element of the UnionDefinition be SOAPType or PrimitiveSOAPType or SOAPStringType. This is the FieldSearchQuery union.
w = processWSDL("WSDLs/Fedora-API-A-LITE.wsdl") k = genSOAPClientInterface(, w)Is this that the first type in the choice is an element (named conditions) and is it not described properly in our R object?
w = processWSDL("http://web4.sa-media.com/SASoapAPI/service.asmx?WSDL") Warning message: In processWSDL("http://web4.sa-media.com/SASoapAPI/service.asmx?WSDL") : Ignoring additional <service><port> ... elementsAlso, two sets of operations returned and they have the same name. This looks okay from our end.
x = wk@functions$getPathwayAs(list(fileType = "png", pwId = "WP1984"))GetIDList is an example from pug. The Start and Count are optional.
pug = processWSDL("http://pubchem.ncbi.nlm.nih.gov/pug_soap/pug_soap.cgi?wsdl") pugi = genSOAPClientInterface(, pug) z = pugi@functions$InputStructure(structure = "c1ccccc1", format = "eFormat_SMILES") x = pugi@functions$GetIDList(ListKey = z,Start = 1L, Count = 10L) #Fails now. x = pugi@functions$GetIDList(ListKey = z)Then check that these still work. Unfortunately, they won't because the WSDL doesn't say the species, etc. are optional. So leave the makePrototype option on.
w = processWSDL("WSDLs/wikipathways.wsdl") wk = genSOAPClientInterface(, w) wk@functions$findPathwaysByText(list(query = "apoptosis")) wk@functions$findPathwaysByXref(list(ids = 'P45985')) # Done
pug = processWSDL("http://pubchem.ncbi.nlm.nih.gov/pug_soap/pug_soap.cgi?wsdl") pugi = genSOAPClientInterface(, pug, putFunctions = TRUE) strKey = pugi@functions$InputStructure(structure = "c1ccccc1", format = "eFormat_SMILES") std = pugi@functions$Standardize(list(strKey)) listKey = pugi@functions$IdentitySearch(StrKey = strKey, idOptions = list(eIdentity = "eIdentity_SameConnectivity")) pugi@functions$GetListItemsCount(listKey) pugi@functions$GetListItemsCount(list(ListKey = listKey)) # works too. pugi@functions$GetIDList(list(ListKey = listKey)) ekey = pugi@functions$GetEntrezKey(list(ListKey = listKey)) u = pugi@functions$GetEntrezUrl(ekey) xx = pugi@functions$Download(list(ListKey = listKey, eFormat = "eFormat_XML", eCompress = "eCompress_GZip")) xx@DownloadKey # nothing in the DataBlob slotNames(xx@DataBlob) xx@DataBlob@BlobFormat v = as(xx@DataBlob@Data, "raw") # Get the URL of the file u = pugi@functions$GetDownloadUrl(xx@DownloadKey) library(RCurl) v = getURLContent(u, binary = TRUE, isHTTP = FALSE) library(Rcompression) val = gunzip(v)
library(SSOAP) w = processWSDL("WSDLs/eutils.wsdl") iface = genSOAPClientInterface(, w)IdCheckListType (in w@types[[5]]$IdCheckListType) is a ClassDefinition but the first element is a SimpleSequenceType and has no name. So when we try to force its class def, we have an empty name - "".
resolve()
the sub-elements.
resolve()
, we apply findSelfRefs
to replace any immediate children with a SelfRef if they refer to the same
type as the parent.
In the mapSOAPTypeToS function, we return the name of the
w = processWSDL("WSDLs/eutils.wsdl") w@types[[5]]$IdUrlSetType@slotTypes[[2]]@slotTypes[[1]]@count
w = processWSDL("WSDLs/wikipathways.wsdl") wk = genSOAPClientInterface(, w) x = wk@functions$getRecentChanges(timestamp = "20110101000000") x = wk@functions$getRecentChanges(times = "20110101000000") # partial name matching of the slots x = wk@functions$listPathways(organism = "") wk@functions$findPathwaysByXref(ids = 'P45985', codes="") wk@functions$findPathwaysByXref(ids = 'P45985')
x = wk@functions$getRecentChanges(list(timestamp = "20110101000000")) x = wk@functions$getRecentChanges(new("getRecentChanges", timestamp = "20110101000000")) x = wk@functions$listPathways(list(organism = "")) # should be able to call w/o any value wk@functions$findPathwaysByXref(list(ids = 'P45985', codes="")) # need the codes. Would like to have prototype create that.
x = wk@functions$findPathwaysByXref(list(ids = '1234', codes = "L"))
x = wk@functions$getRecentChanges(list(timestamp = "20110101000000")) x = wk@functions$listPathways(list(organism = "")) # should be able to call w/o any value
x = wk@functions$getPathwayHistory(list(pwId = "WP1984")) x = wk@functions$getPathwayAs(list(fileType = "svg", pwId = "WP1984"))
cs = processWSDL("http://www.chemspider.com/MassSpecAPI.asmx?WSDL", port = 3)Currently processing just one binding but keeping it as a list. Should go to just one binding or process them all.
cs = processWSDL("http://www.chemspider.com/MassSpecAPI.asmx?WSDL") o = genSOAPClientInterface(, cs) o@functions$SearchByMass2(list(mass = 89.04767, range = 0.01))rather than
o@functions$SearchByMass2(new("SearchByMass2", mass = 89.04767, range = 0.01))
cs = processWSDL("http://www.chemspider.com/MassSpecAPI.asmx?WSDL") o = genSOAPClientInterface(, cs) o@functions$SearchByMass2(new("SearchByMass2", mass = 89.04767, range = 0.01))Fails in converting the result. The return value is a SimpleSequenceType, but we are trying to set slots. This is being done in fromSOAPStruct.
bb = '<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns:GetExtendedCompoundInfo xmlns:ns="http://www.chemspider.com/"> <CSID>23078572</CSID> <token>717cf9b9-9721-4e8b-825a-b6a65e106c1e</token> <token>string</token> </ns:GetExtendedCompoundInfo> </soap:Body> </soap:Envelope>' bb = '<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetExtendedCompoundInfo xmlns="http://www.chemspider.com/"> <CSID>23078572</CSID> <token>717cf9b9-9721-4e8b-825a-b6a65e106c1e</token> <token>string</token> </GetExtendedCompoundInfo> </soap:Body> </soap:Envelope>' h = basicTextGatherer() curlPerform(url = "http://www.chemspider.com/MassSpecAPI.asmx", postfields = bb, verbose = TRUE, .opts = list(httpheader = c(SOAPAction = '"http://www.chemspider.com/GetExtendedCompoundInfo"', 'Content-Type' = "text/xml; charset=ascii")), writefunction = h$update)
library(SSOAP) w = processWSDL("WSDLs/msnSearch.wsdl") iface = genSOAPClientInterface(, w)Differentiate between elements and types (i.e. complexType, etc.). Both are called SearchResponse. Add them to the types to preserve the uniqueness, i.e. don't add by name, but append to the Schema object we are building.
library(SSOAP) w = processWSDL("ops.wsdl")
processSequence()
and lookupNamespace()
w = processWSDL("http://ec2.amazonaws.com/doc/2007-01-19/AmazonEC2.wsdl") f = genSOAPClientInterface(,w) Error in mapSOAPTypeToS(type, types, namespaceDefs) : Can't match SOAP type EmptyElementType
msn = processWSDL("http://soap.search.msn.com/webservices.asmx?wsdl") i.msn = genSOAPClientInterface(, msn)
w = processWSDL("http://www.fedora.info/definitions/api/Fedora-API-A-LITE.wsdl") f = genSOAPClientInterface(,w)
w = processWSDL("http://www.fedora.info/definitions/api/Fedora-API-A.wsdl") f = genSOAPClientInterface(,w)Is the describeRepository object nested one level down.
w = processWSDL("http://www.csoft.co.uk/dtd/www.sendsms5.wsdl") z = genSOAPClientInterface(,w)The problem now is a ? in the parameter names in the operation SubmitMessage Error in parse(text = txt) : unexpected '?' in "function(?"Error in stop("Can't match SOAP type ", type) : Can't match SOAP type positiveInteger
No data were returned. start date is in the past. Requested weather forecast information is only available for times in the future.\n12 hourly\n2008-09-01\n5\n\n38.9936,-77.0224"
<complexType name = "office-of-filingType"> <choice> <sequence> <element name = "region" type = "exch:regionType"/> <element name = "country" type = "exch:countryType" minOccurs = "0"/> </sequence> <element name = "country" type = "exch:countryType"/> </choice> </complexType>So we see we do have an issue with the first element - the sequence. The name should be a composition of these.
<s:complexType name="ArrayOfString"> <s:sequence> <s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" /> </s:sequence> </s:complexType>Are we just inserting them by name in the new processSchemaTypes and processSchemaNodes. No that's still the same. It is the fixTypeNames.
XMLSchema:::resolve(w@types[[2]]$"priority-claimType"@slotTypes[[4]], w@types)This goes through SOAPTypeReference first and then tries to resolve the type. But that element for priority-linkage-type has the wrong nsuri.
o@functions$GetExtendedCompoundInfoArray(list(CSIDs = c(23500L, 23543L)), token = token))But
f@functions$GetExtendedCompoundInfoArray(c(23500, 23543), token)fails in the conversion.
library(SSOAP) w = processWSDL("WSDLs/MassSpecAPI.asmx?WSDL", port = "MassSpecAPIHttpPost") f = genSOAPClientInterface(w) f@functions$GetExtendedCompoundInfoArray(c(23500, 23543), token)
w = processWSDL("WSDLs/MassSpecAPI.asmx?WSDL", port = 3) z = genSOAPClientInterface(w, verbose = TRUE) db = z@functions$GetDatabases()This returns a list.
<s:complexType name="StringArray"> <s:complexContent mixed="false"> <s:restriction base="soapenc:Array"> <s:sequence> <s:element minOccurs="0" maxOccurs="unbounded" name="String" type="s:string"/> </s:sequence> </s:restriction> </s:complexContent> </s:complexType>Then this gets resolved oddly.
w = processWSDL("../../SOAP/WSDLs/MassSpecAPI.asmx?WSDL", port = 3)StringArray issue. This is as a result of IsEmptyParameter being called at this stage. If we comment that out in wsdlProcess.R (#555), things are fine. Deferred until createOperationDefinition and generating code.
undefined slot classes in definition of "eGqueryRequest": term(class "term"), tool(class "tool"), email(class "email") undefined slot classes in definition of "eInfoRequest": db(class "db"), tool(class "tool"), email(class "email") undefined slot classes in definition of "ErrorListType": PhraseNotFound(class "PhraseNotFound"), FieldNotFound(class "FieldNotFound") undefined slot classes in definition of "TermSetType": Count(class "Count"), Explode(class "Explode") undefined slot classes in definition of "TranslationType": From(class "From"), To(class "To") undefined slot classes in definition of "WarningListType": PhraseIgnored(class "PhraseIgnored"), QuotedPhraseNotFound(class "QuotedPhraseNotFound"), OutputMessage(class "OutputMessage") undefined slot classes in definition of "eSearchResult": ERROR(class "ERROR"), Count(class "Count"), RetMax(class "RetMax"), RetStart(class "RetStart"), QueryKey(class "QueryKey"), WebEnv(class "WebEnv"), QueryTranslation(class "QueryTranslation") undefined slot classes in definition of "eSearchRequest": db(class "db"), term(class "term"), WebEnv(class "WebEnv"), QueryKey(class "QueryKey"), usehistory(class "usehistory"), tool(class "tool"), email(class "email"), field(class "field"), reldate(class "reldate"), mindate(class "mindate"), maxdate(class "maxdate"), datetype(class "datetype"), RetStart(class "RetStart"), RetMax(class "RetMax"), rettype(class "rettype"), sort(class "sort") Class "StringEnum" is defined (with package slot ‘XMLSchema’) but no metadata object found to revise subclass information---not exported? Making a copy in package ‘.GlobalEnv’ undefined slot classes in definition of "ItemType": Item(class "ItemType") undefined slot classes in definition of "eSummaryRequest": db(class "db"), id(class "id"), WebEnv(class "WebEnv"), query_key(class "query_key"), retstart(class "retstart"), retmax(class "retmax"), tool(class "tool"), email(class "email") undefined slot classes in definition of "IdCheckListType": ERROR(class "ERROR")
library(SSOAP) z = processWSDL("WSDLs/wsGoBioSpace.asmx?WSDL", port = "wsGoBioSpaceHttpGet") f = genSOAPClientInterface(z) session = f@functions$CreateSession(AdductIds = c(2,3), DepositorIds = c(3,6,8)) f@functions$GetMonoisotopicWeight("H2O") f@functions$GetMolecularWeight("H2O")Now the SOAP interface:
library(SSOAP) zs = processWSDL("WSDLs/wsGoBioSpace.asmx?WSDL", port = 1) fs = genSOAPClientInterface(zs) session = fs@functions$CreateSession(AdductIds = c(2L,3L), DepositorIds = c(3,6,8)) fs@functions$SearchMass12C(SessionID = session, mass = 579.1705, tolerance = 0.001)[FIXED] Problem in converting the result. Had a NULL type for the adduct slot in the MassSearchHit in newSOAPClass. Explicitly determine slot if type is NULL. But is this an inherited slot and that's why we don't have the type? Yes. Perhaps when we resolve the type to put in the parameters or in the return value slot, we have to collect all the inherited slots. This can just merge the slot types. Can add an argument to resolve() to merge these, or create a new function that calls resolve and then merge.
z = processWSDL("WSDLs/wsGoBioSpace.asmx?WSDL", port = "wsGoBioSpaceHttpGet") f = genSOAPClientInterface(z) f@functions$CreateSession(AdductIds = c(2,3), DepositorIds = c(3,6,8))GUID should be "04729173-A960-4A1A-83A8-538B2C1E3806"
z = processWSDL("WSDLs/wsGoBioSpace.asmx?WSDL") f = genSOAPClientInterface(, z) f@functions$GetDepositors()
Error in UseMethod("xmlNamespaceDefinitions") : no applicable method for 'xmlNamespaceDefinitions' applied to an object of class "NULL"
<SearchByMass2 xmlns="http://www.chemspider.com/"> <mass> <mass xmlns="http://www.chemspider.com/">89.04767</mass> </mass> <range> <range xmlns="http://www.chemspider.com/">0.01</range> </range> </SearchByMass2>
library(XMLSchema) tt = readSchema("/Users/duncan/Rpackages/XMLSchema/samples/pmml-4-0.xsd")
tt = readSchema("/Users/duncan/Rpackages/XMLSchema/samples/pmml-4-0.xsd")
<xs:sequence> <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> <xs:group ref="PREDICATE"/> <xs:choice> <xs:sequence> <xs:element ref="Partition" minOccurs="0"/> <xs:element ref="ScoreDistribution" minOccurs="0" maxOccurs="unbounded"/> <xs:element ref="Node" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:group ref="EmbeddedModel"/> </xs:choice> </xs:sequence>
w = processWSDL("WSDLs/wikipathways.wsdl") wk = genSOAPClientInterface(, w) x = wk@functions$getPathwayAs(list(fileType = "svg", pwId = "WP1984"))And now when we convert this to raw
z = as(x@data, "character") substring(z, 1, 1000)
x = wk@functions$getPathwayAs(list(fileType = "png", pwId = "WP1984")) z = as(x@data, "raw") writeBin(z, "/tmp/foo.png") # or use rasterImage to draw it.
pug = processWSDL("http://pubchem.ncbi.nlm.nih.gov/pug_soap/pug_soap.cgi?wsdl") pugi = genSOAPClientInterface(, pug)i.e. that we have the R classes already defined
w = processWSDL("WSDLs/wsGoBioSpace.asmx?WSDL") f = genSOAPClientInterface(, w)
z = getForm("http://www.chemspider.com/MassSpecAPI.asmx/SearchByMass2", mass = 89.0476, range = 0.01, .opts = list(httpheader = c("Content-Type" = "application/soap+xml"))) z = getURLContent("http://www.chemspider.com/MassSpecAPI.asmx/GetDatabases", .opts = list(httpheader = c("Content-Type" = "application/soap+xml"))) z = getForm("http://www.chemspider.com/MassSpecAPI.asmx/SearchByFormula2", formula = "H2O", .opts = list(httpheader = c("Content-Type" = "application/soap+xml"))) z = getForm("http://www.chemspider.com/MassSpecAPI.asmx/GetExtendedCompoundInfo", csid = "23543", token = token, .opts = list(httpheader = c("Content-Type" = "application/soap+xml")))chemSpi = function(op, ..., token = getOption("ChemSpiderToken", NA), server = "http://www.chemspider.com/MassSpecAPI.asmx/") { u = sprintf("%s%s", server, op) args = list(...) if(!is.na(token)) args$token = token z = getForm(u, .params = args, .opts = list(httpheader = c("Content-Type" = "application/soap+xml")))<xml:attr></xml:attr> z } makeFun = function(op, params, type, location = "http://www.chemspider.com/MassSpecAPI.asmx/") { u = sprintf("%s%s", location, op) } So it looks like if we had a .SOAPHttpGet function, this would just change the way we package the arguments and then convert the result in the same way as .SOAP
library(SSOAP) trace(XMLSchema:::resolve, quote({print(c(class(obj), class(context))); print(obj)})) cs = processWSDL("http://www.chemspider.com/MassSpecAPI.asmx?WSDL", port = 3) o = genSOAPClientInterface(, cs)
w = processWSDL("WSDLs/eutils.wsdl") names(w@types[[4]])Caused by the new code to handle additional attributes.
o = XMLSchema:::resolve(cs@types[[1]]$GetRecordMol, cs@types)???Need to recognize that the string is in XSD???. No, it is the local one that then extends the XSD string.
cs = processWSDL("http://www.chemspider.com/MassSpecAPI.asmx?WSDL") o = genSOAPClientInterface(, cs) o@functions$SearchByMass2(list(mass = 89.04767, range = 0.01)) o@functions$SearchByMass2(mass = 89.04767, range = 0.01) # also works o@functions$GetExtendedCompoundInfo(list(CSID=23078572L, token = "717cf9b9-9721-4e8b-825a-b6a65e106c1e")) o@functions$GetExtendedCompoundInfo(CSID=23078572L, token = "717cf9b9-9721-4e8b-825a-b6a65e106c1e") # works too.
library(XMLSchema) pm = readSchema("../XMLSchema/inst/samples/pmml-4-0.xsd")The issue is the attribute named "type". We try to create an AttributeDef object and set its type slot with a RestrictedStringDefinition rather than the expected AttributeType. The RestrictedStringDefinition has potentially more information (e.g. the converter), but the AttributeType is just the EnumValues or a string. Do we really want the type slot of AttributeDef to be AttributeType or something richer. Or instead of EnumValuesDef, allow a RestrictedStringType which would include a RestrictedStringPatternDefinition
w = processWSDL("http://www.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/eutils.wsdl") iface = genSOAPClientInterface(, w)
if (xmlName(type) == "complexType" && ((xmlSize(type) == 1 && names(type) == "sequence") || ("sequence" %in% names(type) && all(names(type) %in% c("attribute", "annotation", "sequence")))))
st = w@types[[5]]$IdUrlSetType class(st@slotTypes[[2]]) # UnionDefinition st@slotTypes[[2]]@slotTypes[[1]] # LocalElement. Could turn this into a SimpleSequence at this point i.e. when we transform from Element to Type in elementToType. That's where we have the count.
library(SSOAP) w = processWSDL("http://www.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/eutils.wsdl") iface = genSOAPClientInterface(, w)[Fixed] Now we are having issues with a class definition - IconUrlType - trying to define dependent/referenced classes that are enumerations! The class has an AttributeDef whose type slot is an EnumValuesDef. So we should just be mapping this to the R type corresponding to the name of the Enum type. If there is no name, let's make one up from the name of the outer class and the slot name (LNG). At present, the name is coming from combining the enum names.
w = processWSDL("WSDLs/wikipathways.wsdl") wk = genSOAPClientInterface(, w) wk@functions$listOrganisms() # Works again. wk@functions$listOrganisms(new("listOrganisms")) # no longer works. Nowit does agai and wk@functions$findPathwaysByText(list(query = "apoptosis")) # okay, but wk@functions$findPathwaysByText(query = "apoptosis") is not. wk@functions$findPathwaysByXref(list(ids = 'P45985', codes="")) # need the codes. Would like to have prototype create that. wk@functions$findPathwaysByXref(list(ids = 'P45985')) # Done wk@functions$findPathwaysByText(list(query = "apoptosis", species = "")) wk@functions$findPathwaysByText(list(query = "apoptosis"))Problem with listOrganisms input being an empty sequence???
wk = genSOAPClientInterface(, w, putFunctions = TRUE) e = new.env() wk = genSOAPClientInterface(, w, putFunctions = e)
cs = processWSDL("http://www.chemspider.com/MassSpecAPI.asmx?WSDL") o = genSOAPClientInterface(, cs) o@functions$GetExtendedCompoundInfo(new("GetExtendedCompoundInfo", CSID=23078572L, token = "717cf9b9-9721-4e8b-825a-b6a65e106c1e")) o@functions$GetExtendedCompoundInfo(list(CSID=23078572L, token = "717cf9b9-9721-4e8b-825a-b6a65e106c1e")) # works too.See GetExtendedCompoundInfo_result.xml for a sample result.
pug = processWSDL("http://pubchem.ncbi.nlm.nih.gov/pug_soap/pug_soap.cgi?wsdl") pugi = genSOAPClientInterface(, pug)about defClass() and no code to handle PrimitiveSOAPType...
pug = processWSDL("http://pubchem.ncbi.nlm.nih.gov/pug_soap/pug_soap.cgi?wsdl") pugi = genSOAPClientInterface(, pug, putFunctions = TRUE) strKey = pugi@functions$InputStructure(structure = "c1ccccc1", format = "eFormat_SMILES") std = pugi@functions$Standardize(list(strKey)) listKey = pugi@functions$IdentitySearch(StrKey = strKey, idOptions = list(eIdentity = "eIdentity_SameConnectivity")) pugi@functions$GetListItemsCount(listKey) pugi@functions$GetListItemsCount(list(ListKey = listKey)) # works too. pugi@functions$GetIDList(list(ListKey = listKey)) ekey = pugi@functions$GetEntrezKey(list(ListKey = listKey)) u = pugi@functions$GetEntrezUrl(ekey) xx = pugi@functions$Download(list(ListKey = listKey, eFormat = "eFormat_XML", eCompress = "eCompress_GZip")) xx@DownloadKey # nothing in the DataBlob slotNames(xx@DataBlob) xx@DataBlob@BlobFormat v = as(xx@DataBlob@Data, "raw") # Get the URL of the file u = pugi@functions$GetDownloadUrl(xx@DownloadKey) library(RCurl) v = getURLContent(u, binary = TRUE, isHTTP = FALSE) library(Rcompression) val = gunzip(v)
pugi@functions$GetEntrezUrl('')We want to recognize that this is an element and so want parameters that correspond to its elements.
pug = processWSDL("http://pubchem.ncbi.nlm.nih.gov/pug_soap/pug_soap.cgi?wsdl") pugi = genSOAPClientInterface(, pug)Why do we end up with NULL in defClass for "GetOperationStatus" Failed to resolve GetOperationStatus. This is an element in the WSDL but not in the pug@types. We get end up using another name <s:element name="GetOperationStatus" type="tns:AnyKeyType" /> Also lots of warnings in genSOAPClientInterface.
w = processWSDL("http://stats.oecd.org/SDMXWS/sdmx.asmx?WSDL")Added method to resolve AnySOAPType.
cs = processWSDL("http://www.chemspider.com/MassSpecAPI.asmx?WSDL") library(XMLSchema) resolve(cs@operations[[1]]$GetRecordMol@returnValue, cs@types)Why is cs@types[[1]]$string a SOAPTypeReference with no nsuri. Explore processSchemaType and why it does this.
An object of class "SOAPType" Slot "count": numeric(0) Slot "abstract": logical(0) Slot "name": [1] "string" Slot "ns": [1] "tns" Slot "nsuri": [1] "http://www.chemspider.com/" Slot "documentation": character(0)
library(SSOAP) w = processWSDL("http://daac.ornl.gov/cgi-bin/MODIS/GLBVIZ_1_Glb_subset/MODIS_webservice.wsdl") def = genSOAPClientInterface(, w) d = def@functions$getdates(40,-110, "MOD13Q1") d = d[c(length(d)-1, length(d))] o = def@functions$getsubset(40, -110, "MOD13Q1", "250m_16_days_NDVI", d[1], d[2], 10, 10)
f@functions$NDFDgenByDay(38.9936, -77.0224, Sys.time() + 60*24*60, 5, "12 hourly")
trace(SSOAP:::processWSDLOperation, quote(if(xmlGetAttr(node, "name") == "listMethods") browser())) w = processWSDL("http://www.fedora.info/definitions/api/Fedora-API-A-LITE.wsdl") f = genSOAPClientInterface(,w)The problem seems to be that the listMethodsResponse element is complexType/sequence with a type attribute and so we could infer is an R list of ObjectMethodsDef. But the listMethodsResponse message element has <message name="listMethodsResponse"> <part name="response" type="fedora-types:ArrayOfObjectMethodsDef"> <documentation>A set of method definitions that represent all possible disseminations that can be run on the object. </documentation> </part> </message> Note the fedora-types prefix on the value of the type attribute. <operation name="listMethods"> <input message="fedora-api:listMethodsRequest"/> <output message="fedora-api:listMethodsResponse"/> </operation> In resolve for SOAPType, if we fail to find a definition, we can look at the name of the type and see if it starts with ArrayOf. If so, we can create an ArrayType
w = processWSDL("http://www.ebi.ac.uk/webservices/chebi/2.0/webservice?wsdl") iface = genSOAPClientInterface(, w)infinite recursion
w = processWSDL("http://soap.bind.ca/wsdl/bind.wsdl") mol = genSOAPClientInterface(, w)Now get infinite recursion. Same with
Error in stop("No method for this type ", class(obj)) : No method for this type UnionDefinition In addition: Warning message: Ambiguous method selection for "resolve", target "UnionDefinition#SchemaCollection" (the first of the signatures shown will be used) BasicSOAPType#list SOAPType#SchemaCollection
w = processWSDL("http://pubmlst.org/api/mlst.wsdl") f = genSOAPClientInterface(, w)
obj_list = c('eco:b0514', 'eco:b2913') fg_list = c('#ff0000', '#00ff00') bg_list = c('#ffff00', 'yellow') kegg.iface@functions$color_pathway_by_objects('path:eco00260', obj_list, fg_list, bg_list)