cancel
Showing results for 
Search instead for 
Did you mean: 

xml tag missing in OData response

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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/

former_member185414
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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.

former_member185414
Active Contributor
0 Kudos

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.

iftah_peretz
Active Contributor
0 Kudos

Hi,

And what kind of problems is it causing?

Former Member
0 Kudos

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.