Hi Nilesh You need to use the fedora client admin jar (you will find this under the client directory in your Fedora installation), and use the class fedora.client.FedoraClient (now org.fcrepo.client.FedoraClient in the trunk) to get the APIM. You might take a look at the client/demo/soapclient/DemoSOAPClient.java for some examples (though there are some known issues with this demo, the code will still provide you with some guidance). You may find it easier to use the REST API - see http://www.fedora-commons.org/confluence/display/FCR30/REST+API Regards Steve
-----Original Message----- From: [email protected] [mailto:[email protected]] Sent: 23 April 2010 16:37 To: [email protected]; [email protected] Subject: Re: [Fedora-commons-developers] Cant access API-M So here are the exact details I have. The actual error I get is the following "The server sent HTTP status code 302: Moved Temporarily" The following is the source code I am using to try to connect to API-M. I am still new to JSP programming so the following approach to accessing the web service maybe wrong and I would love your input on the proper way of accessing the service. //////////////////////////////////////////////////////////////////////////// ///////////////// try { // Call Web Service Operation info.fedora.definitions._1._0.api.FedoraAPIMService service = new info.fedora.definitions._1._0.api.FedoraAPIMService(); String test = service.getWSDLDocumentLocation().toString(); info.fedora.definitions._1._0.api.FedoraAPIM port = service.getFedoraAPIMServiceHTTPPort(); //out.write(port.); info.fedora.definitions._1._0.types.Export exprt = new info.fedora.definitions._1._0.types.Export(); // TODO initialize WS operation arguments here java.lang.String pid = "fedora-system:ContentModel-3.0"; java.lang.String dsid = "DC"; Date asOf = new Date(); asOf.setDate(13); asOf.setMonth(3); asOf.setYear(2010); // TODO process result here info.fedora.definitions._1._0.types.Datastream result = port.getDatastream(pid, dsid, asOf.toGMTString()); out.println("Result = "+result.toString()); } catch (Exception ex) { // TODO handle custom exceptions here out.println(ex.getMessage()); } //////////////////////////////////////////////////////////////////////////// ////////////////////////////// Nothing in fedora log that shows any error. Nilesh -----Original Message----- From: Steve Bayliss <[email protected]> To: [email protected]; [email protected] Sent: Fri, Apr 23, 2010 5:36 am Subject: RE: [Fedora-commons-developers] Cant access API-M Hi Nilesh Is there anything in the Tomcat or Fedora logs that gives more information on this? How are you trying to connect to API-M? What software/libraries etc are you using? Regards Steve -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: 23 April 2010 01:35 To: [email protected] Subject: [Fedora-commons-developers] Cant access API-M So currently I am trying to connect to API-M on my local fedora server through JSP. But I cannot figure out how to get it to work. The API-M is loaded, the port is provided, but when I actually try to obtain anything from the API-M service I get the error "The server sent HTTP status code 302: Moved Temporarily" which doesn't really help me at all. I initially thought that maybe this was a problem with SSL, and it still maybe, but I tried to change settings around in tomcat added keystores and truststore. But no luck so far. Any ideas on what I need to do. BTW, to access API-M shouldn't I have to provide username and password or something to connect to the service, or no. Sincerely, Nilesh Tailor IPL Developer
------------------------------------------------------------------------------
_______________________________________________ Fedora-commons-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers
