Can the API let me know when unknown tags are in my request rather than ignoring them?
Every API call that uses a CompatibilityLevel (Version) of at least 439 can use <WarningLevel>High</WarningLevel> in the request to get this functionality.
Indicating <WarningLevel>High</WarningLevel> in a request will cause the API to return a Warning when elements that are in the request are not defined in the schema.
Since schema elements are case sensitive, this is a good way to remove any potential hidden bugs within your application before putting your application into a Production setting.
Our recommendation is to use <WarningLevel>High</WarningLevel> in your development and debugging.
We recommend that you do not keep this in your requests in Production code.
This is only a recommendation at this time and not a requirement.
You should use <WarningLevel>High</WarningLevel> much like Debug.Assert statements to help you in development and testing of your application.
Here is an example of what can be returned when <WarningLevel>High</WarningLevel> is used in the request:
Let's say you have an AddItemRequest in which the Item has the following:
In this case the element <StoreFront> is not defined in the schema (the correct element is <Storefront>).
Using <WarningLevel>High</WarningLevel> in such an AddItemRequest will return the following warning:
<ShortMessage>Unrecognized element <Item.StoreFront> in SOAP request.</ShortMessage>
<LongMessage>The element <Item.StoreFront> was found in the input SOAP request. This is not a declared element in the schema and will be ignored.</LongMessage>
Note that a SeverityCode of Warning is returned and not a SeverityCode of Error. The call will not be blocked due to these unrecognized elements.
Please note that <WarningLevel>High</WarningLevel> will not report a Warning on attributes (XML attributes, this has nothing to do with Item Specifics) within XML elements that are not in the schema.
Please note that <WarningLevel>High<WarningLevel> does not control warnings related to unrecognized values within elements.
Please note that this feature relies on all of our complexTypes having xs:any declared (for complexTypes that do not have xs:any declared, there will be no warning produced in that type)
We believe that 100% or very nearly 100% of our complexTypes do have xs:any declared as of this writing.
The following documentation resources are available: