Search in sources :

Example 1 with ServiceDefTarget

use of com.google.gwt.user.client.rpc.ServiceDefTarget in project activityinfo by bedatadriven.

the class RemoteServiceProvider method get.

@Override
public RemoteCommandServiceAsync get() {
    RemoteCommandServiceAsync remoteService = GWT.create(RemoteCommandService.class);
    ServiceDefTarget endpoint = (ServiceDefTarget) remoteService;
    String moduleRelativeURL = GWT.getModuleBaseURL() + "cmd";
    endpoint.setServiceEntryPoint(moduleRelativeURL);
    return remoteService;
}
Also used : RemoteCommandServiceAsync(org.activityinfo.legacy.shared.command.RemoteCommandServiceAsync) ServiceDefTarget(com.google.gwt.user.client.rpc.ServiceDefTarget)

Example 2 with ServiceDefTarget

use of com.google.gwt.user.client.rpc.ServiceDefTarget in project ovirt-engine by oVirt.

the class BaseSystemModule method getXsrfTokenService.

@Provides
@Singleton
public XsrfTokenServiceAsync getXsrfTokenService() {
    XsrfTokenServiceAsync service = GWT.create(XsrfTokenService.class);
    ((ServiceDefTarget) service).setServiceEntryPoint(GWT.getModuleBaseURL() + XsrfRpcRequestBuilder.XSRF_PATH);
    return service;
}
Also used : XsrfTokenServiceAsync(com.google.gwt.user.client.rpc.XsrfTokenServiceAsync) ServiceDefTarget(com.google.gwt.user.client.rpc.ServiceDefTarget) Singleton(com.google.inject.Singleton) Provides(com.google.inject.Provides)

Example 3 with ServiceDefTarget

use of com.google.gwt.user.client.rpc.ServiceDefTarget in project data-access by pentaho.

the class DSWDatasourceServiceGwtImpl method setServiceEntryPoint.

/**
 * Override the service entry point (use only if you know what you are doing)
 */
public static void setServiceEntryPoint(String serviceEntryPointBase) {
    ServiceDefTarget endpoint = (ServiceDefTarget) SERVICE;
    endpoint.setServiceEntryPoint(serviceEntryPointBase + "gwtrpc/DatasourceService");
}
Also used : ServiceDefTarget(com.google.gwt.user.client.rpc.ServiceDefTarget)

Example 4 with ServiceDefTarget

use of com.google.gwt.user.client.rpc.ServiceDefTarget in project data-access by pentaho.

the class JoinSelectionServiceGwtImpl method setServiceEntryPoint.

public static void setServiceEntryPoint(String serviceEntryPointBase) {
    ServiceDefTarget endpoint = (ServiceDefTarget) SERVICE;
    endpoint.setServiceEntryPoint(serviceEntryPointBase + "gwtrpc/joinSelectionService");
}
Also used : ServiceDefTarget(com.google.gwt.user.client.rpc.ServiceDefTarget)

Example 5 with ServiceDefTarget

use of com.google.gwt.user.client.rpc.ServiceDefTarget in project GwtMobile by dennisjzh.

the class RpcPage method makeRpcCall.

private void makeRpcCall() {
    final RpcServiceAsync greetingService = GWT.create(RpcService.class);
    //The code below sets service entry point to a server url.
    ServiceDefTarget service = (ServiceDefTarget) greetingService;
    String address = "http://gwtmobile-services.appspot.com/rpc";
    service.setServiceEntryPoint(address);
    greetingService.greetServer("GWT Mobile UI", new AsyncCallback<String>() {

        @Override
        public void onSuccess(String result) {
            text.setHTML(result);
        }

        @Override
        public void onFailure(Throwable caught) {
            text.setHTML(caught.getMessage());
        }
    });
}
Also used : ServiceDefTarget(com.google.gwt.user.client.rpc.ServiceDefTarget)

Aggregations

ServiceDefTarget (com.google.gwt.user.client.rpc.ServiceDefTarget)7 Provides (com.google.inject.Provides)2 Singleton (com.google.inject.Singleton)2 XsrfTokenServiceAsync (com.google.gwt.user.client.rpc.XsrfTokenServiceAsync)1 RemoteCommandServiceAsync (org.activityinfo.legacy.shared.command.RemoteCommandServiceAsync)1 GenericApiGWTServiceAsync (org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTServiceAsync)1