GWT RPC Service not found -


i have searched web hours, didn't find answer. problem want test gwt rpc. generate eclipse plugin gwt remote service. everytime following failure: "[warn] no file found for: /kuss_projekt/speicherservice"

i have tryed lot, dont knwo problem. thats 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 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); } 

have tried removing /kuss_projekt servlet mapping make it:

<servlet-mapping>     <servlet-name>speicherservice</servlet-name>     <url-pattern>/speicherservice</url-pattern> </servlet-mapping> 

gwt client expecting service available @ url defined via @remoteservicerelativepath. when running in browser, path resolved relative module base url. have given:

@remoteservicerelativepath("speicherservice") 

the client make request url made concatenating

gwt.getmodulebaseurl() + "speicherservice" 

if servlet not mapped @ url, request fail. try printing gwt.getmodulebaseurl()+ "speicherservice" on console see base url in test case. once have got this, open browser , go url. if response says "get method not supported" mapped correctly. on other hand if 404 got fix servlet mapping


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -