JDK 1.3 in apache axis 1.4 (https problem)

Problemi z drugimi jeziki kot so c++, cgi, java, itd.
Odgovori
peterv
Prispevkov: 987
Pridružen: 29.03.2002 13:24:32

JDK 1.3 in apache axis 1.4 (https problem)

Odgovor Napisal/-a peterv » 21.12.2009 15:26:51

Buh dej...

imam en problem in sicer..
V javi 1.3 (zaradi Jinitiatorja (Oracle)) moram implementirat PJC (java bean), ki komunicira z webservisi preko HTTPS protokola..
Fora je ta, da mi v jdk1.4 ali 1.6 zadeva funkcionira v jdk1.3 pa se zjoče z napako: javax.xml.rpc.ServiceException: java.net.MalformedURLException: unknown protocol: https

nastavitve za https pa imam po sledečem:

Koda: Izberi vse

 
private void registrirajCertifikat(String direktorij, String password,
        String keyStore, String trustStore) {
        System.out.println("Registriramo nastavitve za SSL");
        System.out.println("keystore: " + direktorij + keyStore);
        System.out.println("trust: " + direktorij + trustStore);
        System.setProperty("java.net.debug", "all"); 
        System.setProperty("javax.net.ssl.keyStore", direktorij + keyStore);
        System.setProperty("javax.net.ssl.keyStorePassword", this.getPassword());
        System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");
        System.setProperty("javax.net.ssl.trustStore", direktorij + trustStore);
        System.setProperty("javax.net.ssl.trustStorePassword",  this.getPassword());
        System.setProperty("javax.net.ssl.trustStoreType", "jks");
        System.out.println("po registraciji nastavitev za SSL");
    }
 

ima kdo izkušnje s tem?
Torej Axis 1.4 in https... oziroma kako prepričat jdk1.3 da mi komunicira preko zgoraj omenjenih nastavitev po https-ju..

aky
Prispevkov: 368
Pridružen: 27.12.2001 22:08:32

JDK 1.3 in apache axis 1.4 (https problem)

Odgovor Napisal/-a aky » 24.12.2009 09:26:56

Gain SSL functionality in JDK 1.3

If you want to add SSL to your Java 1.3 applications, you'll need to work with some external packages to support it. Here's a look at the setup, along with the server-side code.
Using Secure Socket Layer (SSL) in JDK 1.3 is not as direct as in JDK 1.4. JDK 1.4 introduces SSL as a new integrated feature, but JDK 1.3 needs external packages to support it. If you are still using JDK 1.3 and need to implement projects with SSL, you should install an extension so that you can access SSL-related classes, such as SSLSocket and TrustManager. Let's look at how you can tap into these classes to implement a Java 1.3 application with SSL.

Odgovori