diff --git a/CHANGELOG.md b/CHANGELOG.md
index 69b6b5f..6ff6c22 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## [v4.2.0-SNAPSHOT]
- Enhanced gcube-bom version
+- Added usage of common-utility to overcome issues with different Smartgears version (i.e. 3 and 4)
## [v4.1.0]
diff --git a/pom.xml b/pom.xml
index 5b8f877..4e8b38d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,6 +49,10 @@
org.gcube.common
gxHTTP
+
+ org.gcube.common
+ common-utility
+
org.slf4j
slf4j-api
diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java
index 0719106..e306d63 100644
--- a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java
+++ b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java
@@ -7,6 +7,7 @@ import java.util.Map;
import org.gcube.common.gxhttp.reference.GXConnection;
import org.gcube.common.gxhttp.request.GXHTTPStringRequest;
+import org.gcube.common.http.GXHTTPUtility;
import org.gcube.informationsystem.base.reference.Element;
import org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
@@ -57,7 +58,7 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC
logger.trace("Going to create: {}", typeDefinitition);
Type typeDefinitionObj = TypeMapper.deserializeTypeDefinition(typeDefinitition);
- GXHTTPStringRequest gxHTTPStringRequest = GXHTTPStringRequest.newRequest(address);
+ GXHTTPStringRequest gxHTTPStringRequest = GXHTTPUtility.getGXHTTPStringRequest(address);
gxHTTPStringRequest.from(ResourceRegistrySchemaClient.class.getSimpleName());
gxHTTPStringRequest.header("Accept", GXConnection.APPLICATION_JSON_CHARSET_UTF_8);
gxHTTPStringRequest.header("Content-type", GXConnection.APPLICATION_JSON_CHARSET_UTF_8);
@@ -93,7 +94,7 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC
public boolean exist(String typeName) throws ResourceRegistryException {
try {
logger.info("Going to get {} schema", typeName);
- GXHTTPStringRequest gxHTTPStringRequest = GXHTTPStringRequest.newRequest(address);
+ GXHTTPStringRequest gxHTTPStringRequest = GXHTTPUtility.getGXHTTPStringRequest(address);
gxHTTPStringRequest.from(ResourceRegistrySchemaClient.class.getSimpleName());
gxHTTPStringRequest.header("Accept", GXConnection.APPLICATION_JSON_CHARSET_UTF_8);
gxHTTPStringRequest.path(TypePath.TYPES_PATH_PART);
@@ -135,7 +136,7 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC
public String read(String typeName, Boolean polymorphic) throws ContextNotFoundException, ResourceRegistryException {
try {
logger.info("Going to get {} schema", typeName);
- GXHTTPStringRequest gxHTTPStringRequest = GXHTTPStringRequest.newRequest(address);
+ GXHTTPStringRequest gxHTTPStringRequest = GXHTTPUtility.getGXHTTPStringRequest(address);
gxHTTPStringRequest.from(ResourceRegistrySchemaClient.class.getSimpleName());
gxHTTPStringRequest.header("Accept", GXConnection.APPLICATION_JSON_CHARSET_UTF_8);
gxHTTPStringRequest.path(TypePath.TYPES_PATH_PART);