Skip to Content
avatar image
Former Member

xml tag missing in OData response

OData request is not returning response with xml tag((<?xml version="1.0" encoding="utf-8"?>).

untitled.png (50.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Dec 22, 2017 at 11:43 PM

    Hi,

    And what kind of problems is it causing?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Its being consumed in cURL. And there they have a validation to make sure the response has xml tag in it. That validation if failing. Even without xml tag its still a valid XML response so either they remove that check or add the missing xml tag themselves. But they have this check for other services too and above all it was working fine on OData version 1.0 so its coming back on us to makes sure response has xml tag in it.

  • Dec 23, 2017 at 07:15 AM

    Only the metadata call has version and encoding details the actual data has only version details but as mentioned by Iftah how does it matter.

    Also your OData call is for data and not metadata.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 23, 2017 at 07:28 AM

    The response is a valid xml. No issue there. The only problem is its missing "<?xml version="1.0" encoding="utf-8"?>" . Rather it starts with <Feed tag. Its being consumed in cURL and there they have a validation to look for xml tag in OData response. That check if failing. Thats whats causing the issue.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 23, 2017 at 08:50 AM

    Is it because of $expand being used? I see something about it in OData V2 documentation on "Representing Collections of Entries"

    http://www.odata.org/documentation/odata-version-2-0/atom-format/

    Add comment
    10|10000 characters needed characters exceeded

    • As mentioned the URL call is for data and not metadata. Metadata calls have xml version and encoding details.In that case, change the URL to /sap/opu/odata/sap/DELIVERYDUELIST/$metadata. This will give the metadata information and you need to trigger another call for data.