Version : eXtendPS-SE 1.3.6 and above
Audience: Administrator

Sometimes, you may encounter errors in your XML responses, such as "Input string was not in correct format" or "Invalid xml attribute".

These errors occur most of the time due to the following reasons:
  1. The data type of the field used to create the PromoStandards response is incorrect according to PromoStandards' specifications. For example: PromoStandards requires an integer value, but your mapped field contains a decimal value.
  2. The field values in the response exceed the limit specified in the PromoStandards specifications.

  3. A field value is missing for a mandatory PromoStandards field.

To help resolve these types of errors, you can use the XML Response Validation feature included in the eXtendPS-SE bundle. This feature enables you to identify the element that is causing the error and provides possible reasons for the failure.

This validation checks the data type of the elements sent in the response, as well as the presence of PromoStandards-required fields in the response.

As of eXtendPS-SE version 1.3.6, the XML Response Validation tool can be used to validate the following services:
1. Order Status
2. Order Shipment Notification
3. Product Pricing and Configuration
4. Product Data

You can enable or disable this feature using the "Validate Response" checkbox, which appears on the setup page of each applicable service.

The screenshots below, taken from each Setup screen, show the "Validate Response" field:

1. Order Status


2. Order Shipment Notification
Image Placeholder

3. Product Pricing and Configuration


4. Product Data


Example: The snippet below shows a Product Data response where the item's apparel size field is not configured properly. The XML response shows an example of what would be returned with Validate Response enabled:
<?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 &apos;$value&apos;</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'".  

Note: this feature should be enabled only during debugging and UAT. It should be disabled during normal Production use to avoid any performance impact on your service(s).