WEB开发网
开发学院软件开发Java Java Web 服务: Axis2 WS-Security 签名和加密 阅读

Java Web 服务: Axis2 WS-Security 签名和加密

 2009-11-05 00:00:00 来源:WEB开发网   
核心提示: 清单 3. 从客户机发送给服务器的第一条消息<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><wsse:Secu


清单 3. 从客户机发送给服务器的第一条消息
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> 
 <soapenv:Header> 
  <wsse:Security xmlns:wsse=".../oasis-200401-wss-wssecurity-secext-1.0.xsd" 
    soapenv:mustUnderstand="1"> 
   <wsu:Timestamp xmlns:wsu=".../oasis-200401-wss-wssecurity-utility-1.0.xsd" 
     wsu:Id="Timestamp-3753023"> 
    <wsu:Created>2009-04-18T19:26:14.779Z</wsu:Created> 
    <wsu:Expires>2009-04-18T19:31:14.779Z</wsu:Expires> 
   </wsu:Timestamp> 
   <wsse:BinarySecurityToken 
     xmlns:wsu=".../oasis-200401-wss-wssecurity-utility-1.0.xsd" 
     EncodingType=".../oasis-200401-wss-soap-message-security-1.0#Base64Binary" 
     ValueType=".../oasis-200401-wss-x509-token-profile-1.0#X509v1" 
     wsu:Id="CertId-2650016">MIICoDC...0n33w==</wsse:BinarySecurityToken> 
   <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" 
     Id="Signature-29086271"> 
    <ds:SignedInfo> 
     <ds:CanonicalizationMethod 
       Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> 
     <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> 
     <ds:Reference URI="#Id-14306161"> 
      <ds:Transforms> 
       <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> 
      </ds:Transforms> 
      <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> 
      <ds:DigestValue>SiU8LTnBL10/mDCPTFETs+ZNL3c=</ds:DigestValue> 
     </ds:Reference> 
     <ds:Reference URI="#Timestamp-3753023"> 
      <ds:Transforms> 
       <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> 
      </ds:Transforms> 
      <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> 
      <ds:DigestValue>2YopLipLgBFJi5Xdgz+harM9hO0=</ds:DigestValue> 
     </ds:Reference> 
    </ds:SignedInfo> 
    <ds:SignatureValue>TnUQtz...VUpZcm3Nk=</ds:SignatureValue> 
    <ds:KeyInfo Id="KeyId-3932167"> 
     <wsse:SecurityTokenReference 
       xmlns:wsu=".../oasis-200401-wss-wssecurity-utility-1.0.xsd" 
       wsu:Id="STRId-25616143"> 
      <wsse:Reference URI="#CertId-2650016" 
       ValueType=".../oasis-200401-wss-x509-token-profile-1.0#X509v1"/> 
     </wsse:SecurityTokenReference> 
    </ds:KeyInfo> 
   </ds:Signature> 
  </wsse:Security> 
 </soapenv:Header> 
 <soapenv:Body 
   xmlns:wsu=".../oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-14306161"> 
  <ns2:getBook xmlns:ns2="http://ws.sosnoski.com/library/wsdl"> 
   <ns2:isbn>0061020052</ns2:isbn> 
  </ns2:getBook> 
 </soapenv:Body> 
</soapenv:Envelope>

上一页  5 6 7 8 9 10 

Tags:Java Web 服务

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接