Hi Manish,
You mention in the title application/xhtml+xml but your backend response returns html code as response with content-type as text/html. Are you attempting to parse the backend response? If so, what does that parse policy look like and what version of DataPower are you using? If you are doing a parse policy and the use content type option is selected, there was an issue at one time, since fixed, where text/html was attempting to parse the payload as xml and would fail. Also, if the parse object settings reference is Default, that default parse settings uses a type of Detect and unfortunately will see the starting < to tell it to attempt to parse as xml and would also fail. Even if the html was well formed from an XML perspective, with the DOCTYPE you probably have an external reference which is forbidden and will also cause the parse to fail. Are you attempting to extract something from this backend response where you need the payload parsed? If not the solution would be as simple as removing the parse policy. If you only get this error on the text/html error responses, but otherwise are getting valid JSON responses to your JSON request, assuming you have a later version with the fix you could do a parse with content-type and the html would be parsed as a binary stream and not as an xml document.
Regards,
Steve
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
------------------------------