You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Order of elements in datasource item XML is wrong #335
changed the title [-]Tableau 2018.1 server does not accept data source through REST API[/-][+]Order of elements in datasource item XML is wrong[/+]on Nov 10, 2021
DatasourceItem responses are just elements as constructed by various serializers in Server, but also whatever language you happen to use (python here) -- I don't recommend that we make order part of the API contract, it could change if the underlying java library changes how it writes data out. If you use the JSON representation your even more likely to hit different element ordering because many hash maps/dicts aren't ordered.
If we use sequence in our XSD maybe that's incorrect and it should be something else that doesn't require ordering?
The xsd sequence element generates this restriction on the Java class:
@XmlType(name = "customViewType", propOrder = {
"view",
"workbook",
"owner"
})
however this is only expected to affect the serialized output, not the acceptable input.
AFAICT, we could replace xs:sequence with xs:all in every case and the only effect should be removing this (not-supposed-to-exist) constraint on order of elements.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.
Closing as not-planned. Reviewed in 2026: TSC's request_factory.py::DatasourceRequest._generate_xml still emits <project> before <connectionCredentials>, which doesn't match the XSD sequence the original report validated against — that hasn't changed. What has changed is that Tableau Server no longer rejects the request over element order; samples/publish_datasource.py (which exercises this exact XML with --conn-username / --conn-password) has been shipping and working in the field for years, and there have been no re-reports of a 400011 from ordering since 2019. If a strict-XSD client on the response side is running into a related mismatch, please open a fresh issue with the specific element sequence and a repro against current Server.
Activity
t8y8 commentedon Sep 5, 2018
@irwando @RussTheAerialist the ordering of elements shouldn't matter -- this seems like a Server-side problem?
Bartman0 commentedon Sep 5, 2018
Bartman0 commentedon Feb 14, 2019
jacalata commentedon Nov 10, 2021
Order does matter in xml for elements in a sequence. I can repro this locally with newer versions of Server as well.
https://stackoverflow.com/questions/4328867/does-xml-care-about-the-order-of-elements
[-]Tableau 2018.1 server does not accept data source through REST API[/-][+]Order of elements in datasource item XML is wrong[/+]t8y8 commentedon Nov 10, 2021
DatasourceItem responses are just elements as constructed by various serializers in Server, but also whatever language you happen to use (python here) -- I don't recommend that we make order part of the API contract, it could change if the underlying java library changes how it writes data out. If you use the JSON representation your even more likely to hit different element ordering because many hash maps/dicts aren't ordered.
If we use sequence in our XSD maybe that's incorrect and it should be something else that doesn't require ordering?
bcantoni commentedon Jan 14, 2022
I don't believe there is anything to fix here, but will leave open to investigate that question about changing things in the XSD.
jacalata commentedon Feb 14, 2023
The xsd sequence element generates this restriction on the Java class:
@XmlType(name = "customViewType", propOrder = {
"view",
"workbook",
"owner"
})
however this is only expected to affect the serialized output, not the acceptable input.
AFAICT, we could replace xs:sequence with xs:all in every case and the only effect should be removing this (not-supposed-to-exist) constraint on order of elements.
github-actions commentedon Aug 18, 2026
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.
jacalata commentedon Aug 25, 2026
Closing as not-planned. Reviewed in 2026: TSC's
request_factory.py::DatasourceRequest._generate_xmlstill emits<project>before<connectionCredentials>, which doesn't match the XSD sequence the original report validated against — that hasn't changed. What has changed is that Tableau Server no longer rejects the request over element order;samples/publish_datasource.py(which exercises this exact XML with--conn-username/--conn-password) has been shipping and working in the field for years, and there have been no re-reports of a 400011 from ordering since 2019. If a strict-XSD client on the response side is running into a related mismatch, please open a fresh issue with the specific element sequence and a repro against current Server.