[MOBY-l] Java call to MOBY fails
Dave Waddell
dwaddell at nutecsciences.com
Tue Feb 17 15:05:16 UTC 2004
I'm trying to make a call to MOBY to retrieve a Genbank Flat File record
using:
String NCBI_Acc = "AA936757";
String XMLInput = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+
"<moby:MOBY
xmlns:moby=\"http://www.biomoby.org/moby\">\n" +
"<moby:Query>\n" +
"<moby:queryInput>\n" +
"<Simple articleName=''>\n" +
"<Object
namespace=\"urn:lsid:biomoby.org:namespacetype:NCBI_Acc\" id=\"" + NCBI_Acc
+ "\"/>\n" +
"</Simple>\n" +
"</moby:queryInput>\n" +
"</moby:Query>\n" +
"</moby:MOBY>\n";
CentralImpl newCall = new
CentralImpl("http://mobycentral.cbr.nrc.ca/cgi-bin/Services/Services.cgi",
"http://biomoby.org/");
result = newCall.call("MOBYSHoundGetGenBankff", XMLInput);
but all I get back in "result" is:
<?xml version='1.0' encoding='UTF-8'?>
<moby:MOBY xmlns:moby='http://www.biomoby.org/moby'
xmlns='http://www.biomoby.org/moby'>
<moby:Response moby:authority='illuminae.com'>
<moby:queryResponse moby:queryID=''/>
</moby:Response>
</moby:MOBY>
I have also tried feeding the namespace from:
String[] inputs = new String[]{"NCBI_gi", "NCBI_Acc"};
MobyService[] serviceInstance = worker.findService(inputs);
for (int j=0; i<serviceInstance.length; i++)
{
System.out.println("NCBI Service # " + i + "= " +
serviceInstance[i].toString());
}
"<Object namespace=\"" + inputs[0] + "\" id=\"" + NCBI_Acc +
"\"/>\n"
also:
"<Object
namespace=\"urn:lsid:biomoby.org:namespacetype:NCBI_Acc:" + NCBI_Acc +
"\"/>\n"
Which all give the same result. Any suggestions are appreciated.
Thanks, Dave.
More information about the moby-l
mailing list