I recently had to add a custom SOAP header to a request sent to a web serivce from BizTalk, and had to research how to do it.
- Add a property schema and change target namespace to http://schemas.microsoft.com/BizTalk/2003/SOAPHeader.
- Add an element to this schema with the name of the custom header (in my case "CustomCredentials") and Property Schema Base = MessageContextPropertyBase.
- In orchestration, in a message assignment shape, assign the content of the header to the property, e.g.:
MessageX(Namespace.CustomCredentials) = "<CustomCredentials xmlns="<namespace>"><Username>foo</Username><Password>bar</Password></CustomCredentials>";