3

CustomBinding を使用して Soap 1.1 (エンドポイントは 1.2 をサポートしていません) + Addressing 1.0 を有効にしています。エンドポイントは SSL 経由でのみ利用可能で、ある種の Java/Weblogic プラットフォームで実行されます。

これが私の構成です:

<customBinding>
    <binding name="Soap11Addr10">
        <textMessageEncoding messageVersion="Soap11WSAddressing10" />
        <httpsTransport/>
    </binding>
</customBinding>

[...]

<endpoint address="https://sekrit:444/more-sekrits/even-more"
    binding="customBinding" bindingConfiguration="Soap11Addr10"
    contract="SomePort" name="SomePortService" />

この構成は、エンドポイントを混乱させるようです。SomePort に対して要求を実行すると、WCF は最初に RequestSecurityTokenResponse メッセージを送信しますが、これは残念なことだと思います。RSTR エンベロープのトレースを次に示します。

<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
  <s:Header>
    <a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue</a:Action>
    <a:RelatesTo>urn:uuid:7348d908-b767-43e8-9770-09a38461ee87</a:RelatesTo>
  </s:Header>
  <s:Body>
    <t:RequestSecurityTokenResponse Context="uuid-7a3c9fde-053d-46e7-aa08-f5725b082691-287" xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <t:BinaryExchange ValueType="http://schemas.xmlsoap.org/ws/2005/02/trust/spnego" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">TlRMTVNTUAACAAAAEAAQADgAAAA1wpriPjzjL4iwIJhAmcsBAAAAAGAAYABIAAAABgByFwAAAA9TAEsATwBHAEsAQQBUAFQAAgAQAFMASwBPAEcASwBBAFQAVAABABAAUwBLAE8ARwBLAEEAVABUAAQAEABTAGsAbwBnAGsAYQB0AHQAAwAQAFMAawBvAGcAawBhAHQAdAAHAAgAj73D884kywEAAAAA</t:BinaryExchange>
    </t:RequestSecurityTokenResponse>
  </s:Body>
</s:Envelope>

エンドポイント バーフ:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
  <env:Header></env:Header>
  <env:Body>
    <env:Fault xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">
      <faultcode xmlns="">ns0:MustUnderstand</faultcode>
      <faultstring xml:lang="en" xmlns="">One or more mandatory SOAP header blocks not understood</faultstring>
    </env:Fault>
  </env:Body>
</env:Envelope>

最初の RSTR の送信を停止することはできますか?

リクエストに応じて、より多くのトレースおよびログ データを提供できます。

4

1 に答える 1

0

ターゲットサービスについて詳しく知らなければ、何を期待するかを言うのは難しいですが、WCFはメッセージセキュリティを使用していると思います。つまり、各メッセージは個別に暗号化されます。おそらく、トランスポートレベルのセキュリティ(つまりhttps)が必要なだけです。

<security mode="Transport" />バインディング構成で設定してみてください。

于 2011-02-22T14:13:28.610 に答える