Refactor soap log preparation into a method

We want to use this logic in more places, so that we can output the
requests and responses more safely in general. Turn it into a method
and call the method.
Merge pull request #5 from iniq/refactor_log_redaction_code

Refactor SOAP log preparation into a method