diff options
Diffstat (limited to 'sms-client/src')
-rw-r--r-- | sms-client/src/java/example/SmsClientExample.java | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/sms-client/src/java/example/SmsClientExample.java b/sms-client/src/java/example/SmsClientExample.java index b82d6d1..7bbaa90 100644 --- a/sms-client/src/java/example/SmsClientExample.java +++ b/sms-client/src/java/example/SmsClientExample.java @@ -14,20 +14,22 @@ * limitations under the License. */ -import java.security.Provider; -import java.security.Security; -import java.security.KeyStore; -import java.security.SecureRandom; -import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.TrustManagerFactory; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSocketFactory; -import javax.net.ssl.SSLSessionContext; import java.io.FileInputStream; +import java.lang.Boolean; +import java.lang.Integer; import java.net.URL; import javax.net.ssl.HttpsURLConnection; -import java.util.Map; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSessionContext; +import javax.net.ssl.SSLSocketFactory; +import javax.net.ssl.TrustManagerFactory; +import java.security.KeyStore; +import java.security.Provider; +import java.security.SecureRandom; +import java.security.Security; import java.util.HashMap; +import java.util.Map; import org.onap.aaf.sms.SmsClient; import org.onap.aaf.sms.SmsResponse; @@ -80,7 +82,11 @@ public class SmsClientExample { } Map<String, Object> m2 = new HashMap<String, Object>(); m2.put("username", "dbuser"); - SmsResponse resp3 = sms.storeSecret("onap.new.test.sms0","user", m2); + m2.put("isadmin", new Boolean(true)); + m2.put("age", new Integer(40)); + m2.put("secretkey", "asjdhkuhioeukadfjsadnfkjhsdukfhaskdjhfasdf"); + m2.put("token", "2139084553458973452349230849234234908234342"); + SmsResponse resp3 = sms.storeSecret("onap.new.test.sms0","credentials", m2); if ( resp3.getSuccess() ) { System.out.println(resp3.getResponse()); System.out.println(resp3.getResponseCode()); @@ -95,7 +101,7 @@ public class SmsClientExample { System.out.println(resp5.getResponse()); System.out.println(resp5.getResponseCode()); } - SmsResponse resp6= sms.getSecret("onap.new.test.sms0", "user"); + SmsResponse resp6= sms.getSecret("onap.new.test.sms0", "credentials"); if ( resp6.getSuccess() ) { System.out.println(resp6.getResponse()); System.out.println(resp6.getResponseCode()); |