When a 204 HTTP response code is returned to an XML "Results" action, a parser error is thrown by the Result action.
The system logs may show XML parse errors similar to the following:
xmlfirewall (204-Test): Parse error xmlfirewall (204-Test): Incomplete markup or missing document element at offset 0 of http://hostname:port/204Test
Server responds with an HTTP 204 response code and this does not have any payload or response body so there is no document available to the Results action to parse.
Resolving the problem
It is currently not possible for the XML Results action to process an HTTP 204 No Content response code without throwing a parse error since there is no document to parse. However, to work around this issue, the "Output Type" of the Results action can be set to Binary on the 'Advanced' tab of the Results action. Note that, setting the "Output Type" to Binary will disable parsing of any response document received. This means, the appropriate steps will have to be taken, through additional configuration in the processing rule, to parse and validate the response messages received.
The dp:parse extension function may be used in a custom stylesheet to parse an XML message to a node set. Also, the Validate action can be used during processing to validate a message against a schema.
More information about the dp:parse extension function can be found in the Extension Functions Catalog. This documentation can be obtained from the IBM WebSphere DataPower SOA Appliances Product documentation site.