I need to build the following Receipts XML structure including the xmlns:u namespace and add it to the SOAP header. So the end outgoing SOAP header should look something like this:
<Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">
<s:Header>
<u:Receipts xmlns:u="http://MyCompany/abc">
<Receipt>
<Id />
<Text />
</Receipt>
<Receipt>
<Id />
<Text />
</Receipt>
<Receipt>
<Id />
<Text />
</Receipt>
</u:Receipts>
</s:Header>
<s:Body />
</Envelope>
I'm overriding the MessageHeader class and build the xml in OnWriteHeaderContents method. However, I can’t get the correct xml/namespace. Code sample is appreciated!