How can a custom soap header element be signed?

Primary tabs

SOAP, Caché

Working on a project to call a web service and the soap header has custom header elements that need to be signed. i reviewed the %soap.inc and didn't see any appropriate macro  

EBS and IDP elements need to be signed

 

here's a provided header sample

 

this a sample output that I created.

my first pass was $$$SOAPWSIncludeDefault+$$$SOAPWSIncludeAddressing

 

 

Replies

With trial and error I was able to figure this out.

After instantiating the Signature class, I use ##class(%XML.Security.Reference).Create passing in the Id of the element and then add the reference to the signature object.