List of usage examples for com.google.gwt.user.server.rpc RPC decodeRequest
public static RPCRequest decodeRequest(String encodedRequest, Class<?> type)
From source file:cc.kune.core.server.rack.filters.gwts.DelegatedRemoteServlet.java
License:GNU Affero Public License
@Override public String processCall(final String payload) throws SerializationException, DefaultException { try {//from w w w .j ava 2 s . c om final RPCRequest rpcRequest = RPC.decodeRequest(payload, service.getClass()); return RPC.invokeAndEncodeResponse(service, rpcRequest.getMethod(), rpcRequest.getParameters()); } catch (final IncompatibleRemoteServiceException ex) { return RPC.encodeResponseForFailure(null, ex); } }
From source file:com.google.gwt.examples.rpc.server.CanonicalExample.java
License:Apache License
/** * Process the RPC request encoded into the payload string and return a string * that encodes either the method return or an exception thrown by it. *//*from ww w.ja v a2 s . co m*/ @Override public String processCall(String payload) throws SerializationException { try { RPCRequest rpcRequest = RPC.decodeRequest(payload, this.getClass()); return RPC.invokeAndEncodeResponse(this, rpcRequest.getMethod(), rpcRequest.getParameters()); } catch (IncompatibleRemoteServiceException ex) { return RPC.encodeResponseForFailure(null, ex); } }
From source file:net.urlgrey.mythpodcaster.servlet.GWTController.java
License:Open Source License
public String processCall(String payload) throws SerializationException { try {// ww w . j av a 2 s .com RPCRequest rpcRequest = RPC.decodeRequest(payload, this.remoteServiceClass); return RPC.invokeAndEncodeResponse(this.remoteService, rpcRequest.getMethod(), rpcRequest.getParameters()); } catch (IncompatibleRemoteServiceException ex) { LOGGER.warn("An IncompatibleRemoteServiceException was thrown while processing this call.", ex); return RPC.encodeResponseForFailure(null, ex); } }
From source file:org.kuali.continuity.admin.project.server.GwtRpcController.java
License:Educational Community License
@Override public String processCall(String payload) throws SerializationException { try {/*from www .j a va 2s .co m*/ System.out.println("GwtRpcController: received " + payload); RPCRequest rpcRequest = RPC.decodeRequest(payload, this.remoteServiceClass); logger.info("GwtRpeController.processCall: " + remoteServiceClass.getName()); // delegate work to the spring injected service return RPC.invokeAndEncodeResponse(this.remoteService, rpcRequest.getMethod(), rpcRequest.getParameters()); } catch (IncompatibleRemoteServiceException ex) { getServletContext().log("An IncompatibleRemoteServiceException was thrown while processing this call.", ex); return RPC.encodeResponseForFailure(null, ex); } }