Package com.google.gwt.user.client.rpc

Examples of com.google.gwt.user.client.rpc.RemoteService


        return null;
    }

    @Override
    public String processCall(String payload) throws SerializationException {
        RemoteService remoteService = null;
        RPCRequest rpcRequest = null;
        try {
            remoteService = (RemoteService) applicationContext.getBean(remoteServiceName);
            setServiceData(remoteService, false);

            rpcRequest = RPC.decodeRequest(payload, remoteService.getClass(), this);
           
            if (logger.isDebugEnabled()) {
                logger.debug("Executing method " + rpcRequest.getMethod());
            }

            return RPC.invokeAndEncodeResponse(remoteService, rpcRequest
                    .getMethod(), rpcRequest.getParameters(), rpcRequest
                    .getSerializationPolicy());
        } catch (Exception e) {
            if (rpcRequest != null) {
                logger.error("An error occurred calling the GWT service method " + rpcRequest.getMethod() + ". Cause: " + e.getMessage(), e);
            } else {
                logger.error("An error occurred calling the GWT service " + (remoteService != null ? remoteService.getClass().getName() : remoteServiceName) + ". Cause: " + e.getMessage(), e);
            }
            return RPC.encodeResponseForFailure(null, e);
        } finally {
            if (remoteService != null) {
                setServiceData(remoteService, true);
View Full Code Here


  public String processCall(String payload) throws SerializationException {
    //http://forum.springsource.org/archive/index.php/t-54931.html process request
    try {
      RPCRequest req = RPC.decodeRequest(payload, null, this);

      RemoteService service = (RemoteService) injector.getInstance(req
          .getMethod().getDeclaringClass());
     
      long start = System.currentTimeMillis();
      logger.info("Processing incoming request for " + service.getClass() + "." + req.getMethod());
     
      String result = RPC.invokeAndEncodeResponse(service, req.getMethod(),
          req.getParameters(), req.getSerializationPolicy());
     
      long end = System.currentTimeMillis();
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.rpc.RemoteService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.