summaryrefslogtreecommitdiffstats
path: root/base/kra/functional/src
diff options
context:
space:
mode:
Diffstat (limited to 'base/kra/functional/src')
-rw-r--r--base/kra/functional/src/com/netscape/cms/servlet/test/DRMRestClient.java13
-rw-r--r--base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java9
2 files changed, 14 insertions, 8 deletions
diff --git a/base/kra/functional/src/com/netscape/cms/servlet/test/DRMRestClient.java b/base/kra/functional/src/com/netscape/cms/servlet/test/DRMRestClient.java
index 243e0d91c..372b8aea6 100644
--- a/base/kra/functional/src/com/netscape/cms/servlet/test/DRMRestClient.java
+++ b/base/kra/functional/src/com/netscape/cms/servlet/test/DRMRestClient.java
@@ -5,10 +5,10 @@ import java.util.Collection;
import java.util.Iterator;
import org.jboss.resteasy.client.ClientResponse;
-import org.jboss.resteasy.client.ProxyFactory;
import com.netscape.certsrv.dbs.keydb.KeyId;
import com.netscape.certsrv.request.RequestId;
+import com.netscape.cms.client.cli.ClientConfig;
import com.netscape.cms.servlet.admin.SystemCertificateResource;
import com.netscape.cms.servlet.cert.model.CertificateData;
import com.netscape.cms.servlet.csadmin.CMSRestClient;
@@ -29,11 +29,12 @@ public class DRMRestClient extends CMSRestClient {
private KeyRequestResource keyRequestClient;
private SystemCertificateResource systemCertClient;
- public DRMRestClient(String baseUri, String clientCertNick) throws URISyntaxException {
- super(baseUri,clientCertNick);
- systemCertClient = ProxyFactory.create(SystemCertificateResource.class, uri, executor, providerFactory);
- keyRequestClient = ProxyFactory.create(KeyRequestResource.class, uri, executor, providerFactory);
- keyClient = ProxyFactory.create(KeyResource.class, uri, executor, providerFactory);
+ public DRMRestClient(ClientConfig config) throws URISyntaxException {
+ super(config);
+
+ systemCertClient = createProxy(SystemCertificateResource.class);
+ keyRequestClient = createProxy(KeyRequestResource.class);
+ keyClient = createProxy(KeyResource.class);
}
public String getTransportCert() {
diff --git a/base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java b/base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java
index 5323777bd..62cdfe992 100644
--- a/base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java
+++ b/base/kra/functional/src/com/netscape/cms/servlet/test/DRMTest.java
@@ -39,6 +39,7 @@ import org.mozilla.jss.util.Password;
import com.netscape.certsrv.dbs.keydb.KeyId;
import com.netscape.certsrv.request.RequestId;
+import com.netscape.cms.client.cli.ClientConfig;
import com.netscape.cms.servlet.base.CMSResourceService;
import com.netscape.cms.servlet.key.model.KeyData;
import com.netscape.cms.servlet.key.model.KeyDataInfo;
@@ -193,10 +194,14 @@ public class DRMTest {
// Set base URI and get client
- String baseUri = protocol + "://" + host + ":" + port + "/kra/pki";
DRMRestClient client;
try {
- client = new DRMRestClient(baseUri, clientCertNickname);
+ ClientConfig config = new ClientConfig();
+ config.setServerURI(protocol + "://" + host + ":" + port + "/kra");
+ config.setCertNickname(clientCertNickname);
+
+ client = new DRMRestClient(config);
+
} catch (Exception e) {
e.printStackTrace();
return;