私はxmlファイルを持っています。XMl ファイルを WCF 要求のメッセージ ヘッダーに追加する必要があります。
これにはOperationContextScopeを使用しています
using (OperationContextScope scope = new OperationContextScope(myClient.InnerChannel))
{
var samlHeader = CreateSAMLAssertion();
OperationContext.Current.OutgoingMessageHeaders.Add(
// Add smalheader which is a xml hear
);
}
編集:
samlHeader xml は次のようになります
<Security xmlns="http://docs.oasis-open.org/x/xxxxx.xsd" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
<Assertion ID="xxxxx" IssueInstant="xxxxxxx" Version="2.0" xmlns="urn:oasis:names:tc:SAML:2.0:assertion">
<--Removed-->
</Assertion>
</Security>
SOAP リクエストの構造体を次のようにしたい
<soapenv:Envelope ........>
<soapenv:Header>
I want to add my xml (smalheader) here
</soapenv:Header>
<soapenv:Body>
<soapenv:Body>
</soap:Envelope>
編集完了
誰でも私を正しい方向に向けてください