summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/common/src/com/netscape/certsrv/tps/config/ConfigClient.java3
-rw-r--r--base/common/src/com/netscape/certsrv/tps/config/ConfigResource.java3
-rw-r--r--base/tps-tomcat/src/org/dogtagpki/server/tps/config/ConfigService.java5
3 files changed, 7 insertions, 4 deletions
diff --git a/base/common/src/com/netscape/certsrv/tps/config/ConfigClient.java b/base/common/src/com/netscape/certsrv/tps/config/ConfigClient.java
index a9821c6ba..8abc6502d 100644
--- a/base/common/src/com/netscape/certsrv/tps/config/ConfigClient.java
+++ b/base/common/src/com/netscape/certsrv/tps/config/ConfigClient.java
@@ -41,7 +41,8 @@ public class ConfigClient extends Client {
}
public ConfigData getConfig() {
- return resource.getConfig();
+ Response response = resource.getConfig();
+ return client.getEntity(response, ConfigData.class);
}
public ConfigData updateConfig(ConfigData configData) {
diff --git a/base/common/src/com/netscape/certsrv/tps/config/ConfigResource.java b/base/common/src/com/netscape/certsrv/tps/config/ConfigResource.java
index 21cb3f0b1..6c2187a2a 100644
--- a/base/common/src/com/netscape/certsrv/tps/config/ConfigResource.java
+++ b/base/common/src/com/netscape/certsrv/tps/config/ConfigResource.java
@@ -40,8 +40,9 @@ import com.netscape.certsrv.authentication.AuthMethodMapping;
public interface ConfigResource {
@GET
+ @ClientResponseType(entityType=ConfigData.class)
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- public ConfigData getConfig();
+ public Response getConfig();
@PUT
@ClientResponseType(entityType=ConfigData.class)
diff --git a/base/tps-tomcat/src/org/dogtagpki/server/tps/config/ConfigService.java b/base/tps-tomcat/src/org/dogtagpki/server/tps/config/ConfigService.java
index 9b10bbc8e..5604eae5d 100644
--- a/base/tps-tomcat/src/org/dogtagpki/server/tps/config/ConfigService.java
+++ b/base/tps-tomcat/src/org/dogtagpki/server/tps/config/ConfigService.java
@@ -73,7 +73,7 @@ public class ConfigService extends PKIService implements ConfigResource {
}
@Override
- public ConfigData getConfig() {
+ public Response getConfig() {
CMS.debug("ConfigService.getConfig()");
@@ -82,7 +82,8 @@ public class ConfigService extends PKIService implements ConfigResource {
ConfigRecord configRecord = configDatabase.getRecord("Generals");
Map<String, String> properties = configDatabase.getProperties(configRecord, null);
- return createConfigData(properties);
+
+ return createOKResponse(createConfigData(properties));
} catch (PKIException e) {
throw e;