Bonjour
je suis en train de suivre un tutoriel pour apprendre GWT, et quand je fais tourner l'appli j'ai cette erreur :
Pourtant j'ai bien suivi les instruction mais rien a faire .
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 Please enter employee sssinfo (id name surname job): SaveOrUpdate Please enter employee id: Retrieve Remote Procedure Call - Failure Sending request to the server: 10 11 12 13 Server replies: An error occurred while attempting to contact the server. Please check your network connection and try again. The error is : com.google.gwt.user.client.rpc.StatusCodeException: HTTP ERROR: 404 NOT_FOUND RequestURI=/employeeService Powered by Jetty://
Voici le code que je teste :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 @RemoteServiceRelativePath("/employeeService") public interface EmployeeService extends RemoteService { public EmployeeDTO findEmployee(long employeeId); public void saveEmployee(long employeeId, String name, String surname, String jobDescription) throws Exception; public void updateEmployee(long employeeId, String name, String surname, String jobDescription) throws Exception; public void saveOrUpdateEmployee(long employeeId, String name, String surname, String jobDescription) throws Exception; public void deleteEmployee(long employeeId) throws Exception; }
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 @Service("employeeService") public class EmployeeServiceImpl extends RemoteServiceServlet implements EmployeeService {
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 private EmployeeServiceAsync getEmployeeServiceInstance() { if (employeeService == null) { // Instantiate the service employeeService = (EmployeeServiceAsync) GWT .create(EmployeeService.class); // Specify the URL at which the service implementation is running. // The target URL must reside on the same domain and port from // which the host page was served. ((ServiceDefTarget) employeeService).setServiceEntryPoint("/employeeService"); } return employeeService; }
merci d'avance
Partager