Version : eXtendPS-SE 1.3.6 and above
Audience: Administrator
Overview
The XML Response Validation feature in eXtendPS-SE helps identify and resolve errors in PromoStandards XML responses. It validates data types, field value limits, and the presence of mandatory fields according to PromoStandards specifications.
Configuration
The XML Response Validation can be enabled for the following services:
- Order Status
- Order Shipment Notification
- Product Data
- Product Pricing and Configuration
Enabling XML Response Validation
To enable this feature:
- Navigate to the setup page of the applicable service.
- Locate the "Validate Response" checkbox.
- Check the box to enable the feature.
Usage
When enabled, the validation will check:
- Data types of elements in the response
- Presence of PromoStandards-required fields
- Field value limits as per PromoStandards specifications
Any validation issues will be returned in the XML response to the endpoint that's using validation.
Example
Here's an example of a Product Data response with an improperly configured apparel size field:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://www.promostandards.org/WSDL/ProductDataService/1.0.0/" xmlns:ns="http://www.promostandards.org/WSDL/ProductDataService/1.0.0/SharedObjects/" xmlns:ns1="http://www.codesynthesis.com/xmlns/xsstl"><soap:Body><soap:Fault><faultcode>Server</faultcode><faultstring>ApparelSize should have required property '$value'</faultstring></soap:Fault></soap:Body></soap:Envelope>
A faultcode is returned showing an issue with the field used for the ApparelSize element. "ApparelSize should have required property '$value'".
Frequently Asked Questions (FAQs)
Q: When should I use the XML Response Validation feature?
A: This feature should be used during debugging and User Acceptance Testing (UAT). It's recommended to disable it during normal Production use to avoid any performance impact on your services.
Q: What are common reasons for XML response errors?
A: Common reasons include:
- Incorrect data types in fields
- Field values exceeding PromoStandards specifications
- Missing mandatory field values
Q: How does the validation help in resolving errors?
A: It identifies the specific element causing the error and provides possible reasons for the failure, making troubleshooting more efficient.