If you look in the SRW package, you'll see a class named
EmbeddedSRWDatabase.  It is actually a pretty full command-line client
that should demonstrate how to do pretty much everything you want to do.

 

Let me know if you have any problems!

 

Ralph

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of orlando
carvalho
Sent: Tuesday, March 20, 2007 8:42 AM
To: [email protected]
Subject: [Dspace-tech] using SRW client on Dspace

 

Hi there!
We put an SRW client working properly!
######################################################
import java.net.*;
import org.apache.axis.*;
import gov.loc.www.zing.srw.SearchRetrieveRequestType;
import gov.loc.www.zing.srw.SearchRetrieveResponseType;
import gov.loc.www.zing.srw.interfaces.SRWPort;
import gov.loc.www.zing.srw.srw_sample_service.SRWSampleServiceLocator;

/*
 * Created on 8/Mar/2007
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
//response.getEchoedSearchRetrieveRequest().getQuery()
/**
 * @author dspace
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class cliente_java { 

    public static void main(String[] args) {
        try{            
            SRWSampleServiceLocator service = new
SRWSampleServiceLocator();
            URL url = new URL(" http://localhost:8080/SRW/search/DSpace
<http://localhost:8080/SRW/search/DSpace> ");
            SRWPort port = service.getSRW(url);    
            SearchRetrieveRequestType request = new
SearchRetrieveRequestType();
            request.setQuery ("computer");
            SearchRetrieveResponseType response =
port.searchRetrieveOperation(request);
            //Object i = response.getResultSetId();
            System.out.println("Resultados:"+
response.getEchoedSearchRetrieveRequest().getQuery());
            
        }
        catch (Exception e){    
            e.printStackTrace();
        }
        
        
    }
}
###################################################### 
It returns:
           Results:1        (this is the number of records finded)
           Results:name (this is the author or the title of the item)

Our question is, how can we change this code to the answer to our
request returns the full description of the items stored on Dspace? 
Thanks for the help.
-- 
Orlando Carvalho 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to