Skip to content
Art2link ESB v2.02 LTS HomeDocumentationBlogContact
Patterns/Transformation/Envelope wrap / unwrap

Envelope wrap / unwrap

Many systems demand a wrapper around the real content — an EDI interchange header, a SOAP envelope, a routing header block. Wrapping and unwrapping is an edge job: add the envelope on the way out, strip it on the way in, keep the bus dealing in payload.

On the inbound side, a receive component removes the transport envelope so what gets normalized and published is the business content, not the packaging. On the outbound side, a send component wraps the canonical-derived payload in exactly the envelope the destination protocol requires.

inbound — unwrap payload envelope unwrap payload on bus outbound — wrap payload from bus wrap payload → destination

Keeping envelopes at the edges means the bus reasons about business content alone — routing filters and maps never have to dig through protocol packaging. It pairs naturally with the splitter for multi-transaction interchanges: unwrap, debatch, then handle each transaction on its own.

In Art2link the envelope is added or stripped by a pipeline component, never baked into the canonical payload. Outbound, a component in the send port’s pipeline wraps the canonical content in the protocol envelope the destination expects; inbound, a component in the receive pipeline unwraps it so the bus only ever sees the bare payload. The canonical message stays envelope-free in both directions.

Envelope is transport, not content. Control numbers and headers belong to the wrapper; promote only the few you actually route or acknowledge on, and leave the rest in the envelope handling.