aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client
diff options
context:
space:
mode:
authorMaria Odea B. Ching <oching@apache.org>2009-01-08 10:14:02 +0000
committerMaria Odea B. Ching <oching@apache.org>2009-01-08 10:14:02 +0000
commitd2190ff6a841fc5a21293c0b2181bfeec1b4fd0e (patch)
tree78a5d3d6aedab9b7ec71925f263c86a42ec8e093 /archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client
parent9158c2f5dc073d4eb8643ca0a1c929e9451a3088 (diff)
downloadarchiva-d2190ff6a841fc5a21293c0b2181bfeec1b4fd0e.tar.gz
archiva-d2190ff6a841fc5a21293c0b2181bfeec1b4fd0e.zip
fix some problems in invoking search service
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@732674 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client')
-rw-r--r--archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java
index 5e3a67fe3..ac6839cc2 100644
--- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java
+++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/src/main/java/org/apache/archiva/web/xmlrpc/client/SampleClient.java
@@ -23,6 +23,8 @@ import java.net.URL;
import java.util.List;
import org.apache.archiva.web.xmlrpc.api.AdministrationService;
+import org.apache.archiva.web.xmlrpc.api.SearchService;
+import org.apache.archiva.web.xmlrpc.api.beans.Artifact;
import org.apache.archiva.web.xmlrpc.api.beans.ManagedRepository;
import org.apache.archiva.web.xmlrpc.api.beans.RemoteRepository;
@@ -117,6 +119,23 @@ public class SampleClient
System.out.println( "\nDeleted artifact 'javax.activation:activation:1.1' from repository 'internal' : " +
( (Boolean) success ).booleanValue() );
*/
+
+ /* quick search */
+ /*
+ * NOTE: before enabling & invoking search service, make sure that the artifacts you're searching
+ * for has been indexed already in order to get results
+ *
+ SearchService searchService = binder.bind( SearchService.class, new URL( args[0] ), authnInfo );
+ List<Artifact> artifacts = searchService.quickSearch( "org" );
+
+ System.out.println( "\n************ Search Results for 'org' *************" );
+ for( Artifact artifact : artifacts )
+ {
+ System.out.println( "Artifact: " + artifact.getGroupId() + ":" + artifact.getArtifactId() +
+ ":" + artifact.getVersion() );
+ }
+ */
+
}
catch ( BindingException e )
{