After looking at the event logs, I found the issue was that it was picking up a space or newline after docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue. Probably as a result of copying the xml from a website!