INT-3204 Phase II

Inbound synchronizer, outbound gateway.

Note: most gateway functions use template.execute() because they do multiple operations on a session.