Hi,

 

I have to generate following tokens in SOAP envelope.

 

<wst:RequestSecurityToken xmlns:wst="http://schemas.xmlsoap.org/ws/2004/04/trust">
      <wst:TokenType>urn:GSO-System-Services:external:1.65:gatewaytoken#GatewayToken</wst:TokenType>
      <wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>
      <wst:Base>
        <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
         wsu:Id="SecurityToken-94d12e0f-400b-4412-bde8-e03357eb0692">
          <wsse:Username>513FDQ37JILL</wsse:Username>
          <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">
         NXJ3ynAa8Sy136aifThXJl8vLoE=
          </wsse:Password>
          <wsse:Nonce>4nJy2oD6xC79zatTHvuywg==</wsse:Nonce>
          <wsu:Created>2004-07-01T11:03:10Z</wsu:Created>
        </wsse:UsernameToken>
      </wst:Base>
      <wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy">
        <wsa:EndpointReference>
          <wsa:Address>urn:GSO-System-Services:external:1.65:GatewayWebServices</wsa:Address>
        </wsa:EndpointReference>
      </wsp:AppliesTo>
      <wst:LifeTime>
        <wsu:Expires>2004-07-01T15:03:11Z</wsu:Expires>
      </wst:LifeTime>
    </wst:RequestSecurityToken>

 

=============================================================

 

I tried using wss4j library and could generate envelope like following

 

  <wst:RequestSecurityToken xmlns:wst="http://schemas.xmlsoap.org/ws/2004/04/trust">

   <wst:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</wst:TokenType>

   <wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>

   <wst:Base>

    <wsse:UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">

     <wsse:Username>werner</wsse:Username>

     <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">8yKFLDyy83B6lBSx++0hGrFQewU=</wsse:Password>

     <wsse:Nonce>CJpdZKrMZ5KE1mywD4gcSA==</wsse:Nonce>

     <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2006-01-20T10:23:41.351Z</wsu:Created>

    </wsse:UsernameToken>

   </wst:Base>

 

   <wst:Lifetime xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

    <wsu:Created>2006-01-20T10:23:41Z</wsu:Created>

    <wsu:Expires>2006-01-20T10:27:51Z</wsu:Expires>

   </wst:Lifetime>

 

  </wst:RequestSecurityToken>

 

 

 

I could generate AppliesTo token using AppliesTo class but how can I add this to my ReuqestSecurityToken?

Any help would be appreciated.

 

 

Revati Damle,

Rave Technologies Ltd,

Mumbai,

Ph: (022)56606600 Ext 318

 

Reply via email to