diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml
index d4085fca4ec..1bdd3b18d47 100644
--- a/hapi-fhir-client-okhttp/pom.xml
+++ b/hapi-fhir-client-okhttp/pom.xml
@@ -79,11 +79,6 @@
jetty-servlet
test
-
- org.jboss.resteasy
- resteasy-jaxrs
- test
-
org.jboss.resteasy
resteasy-client
diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_0/changes.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_0/changes.yaml
index 8f9f59d7b94..a8c23850b6f 100644
--- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_0/changes.yaml
+++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_7_0/changes.yaml
@@ -25,6 +25,7 @@
Jetty Server (CLI): 9.4.43.v20210629 -> 9.4.44.v20210927
Spring Boot (Boot): 2.5.0 -> 2.6.2
Swagger UI (OpenAPI): 3.46.0 -> 4.1.3
+Resteasy (JAX-RS): 4.0.0.Beta3 -> 5.0.2.Final
"
diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml
index 4e86e70a461..460d6972517 100644
--- a/hapi-fhir-jaxrsserver-base/pom.xml
+++ b/hapi-fhir-jaxrsserver-base/pom.xml
@@ -72,11 +72,6 @@
${project.version}
-
- javax.ws.rs
- javax.ws.rs-api
- provided
-
javax.ejb
ejb-api
@@ -87,6 +82,11 @@
javax.servlet-api
provided
+
+ org.jboss.spec.javax.ws.rs
+ jboss-jaxrs-api_2.1_spec
+ provided
+
javax.annotation
@@ -122,11 +122,6 @@
-
- org.jboss.resteasy
- resteasy-jaxrs
- test
-
org.jboss.resteasy
resteasy-client
@@ -162,7 +157,7 @@
test
-
+
diff --git a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpClient.java b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpClient.java
index 6a1445b46cf..beff27524a5 100644
--- a/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpClient.java
+++ b/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/client/JaxRsHttpClient.java
@@ -20,27 +20,31 @@ package ca.uhn.fhir.jaxrs.client;
* #L%
*/
-import java.util.List;
-import java.util.Map;
-
+import ca.uhn.fhir.context.FhirContext;
+import ca.uhn.fhir.rest.api.Constants;
+import ca.uhn.fhir.rest.api.EncodingEnum;
+import ca.uhn.fhir.rest.api.RequestTypeEnum;
+import ca.uhn.fhir.rest.client.api.Header;
+import ca.uhn.fhir.rest.client.api.HttpClientUtil;
+import ca.uhn.fhir.rest.client.api.IHttpClient;
+import ca.uhn.fhir.rest.client.api.IHttpRequest;
+import ca.uhn.fhir.rest.client.impl.BaseHttpClientInvocation;
+import ca.uhn.fhir.rest.client.method.MethodUtil;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.Invocation.Builder;
-import javax.ws.rs.core.*;
-
+import javax.ws.rs.core.Form;
+import javax.ws.rs.core.MultivaluedHashMap;
+import javax.ws.rs.core.MultivaluedMap;
import org.hl7.fhir.instance.model.api.IBaseBinary;
-import ca.uhn.fhir.context.FhirContext;
-import ca.uhn.fhir.rest.api.*;
-import ca.uhn.fhir.rest.client.api.*;
-import ca.uhn.fhir.rest.client.impl.BaseHttpClientInvocation;
-import ca.uhn.fhir.rest.client.method.MethodUtil;
-import ca.uhn.fhir.rest.server.RestfulServerUtils;
+import java.util.List;
+import java.util.Map;
/**
* A Http Request based on JaxRs. This is an adapter around the class
* {@link javax.ws.rs.client.Client Client}
- *
+ *
* @author Peter Van Houte | peter.vanhoute@agfa.com | Agfa Healthcare
*/
public class JaxRsHttpClient implements IHttpClient {
@@ -52,8 +56,8 @@ public class JaxRsHttpClient implements IHttpClient {
private String myIfNoneExistString;
private RequestTypeEnum myRequestType;
- public JaxRsHttpClient(Client theClient, StringBuilder theUrl, Map> theIfNoneExistParams, String theIfNoneExistString,
- RequestTypeEnum theRequestType, List theHeaders) {
+ public JaxRsHttpClient(Client theClient, StringBuilder theUrl, Map> theIfNoneExistParams, String theIfNoneExistString,
+ RequestTypeEnum theRequestType, List theHeaders) {
this.myClient = theClient;
this.myUrl = theUrl;
this.myIfNoneExistParams = theIfNoneExistParams;
@@ -82,7 +86,7 @@ public class JaxRsHttpClient implements IHttpClient {
}
Entity