Hello group, I have a small application programmed with GWT beeing deployed to a jetty as root.war (thus serving "/"). Assume I have a Servlet named "UserServlet" mapped to "/user/user" providing a method "getString()". On the server side, this method is implemented in the class "TestImpl".
Now I want to connect to the server not only via a GWT client but also via an external XMLRPC client. Using the code (attached as ClientCode.java - stripped down version, won't compile), the jetty server logs this: 2011-11-16 17:08:12.379:WARN:root:Exception while dispatching incoming RPC call javax.servlet.ServletException: Content-Type was 'text/xml'. Expected 'text/x-gwt-rpc'. May someone give me a hint, how I can connect to a GWT-created servlet via a normal XMLRPC client? I saw a project called xmlrpc-gwt, but that includes a lot of GWT related stuff and I want to try to keep the XMLRPC client really simple. Next, looking into the code of xmlrpc-gwt, it sends a header "text/xml", too. Looking forward to your answers, Johannes -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/15nZfSNuBTIJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); config.setServerURL(new URL("http://127.0.0.1:8080/user/user")); config.setConnectionTimeout(60 * 1000); config.setReplyTimeout(60 * 1000); XmlRpcClient client = new XmlRpcClient(); client.setConfig(config); String result = (String) client.execute("TestImpl.getString", new Object[0]); System.out.println(result);