I created one simple test java application to connect to a web service over HTTP/SSL.
The webservice provider given us 3 certificates for testing purpose:
1. Client Test Certificate with private key: abctest.p12
2. Client Test Certificate with public key: abctest.cer
3. Provider Test Certificate with public key: abc.cer
I've added these 3 certificate into "cacerts" truststore using java 'keytool'....
User Profile
Collapse
-
2ways ssl not working: bad certificate
-
SSL Connection: timed out
Hi
My program needs to connect to https server and here is my java code:
...Code:URL server = null; HttpURLConnection conn = null; try{ System.setProperty("javax.net.ssl.keyStore", "eejis.jks"); System.setProperty("javax.net.ssl.keyStorePassword", "ee123"); server = new URL("https", "123.123.1.1", 1234, path); -
J2ME SMS Permission
i have a simple application that send sms.
i downloaded it using my k610i Sony Ericsson.
I send sms using that simple application, default it ask me permission to allow messaging EACH time.
So i exit application, and select application, -> More -> Permissions -> Messaging -> Never Ask (there are No, Always Ask, Ask Once, Never Ask)
after that, i run application and send sms. It works... -
you're talking like talk pointless.
if everyone could analyze the question, then we don't need to come here and post question tho.
anyway, thanks.... -
i found code from website eventually that helps me with that.
thanks for your time tho.
NickyEngLeave a comment:
-
it doesn't work in j2me application.
i've tried.
any method to do that?...Leave a comment:
-
somehow look like this:
but i'm not sure whether this is the way of doing it cos i dont have Eclipse or jdk in my pc here.Code:String str = "[@B43f"; byte[] b = str.clone(); System.out.println("b = " + b); // if this value is [@B43f, then means this is what i want.Leave a comment:
-
i know.
maybe the way i explain is confusing but the string is [@B43f.
decryptString(b yte[] b) takes byte[] as argument.
So i have to make "[@B43f" to byte[] first, and then pass to decryptString(x x) method.
but i dont know how to make a string to byte[] without changing the value(in this case is [@B43f ) so that the string is [@B43f and the byte array is also [@B43f.
...Leave a comment:
-
convert string to byte[]
I have this simple question but i dont know which method to convert it..
the case is like this:
i have encrypted a string in byte[] form.
and since it is a string already, but in the end i still need to decrypted it back to original string. for example:
...Code:String str = "Peter is smart"; // encrypt it byte[] data = enc.encryptString(str);
-
convert back to original string
The following code i search some where from websites.
it generate hash value for a string.
but is that possible that convert it back to original string ?
like if the string is "this is string" and hash value is "dje3h344h3hk4w 9sjs" (just an example)...
so how i'm going to make the hash value back to original string ?
can anyone help ?
i am a noob on... -
MySql Connection Issue
Hi all,
I have a question. The situation is like this.
I have website and allow user to login and check their details.
Every pages are jsp file and contented connection to mysql database to retrieve information.
Sometimes it can be accessed to mysql but sometimes cannot.
and the error it give me is NullPointerExce ption.
and i wonder why. Is it the connection to mysql is disconnected... -
i can't try it in my local country(malaysi a) because the shortcode is from India and my boss is going to India to deploy the system there, and i'm not going with him so there is no chance to test....Leave a comment:
-
ShortCode in j2me application
i'm going to send sms to a shortcode in India through my phone midlet.
i'm not sure whether i need to put the "+" sign or not , but here is my code:
which line is correct ?Code:String addr = "sms://+55111"; // OR String addr2 = "sms://55111";
pls give some advice ASAP..
thanks
... -
-
What's wrong with this class
Hi all,
i having a question in mobile development subforum, but i dont want to create a same thread in here.
some more ppl here is more than ppl who go in mobile dev. subforum, so i decided to create this thread and giving the following url to let you go and take a look.
What's Wrong with this class
its urgent.
thanks
kindly
nickyeng -
cannot send out sms
I have this following code which it makes me cannot send sms in my j2me application.
...Code:import com.sun.midp.ssl.CryptoException; public class Encrypter { public static String toHexString(byte [] ab) { StringBuffer sb = new StringBuffer(ab.length * 2) ; for(int i=0; i<ab.length; ++i) { String sTemp = Integer.toHexString(0xFF & ab[i]) ; -
Application Error - J2ME
I have a j2me application which will be tested on motorola and sony ericsson phone.
the j2me application will loads a image PNG format 6.36kb in size and length is 146x38 pixels ON startup for 3 seconds display on screen.
it works fine on my Sony Ericsson K610i but it doesn't work in Motorola V3.
The error message shows in Motorola V3 is "Applicatio n Error".
Why is it... -
exactly.
now i make it ab = new byte[25];
and it works fine now.
---
but i have another problem...which my midlet on my phone cannot send out the sms....Leave a comment:
-
then based on my above code, which value possibly cause exception ?...Leave a comment:
-
doFinal method is come from com.sun.midp.ss l.MessageDigest class....Leave a comment:
No activity results to display
Show More
Leave a comment: