I have searched the Web almost for hours, but I didn't find an answer. The Problem is that i want to the test the gwt RPC. So I generate with the Eclipse Plugin a GWT remote Service. But everytime I get the following Failure: "[WARN] No file found for: /kuss_projekt/SpeicherService"
I have tryed a lot, but I dont knwo what is the Problem. Thats my Code:
web.xml: <web-app> <servlet> <servlet-name>SpeicherService</servlet-name> <servlet-class>de.fhdo.kuss.server.SpeicherServiceImpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>SpeicherService</servlet-name> <url-pattern>/kuss_projekt/SpeicherService</url-pattern> </servlet-mapping> <!-- Default page to serve --> <welcome-file-list> <welcome-file>Kuss_Projekt.html</welcome-file> </welcome-file-list> </web-app> -
Speicherservice: @RemoteServiceRelativePath("SpeicherService") public interface SpeicherService extends RemoteService { String getName(String name); public static class Util { private static SpeicherServiceAsync instance; public static SpeicherServiceAsync getInstance(){ if (instance == null) { instance = GWT.create(SpeicherService.class); } return instance; } } } -
SpeicherServiceAsync: public interface SpeicherServiceAsync { void getName(String name, AsyncCallback<String> callback); } -
SpeicherServiceImpl public class SpeicherServiceImpl extends RemoteServiceServlet implements SpeicherService { @Override public String getName(String name) { return("Server meldet sich " + name); } } -
Test(): public void test() { AsyncCallback<String> callback = new AsyncCallback<String>() { @Override public void onFailure(Throwable caught) { // TODO Auto-generated method stub } @Override public void onSuccess(String result) { Window.alert(result); } }; SpeicherService.Util.getInstance().getName("test",callback); }