The answer to 2, is it possible to send multiple parameters into the stored procedure. Yes it is
<ns0:StoredProc xmlns:ns0="http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo">
<ns0:document>
<bts-msg-body xmlns="http://www.microsoft.com/schemas/bts2007" encoding="base64"/>
</ns0:document>
<ns0:documentname>
Test
</ns0:documentname>
</ns0:StoredProc>
How to populate the documentname from the message context property, that is the bit I can't figure out. Maybe someone else can come up with a suggestion for that.