From: Dan T. <dte...@sy...> - 2006-11-03 18:22:39
|
I am using version 1.1.2 of the toolkit which appears to be the most recent. I am not using the client package, I have adapted TestClient.java from the com.ibm.lsid.server.impl.test package for my needs. But still, I'm calling the same server classes as LSIDTestClient....so why don't I seem to be getting this new functionality? Thanks Dan Benjamin H Szekely wrote: > > Hey Dan, > Are you using the latest version of the LSID java client ? The > newest version sets the proper metadata type. > > - Ben > > Ben Szekely > IBM Software Engineer > Advanced Internet Technology, Cambridge, MA > bhs...@us... > > lsi...@li... wrote on 11/02/2006 > 08:26:55 PM: > > > I figured this out. If anyone is interested, this is what I did: > > String[] formats = new String[1]; > > formats[0] = "application/rdf+xml"; > > MetadataResponse metadata = resolver.getMetadata(formats); > > > > You can also set formats to null to indicate you don't care about the > > return format. Still, there is a bit of a chicken and egg problem here > > because I don't really know the return format until the > > resolver.getMetadata() call has returned. So really I have to set > > formats to null, call getMetadata(), call getFormat() on the result to > > see if I know what to do with the format, and if I do, download the > data. > > > > > > Dan Tenenbaum wrote: > > > Hi, > > > > > > If I hit this LSID: > > > > > > urn:lsid:ncbi.nlm.nih.gov.lsid.biopathways.org:genbank:bx247883 > > > > > > ...in the Firefox plugin, I can view and save both the data and > metadata. > > > > > > I am writing a simple little client in Java and that client can > read the > > > data from this same LSID, but when I try and read the metadata, I > get : > > > > > > com.ibm.lsid.LSIDException: 401 : No acceptable metadata format > > > com.ibm.lsid.server.LSIDServerException: 401 : No acceptable > metadata format > > > (full stack trace below) > > > > > > Here is the relevant code from my client: > > > LSID lsid = new > > > > LSID("urn:lsid:ncbi.nlm.nih.gov.lsid.biopathways.org:genbank:bx247883"); > > > LSIDResolver resolver = getLSIDResolver(lsid); > > > MetadataResponse metadata = resolver.getMetadata(); // > this > > > line throws the exception > > > // here's the code to get the metadata stream and > display it... > > > > > > What is going on and how do I fix it? > > > > > > Thanks > > > Dan > > > > > > > > > > > > com.ibm.lsid.LSIDException: 401 : No acceptable metadata format > > > com.ibm.lsid.server.LSIDServerException: 401 : No acceptable > metadata format > > > at > > > com.ibm.lsid.server.impl.SimpleResolutionService. > > checkFormats(SimpleResolutionService.java:117) > > > at > > > > com.ibm.lsid.server.impl.ncbi.NCBIResolutionService.doGetMetadata(Unknown > > > Source) > > > at > > > com.ibm.lsid.server.impl.SimpleResolutionService. > > getMetadata(SimpleResolutionService.java:266) > > > at > > > com.ibm.lsid.server.impl.CachingMetadataService. > > getMetadata(CachingMetadataService.java:56) > > > at > > > com.ibm.lsid.server.servlet.MetadataServlet. > > processGet(MetadataServlet.java:102) > > > at > com.ibm.lsid.server.servlet.BaseServlet.doGet(BaseServlet.java:175) > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > at > > > org.apache.catalina.core.ApplicationFilterChain. > > internalDoFilter(ApplicationFilterChain.java:252) > > > at > > > org.apache.catalina.core.ApplicationFilterChain. > > doFilter(ApplicationFilterChain.java:173) > > > at > > > org.apache.catalina.core.StandardWrapperValve. > > invoke(StandardWrapperValve.java:213) > > > at > > > org.apache.catalina.core.StandardContextValve. > > invoke(StandardContextValve.java:178) > > > at > > > org.apache.catalina.core.StandardHostValve. > > invoke(StandardHostValve.java:126) > > > at > > > org.apache.catalina.valves.ErrorReportValve. > > invoke(ErrorReportValve.java:105) > > > at > > > org.apache.catalina.core.StandardEngineValve. > > invoke(StandardEngineValve.java:107) > > > at > > > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) > > > at > > > > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) > > > at > > > org.apache.coyote.http11. > > Http11BaseProtocol$Http11ConnectionHandler. > > processConnection(Http11BaseProtocol.java:667) > > > at > > > org.apache.tomcat.util.net.PoolTcpEndpoint. > > processSocket(PoolTcpEndpoint.java:527) > > > at > > > org.apache.tomcat.util.net.LeaderFollowerWorkerThread. > > runIt(LeaderFollowerWorkerThread.java:80) > > > at > > > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable. > > run(ThreadPool.java:684) > > > at java.lang.Thread.run(Thread.java:788) > > > printStackTrace(pw): com.ibm.lsid.server.LSIDServerException > > > > > > at com.ibm.lsid.http.HTTPUtils.doGet(HTTPUtils.java:142) > > > at > > > > com.ibm.lsid.client.LSIDResolver.getMetadataFromPort(LSIDResolver.java:679) > > > at > com.ibm.lsid.client.LSIDResolver.getMetadata(LSIDResolver.java:553) > > > at > com.ibm.lsid.client.LSIDResolver.getMetadata(LSIDResolver.java:493) > > > at > > > org.systemsbiology.compcore.lsidclient.SimpleClient. > > main(SimpleClient.java:44) > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > at > > > sun.reflect.NativeMethodAccessorImpl. > > invoke(NativeMethodAccessorImpl.java:39) > > > at > > > sun.reflect.DelegatingMethodAccessorImpl. > > invoke(DelegatingMethodAccessorImpl.java:25) > > > at java.lang.reflect.Method.invoke(Method.java:585) > > > at > com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) > > > printStackTrace(ps): com.ibm.lsid.LSIDException > > > > > > > > > > ------------------------------------------------------------------------- > > > Using Tomcat but need to do more? Need to support web services, > security? > > > Get stuff done quickly with pre-integrated technology to make > yourjob easier > > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > _______________________________________________ > > > Lsid-developer mailing list > > > Lsi...@li... > > > https://lists.sourceforge.net/lists/listinfo/lsid-developer > > > > > > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make your > job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > Lsid-developer mailing list > > Lsi...@li... > > https://lists.sourceforge.net/lists/listinfo/lsid-developer > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ------------------------------------------------------------------------ > > _______________________________________________ > Lsid-developer mailing list > Lsi...@li... > https://lists.sourceforge.net/lists/listinfo/lsid-developer > |