diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/client/network/FhirRequestBuilder.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/client/network/FhirRequestBuilder.java index fb2fd464c..1e3098b59 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/client/network/FhirRequestBuilder.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/client/network/FhirRequestBuilder.java @@ -275,7 +275,7 @@ public class FhirRequestBuilder { case "application/xml": case "application/fhir+xml": case "text/xml": - resource = getParser(ResourceFormat.RESOURCE_JSON.getHeader()).parse(response.body().bytes()); + resource = getParser(ResourceFormat.RESOURCE_XML.getHeader()).parse(response.body().bytes()); break; case "text/plain": resource = outcomeFromTextError(response.body().string()); diff --git a/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/client/network/FhirRequestBuilder.java b/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/client/network/FhirRequestBuilder.java index 965322809..4d7d9a229 100644 --- a/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/client/network/FhirRequestBuilder.java +++ b/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/client/network/FhirRequestBuilder.java @@ -265,7 +265,7 @@ public class FhirRequestBuilder { case "application/xml": case "application/fhir+xml": case "text/xml": - resource = getParser(ResourceFormat.RESOURCE_JSON.getHeader()).parse(response.body().bytes()); + resource = getParser(ResourceFormat.RESOURCE_XML.getHeader()).parse(response.body().bytes()); break; case "text/plain": resource = OperationOutcomeUtilities.outcomeFromTextError(response.body().string()); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/FhirRequestBuilder.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/FhirRequestBuilder.java index e1d0b9448..14153a38b 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/FhirRequestBuilder.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/client/network/FhirRequestBuilder.java @@ -268,7 +268,7 @@ public class FhirRequestBuilder { case "application/xml": case "application/fhir+xml": case "text/xml": - resource = getParser(ResourceFormat.RESOURCE_JSON.getHeader()).parse(response.body().bytes()); + resource = getParser(ResourceFormat.RESOURCE_XML.getHeader()).parse(response.body().bytes()); break; case "text/plain": resource = OperationOutcomeUtilities.outcomeFromTextError(response.body().string());