Has anyone got SSOAP working on anything besides KEGG?
I just tried another 3 SOAP servers. Both the WSDL and constructing the .SOAP
call. Again the perl and ruby interface worked without any hitches.
Paul
> library(SSOAP)
>
massBank<-processWSDL("massbank.jp/api/services/MassBankAPI?wsdl")
Error in parse(text = paste(txt, collapse = "\n")) :
<text>:1:29: unexpected input
1: function(x, ..., obj = new( ?
^
In addition: Warning message:
In processWSDL("massbank.jp/api/services/MassBankAPI?wsdl")
:
Ignoring additional <service><port> ...
elements>
>
metlin<-processWSDL("metlin.scripps.edu/soap/metlin.wsdl")
Error in parse(text = paste(txt, collapse = "\n")) :
<text>:1:29: unexpected input
1: function(x, ..., obj = new( ?
^>
pubchem<-processWSDL("pubchem.ncbi.nlm.nih.gov/pug_soap/pug_soap.cgi?wsdl")
Error in parse(text = paste(txt, collapse = "\n")) :
<text>:1:29: unexpected input
1: function(x, ..., obj = new( ?
^
On 20 Jul 2011, at 01:54, Benton, Paul wrote:
> Dear all,
>
> I've been trying on and off for the past few months to get SSOAP to
work with chemspider. First I tried the WSDL file:
>
>
cs<-processWSDL("chemspider.com/MassSpecAPI.asmx?WSDL")
> Error in parse(text = paste(txt, collapse = "\n")) :
> <text>:1:29: unexpected input
> 1: function(x, ..., obj = new( ?
> ^
> In addition: Warning message:
> In processWSDL("chemspider.com/MassSpecAPI.asmx?WSDL")
:
> Ignoring additional <service><port> ... elements
>
> Next I've tried using just the pure .SOAP to call the database.
>
> s <- SOAPServer("chemspider.com/MassSpecAPI.asmx")
> csid<- .SOAP(s, "SearchByMass2", mass=89.04767, range=0.01,
> action = I("chemspider.com/SearchByMass2"),
> xmlns = c("chemspider.com"), .opts =
list(verbose = TRUE))
>
> This seems to work and gives back a result. However, this result isn't
the right result. It's seems to have converted the mass into 0. When I run
the similar program in perl I get the correct id's. So this isn't a
server side problem but SSOAP. Any thoughts or suggestions on other packages to
use?
> Further infomation about the SeachByMass2 method and it's xml that
it's expecting.
> chemspider.com/MassSpecAPI.asmx?op=SearchByMass2
>
> Cheers,
>
>
> Paul
>
>
> PS Placing a fake error in the .SOAP code I can look at the xml it's
sending to the server:
> Browse[1]> doc
> <?xml version="1.0"?>
> <SOAP-ENV:Envelope
xmlns:SOAP-ENC="schemas.xmlsoap.org/soap/encoding"
xmlns:SOAP-ENV="schemas.xmlsoap.org/soap/envelope"
xmlns:xsi="w3.org/2001/XMLSchema-instance"
xmlns:xsd="w3.org/2001/XMLSchema"
SOAP-ENV:encodingStyle="schemas.xmlsoap.org/soap/encoding">
> <SOAP-ENV:Body>
> <ns:SearchByMass2 xmlns:ns="chemspider.com">
> <ns:mass>89.04767</ns:mass>
> <ns:range>0.01</ns:range>
> </ns:SearchByMass2>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>