Allow logging of received XML prior to parsing and processing

While trying to debug an inbound request containing invalid xml we realized there was no way to log the raw xml since the  xml parser throws an error before the logging funciton is called.

This pull request breaks out the logging of the inbound request and moves it to a point before the xml parser is invoked.

Idealized by @brpvieira