Hello,

I have an autentification error when I try to reach the URI on my browser 
(Firefox).
When I try to reach this URI from a java client, it works perfectly.
I use Jetty for solving the CPU problem on my server.
I don't understand why it works if I use the java client and not if I use the 
browser.Any suggestions?


The server code : 

-------------------------------------------------------
        /*Création du serveur pour l'HTTPS le port*/
        Server server = component.getServers().add(Protocol.HTTPS, port);
        
        server.getContext().getParameters().add("type", "1");
        Series<Parameter> parameters = server.getContext().getParameters();

        /* ajout des paramétres requis pour l'HTTPS     */
        parameters.add("sslContextFactory", 
"org.restlet.ext.ssl.PkixSslContextFactory");
        parameters.add("keystorePath", 
prop.getProperty("certificat.emplacement.jks"));
        parameters.add("keystorePassword", 
prop.getProperty("certificat.keystorepassword.jks"));
        parameters.add("keyPassword", 
prop.getProperty("certificat.password.jks"));
        parameters.add("keystoreType", "JKS");
        parameters.add("needClientAuthentication","false");

        // création & démarrage de jetty
        HttpsServerHelper jettyServer = new HttpsServerHelper(server);  

        jettyServer.start();

        /*ajout de l'application au serveur et demarrage de celui-ci*/
        component.getDefaultHost().attach(new RestletApplication());
        component.start();
------------------------------------------------------- 
        
The client part :
-------------------------------------------------------
        ClientResource itemsResource = new 
ClientResource("https://localhost:8283/xml/TEST_WS/expedition/colis?date_debut=15-06-2010&date_fin=15-06-2010";);

        /*Protocole,login et mot de passe utilisés pour l'identification*/
        String login = "Login";
        String password = "Password";

        itemsResource.setChallengeResponse(ChallengeScheme.HTTP_BASIC, login, 
password);
        System.out.println(itemsResource.get().getText());
        
-------------------------------------------------------

Best Regards.

Laurent Garrigues

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2622438

Reply via email to