final Element markupParamsExtension = DOMUtils.createElement(namespaceURI, "MarkupParamsExtension");
final Node originalSessionId = DOMUtils.addChild(markupParamsExtension, namespaceURI, "OriginalSessionId");
originalSessionId.setTextContent(id);
// retrieve the ConsumerExtensionAccessor to be able to interact with extensions on the consumer-side
final ConsumerExtensionAccessor consumerExtensionAccessor = ExtensionAccess.getConsumerExtensionAccessor();
// attach the newly created extension to the MarkupParams element for this particular invocation
consumerExtensionAccessor.addRequestExtension(MarkupParams.class, markupParamsExtension);
}
}