[Smartcc-cvs] smartcc/google/src/org/smartcc/google GoogleSearchClient.java,NONE,1.1 GoogleSearchHom
Brought to you by:
hengels
|
From: <he...@us...> - 2002-06-14 16:23:38
|
Update of /cvsroot/smartcc/smartcc/google/src/org/smartcc/google In directory usw-pr-cvs1:/tmp/cvs-serv11046/google/src/org/smartcc/google Added Files: GoogleSearchClient.java GoogleSearchHome.java Log Message: the subproject 'google' demonstrates, how web services can be transparently access like session beans --- NEW FILE: GoogleSearchClient.java --- /* * $Id: GoogleSearchClient.java,v 1.1 2002/06/14 16:23:34 hengels Exp $ * (c) Copyright 2002 Holger Engels. * * This file is part of the Smart Client Container (http://smartcc.sourceforge.net). * * SmartCC is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 * of the License, or (at your option) any later version. * * Please see COPYING for the complete licence. */ package org.smartcc.google; import java.io.*; import java.net.*; import java.rmi.*; import java.util.*; import javax.naming.*; import java.rmi.*; import javax.ejb.*; public class GoogleSearchClient { public static void main(String[] args) throws Exception { Context context = new InitialContext(); GoogleSearchHome googleHome = (GoogleSearchHome)context.lookup("ejb/GoogleSearch"); GoogleSearchPort google = googleHome.create(); String key = (String)context.lookup("google.license"); GoogleSearchResult result = google.doGoogleSearch(key, "smartcc", 0, 10, true, null, true, "lang_de", "latin1", "latin1"); System.out.println("" + result.toString()); } } --- NEW FILE: GoogleSearchHome.java --- package org.smartcc.google; import java.rmi.*; import javax.ejb.*; public interface GoogleSearchHome extends EJBHome { GoogleSearchPort create() throws RemoteException, CreateException; } |