0

SOAP メッセージで WS-Addressing 要素に署名する必要があります。apache axis2 ws-addresingとrampartで可能ですか?

私はこの例を見つけました - sample2 http://axis.apache.org/axis2/java/rampart/samples.html。ただし、ws-addressing 要素は署名されていません。

編集!!!

これは私のポリシー ファイルからの定義です。それは動作しません!

<wsp:Policy wsu:Id="DefaultEndpoint_Echo_output_policy">
<wsp:ExactlyOne>
  <wsp:All>
    <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
      <sp:Body/>
      <sp:Header Name="To" Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
      <sp:Header Name="From" Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
      <sp:Header Name="FaultTo" Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
      <sp:Header Name="ReplyTo" Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
      <sp:Header Name="MessageID" Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
      <sp:Header Name="RelatesTo" Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
      <sp:Header Name="Action" Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
    </sp:SignedParts>
  </wsp:All>
</wsp:ExactlyOne>

4

1 に答える 1

0

SignedParts タグからすべての子タグを削除することで、この問題を解決しました

したがって、私のポリシー定義は次のようになります。

<wsp:ExactlyOne>
  <wsp:All>
    <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy</sp:SignedParts>
  </wsp:All>
</wsp:ExactlyOne>

署名用のタグを定義せず、空のタグ SignedParts だけを含める限り、すべてのヘッダーと本文が自動的に署名されることがわかりました。

于 2013-12-17T16:56:11.287 に答える