通过SecurityTokenReference和Thumprint标识符与Apache CXF签署SOAPMessage

时间:2013-03-25 13:45:36

标签: soap cxf ws-security

是否有人可以使用Apache CFX库(如WSSecSignature和Crypto类及相关数据结构)为SOAPMessage的叹息提供实现方法,以便最终实现类似:

<oas:Security> 
    <oas:Signature> 
         <xd:SignedInfo> 
              <xd:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/> 
              <xd:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> 
              <xd:Reference URI="#[BodyID]"> 
                  <xd:Transforms> 
                       <xd:Transform Algorithm="[TransformAlgorithm]"/> 
                  </xd:Transforms>
                  <xd:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>                                               
                  <xd:DigestValue>[DigestValue]</xd:DigestValue> 
             </xd:Reference> 
             <xd:Reference URI="#[ControlID]"> 
                  <xd:Transforms>
                       <xd:Transform Algorithm="[TransformAlgorithm]"/> 
                  </xd:Transforms> 
                  <xd:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> 
                  <xd:DigestValue>[DigestValue]</xd:DigestValue> 
             </xd:Reference> 
         </xd:SignedInfo> 
         <xd:SignatureValue>[SignatureValue]</xd:SignatureValue>
         <xd:KeyInfo> 
             <oas:SecurityTokenReference> 
                  <oas:KeyIdentifier ValueType = "http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbPrintSHA1">[Thumbprint] 
                  </oas:KeyIdentifier> 
              </oas:SecurityTokenReference> 
         </xd:KeyInfo> 
     </oas:Signature> 
  </oas:Security>

我有一个很好的资源,从哪里可以找到实现SOAPMessage叹息的方法?

先谢谢你们, SImeon

0 个答案:

没有答案