[R] Calling php web service fails

Duncan Temple Lang duncan at wald.ucdavis.edu
Wed Oct 24 18:45:17 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Rohan7 wrote:
> hi,
> 
>   Thanks for replying. Actually today morning i saw the KEGG webservice by
> Bioconductor and i call my php web service in similar fashion. It worked.
> 
> - KEGG sample -
> #KEGGserver <- SOAPServer("http://soap.genome.ad.jp/keggapi/request.cgi")
> #KEGGxmlns = "SOAP/KEGG"
> #KEGGaction = "SOAP/KEGG"
>  neighbors <-  .SOAP(KEGGserver, "get_best_best_neighbors_by_gene",
>                             .soapArgs=list('genes_id' = genes.id,
>                             start = start,
>                                  'max_results' = max.results),
>                             action=KEGGaction, xmlns = KEGGxmlns, nameSpaces
> = SOAPNameSpaces(version=KEGGsoapns))
> 
> I changed the hostname and parameters according to my need. It's working
> now. 
> But now i'm facing a new problem. My other PHP webservice returns an array
> so i tried calling 
> it and got the error -
>  FromSOAP(response[[1]]) : Don't understand the SOAP type `xsd:array' yet.
> 
> Any suggestions on this error.


Firstly, is there a WSDL (Web Service Description Language) file for the
web service that you are working with. If so, you can generate
the R bindings from that and it will hide a great detail of the
details leaving you with an R function named, e.g.,

   get_best_neighbors_by_gene

which you can invoke directly and it will take care of
coercing the arguments to the right type and similarly
the result, if it can understand it.
This works for the KEGG WSDL and can programmatically
generate the same basic interface as had to be done
manually in the KEGG package on BioC.

Secondly, if there is a WSDL, I can take a look at it
and it will help to round out those cases not yet
implemented in the current SOAP.
Alternatively, invoke the .SOAP() call with

  .SOAP(......,   .convert = FALSE)

and send me (not the mailing list) the output
which should be an XML "document" and we can work from
that.  In fact, both the WSDL and the output would be best.

 D.




> 
> Thank you once again for such a prompt reply.=)
> 
> Regards,
> Rohan7
> 
> 
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHH3ad9p/Jzwa2QP4RAn7AAJ9xG2IUEaD3I3/f6LKun/xZqd/5lQCcDqjR
QX+2aIbmgq7c6ryF9co5+PU=
=J+s2
-----END PGP SIGNATURE-----



More information about the R-help mailing list