Month: August 2012

XML Serialization: Removing unnecessary XML name spaces.

During the last week I have been working on one of the payment gateway implementation for the current project that I’m working. For this particular payment gateway, it accepts web request as serialized XML. Also it sends the response back to us as XML and we need to deserialize it.
The serialization was already implemented in one of the XML helper class in the solution. I only have to pass the object to get is serialized. After implementing this I have started to test it and all the test were failing. I had to spend painfully longer hours to understand what is exactly going on.
I found the issue by comparing the system generated XML request and the sample request sent from the support and also with the sample request on API documentation. The issue was there are some unnecessary XML namespaces in the root element and the payment gateway can’t process the root element with the namespaces.
(more…)

Advertisements