title: What Does the Equivalent Client Side RestyGWT Look Like Following This Simple GSON Example?
body: <h1>The Problem</h1>
  
  <p>Due to several problems encountered with GSON (GWT JSON-RPC), I'd like to switch to Resty-GWT. The following example showcases my old setup, then below is my attempt at transferring.</p>
  
  <h1>The Data</h1>
  
  <p>This is the JSON data sent from the proxy I have setup:</p>
  
  <pre><code>{"id": 1, "result": ["Planets", "Stars"], "error": null}
  </code></pre>
  
  <h1>ControlService.java - How I Make the Call (with GSON)</h1>
  
  <p>The class that makes the asynchronous call:</p>
  
  <pre><code>import com.google.gwtjsonrpc.common.AsyncCallback;
  import com.google.gwtjsonrpc.common.RemoteJsonService;
  import com.google.gwtjsonrpc.common.RpcImpl;
  
  @RpcImpl(version=RpcImpl.Version.V2_0,transport=RpcImpl.Transport.HTTP_POST)
  public interface ControlService extends RemoteJsonService
  {
  
      public void connectedNames( String [] Names, AsyncCallback&lt;String[]&gt; callback ); //FirstExample
  
  }
  </code></pre>
  
  <h1>createPanel.java</h1>
  
  <p>This is the class that actually calls and receives the data:</p>
  
  <pre><code>import com.google.gwtjsonrpc.common.AsyncCallback;
  
  public class createPanel implements ChangeHandler{
  
      public mainPanel(){
  
          //Some code setting up the panels
          service_ = GWT.create(ControlService.class);
          ((ServiceDefTarget) service_).setServiceEntryPoint("http://localhost:3900/services/ControlProxy.py"); //Directs GWT to the proxy
  
          service_.connectedNames( new String[0], new AsyncCallback&lt;String[]&gt;() {
  
              public void onSuccess( String[] result) 
              {   
                      //I now play with the data
              }
              public void onFailure(Throwable why)
              {
                  myList_.addItem( "Server error!" );
              }
      });
      }
  }
  </code></pre>
  
  <h1><strong>So How Do I Do This With <a href="http://resty-gwt.github.io/documentation/restygwt-user-guide.html" rel="nofollow">RestyGWT</a>?</strong></h1>
  
  <p>My attempt:</p>
  
  <h1>testService.java</h1>
  
  <pre><code>import javax.ws.rs.Path;
  
  import org.fusesource.restygwt.client.MethodCallback;
  import org.fusesource.restygwt.client.RestService;
  
  @Path("http://localhost:3900/services/ControlProxy.py")
  @POST
  public interface testService extends RestService {
  
          public void connectedNames( String [] Names, MethodCallback&lt;String[]&gt; callback );
  
  }
  </code></pre>
  
  <h1>testCreatePanel.java</h1>
  
  <pre><code>public class createPanel implements ChangeHandler{
  
      public mainPanel(){
  
          //Some code setting up the panels
          service_ = GWT.create(testService.class);
          testService.connectedNames(cbcNames, callback);//how to extract data from this
  }
  </code></pre>