From 8391b7c4d759e533e9482935fd66b0214504b8b4 Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Tue, 2 Aug 2011 02:35:47 +0000 Subject: [MRM-1484] Upgrade Atlassian XMLRPC binder to 0.11 to get fix for multi-threading issue in Aapache XMLRPC 3.1.1+ git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1153002 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva-xmlrpc/archiva-xmlrpc-client/pom.xml | 6 +++++- .../apache/archiva/web/xmlrpc/client/SampleClient.java | 17 ++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'archiva-modules/archiva-web/archiva-xmlrpc') diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/pom.xml b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/pom.xml index b020b60bf..b9a812c79 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/pom.xml +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/pom.xml @@ -40,6 +40,10 @@ + + com.atlassian.xmlrpc + atlassian-xmlrpc-binder-client-apache + org.slf4j jcl-over-slf4j @@ -75,7 +79,7 @@ - http://127.0.0.1:8080/archiva/ + http://127.0.0.1:8080/archiva admin 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 a85382bca..0158883be 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 @@ -22,10 +22,10 @@ package org.apache.archiva.web.xmlrpc.client; import java.net.URL; import java.util.List; -import com.atlassian.xmlrpc.AuthenticationInfo; +import com.atlassian.xmlrpc.ApacheBinder; import com.atlassian.xmlrpc.Binder; import com.atlassian.xmlrpc.BindingException; -import com.atlassian.xmlrpc.DefaultBinder; +import com.atlassian.xmlrpc.ConnectionInfo; import org.apache.archiva.web.xmlrpc.api.AdministrationService; import org.apache.archiva.web.xmlrpc.api.PingService; import org.apache.archiva.web.xmlrpc.api.beans.ManagedRepository; @@ -49,13 +49,16 @@ public class SampleClient { public static void main( String[] args ) { - Binder binder = new DefaultBinder(); - + + Binder binder = new ApacheBinder(); + ConnectionInfo info = new ConnectionInfo(); + info.setUsername( args[1] ); + info.setPassword( args[2] ); + try { - AuthenticationInfo authnInfo = new AuthenticationInfo( args[1], args[2] ); - AdministrationService adminService = binder.bind( AdministrationService.class, new URL( args[0] ), authnInfo ); - PingService pingService = binder.bind( PingService.class, new URL( args[0] ), authnInfo ); + AdministrationService adminService = binder.bind( AdministrationService.class, new URL( args[0] ), info ); + PingService pingService = binder.bind( PingService.class, new URL( args[0] ), info ); System.out.println( "Ping : " + pingService.ping() ); -- cgit v1.2.3