Skip to content

Parsing bug in XML formatted responses #47

Description

@bunyaminsg

When a domain resource has text attribute with div and status (Narrative) is requested by a query with Accept: application/fhir+xml header, it gives error response as described below.

If it's a read request as get fhir/ResourceType/id, the response is:

<OperationOutcome xmlns="http://hl7.org/fhir">
    <issue>
        <severity value="error"/>
        <code value="invalid"/>
        <diagnostics value="Problem while converting JSON to XML:Content is not allowed in prolog."/>
    </issue>
</OperationOutcome>

If it's a search requests (fhir/ResourceType?params) that results in a bundle containing that resource, the response is:

<OperationOutcome xmlns="http://hl7.org/fhir">
    <issue>
        <severity value="error"/>
        <code value="invalid"/>
        <diagnostics value="Problem while converting JSON to XML:null"/>
    </issue>
</OperationOutcome>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions