Table of Contents

Search

  1. Preface
  2. Web Service Concepts
  3. Understanding the Web Services Provider
  4. Using the Web Services Hub Console
  5. Batch Web Service Operations
  6. Writing Client Applications
  7. Working with Web Service Sources and Targets
  8. Editing Web Service Sources and Targets
  9. Working with Web Service Mappings
  10. Working with Web Service Workflows
  11. Appendix A: Web Service Sample Client Applications
  12. Appendix B: Configure the Web Browser

Web Services Provider Guide

Web Services Provider Guide

Using Third-Party Tools to Create a Digested Password

Using Third-Party Tools to Create a Digested Password

You can use a third-party tool such as the Java MessageDigest class to create a digested password.
The following example shows how to use the Java MessageDigest class to create a digested password with a timestamp and nonce value and encoded in Base64 :
public static String oasisDigest(String password, String nonce) throws Exception{ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); String created = sdf.format(new Date()); System.out.println("Created : " + created); System.out.println("Nonce : " + new String(org.apache.commons.codec.binary.Base64.encodeBase64(nonce.getBytes()))); String toDigest = nonce + created + password; MessageDigest digest = java.security.MessageDigest.getInstance("SHA-1"); digest.reset(); digest.update(toDigest.getBytes()); byte[] hash = digest.digest(); return new String(org.apache.commons.codec.binary.Base64.encodeBase64(hash)); }
If you use a web service testing tool such as soapUI to test client applications, you can use the tool to generate the digested password for the client request.

0 COMMENTS

We’d like to hear from you!