Em Andamento

Help to write a generic RESTFULL proxy in GWT

I have a REST backend system and have a GWT frontend.

So they are on different IP addresses.

I use JSONP to read the data and that works fine.

However, I cant use JSONP to modify data (I think), so I want to write a generic proxy server RDP class in which I can pass:

1. The URL to call, eg [url removed, login to view]<id>

2. A string which containst the json object. This needs to be added to the body.

The proxy should simply call the REST service via posting the data.

IF IT WORKS THEN

- an OK shhould be returned

ELSE

- an exception should be thrown.

I will paste in a samlple server rpc I created which did not work.

If you know how to do this, then I will be a happy man...

Below is the part of the sample I tried, but failed with:

---------------------------------------------------------

package [url removed, login to view];

public class RESTProxyImpl extends RemoteServiceServlet implements RESTProxy {

private String resultStr;

public String postData(String jsonValue, String url)

throws Exception {

// call rest service to post data here

// see [url removed, login to view]

// To getcollection, so you have some json data see

// [url removed, login to view]

return "OK";

}

}

Habilidades: Java, Javascript, PHP, Arquitetura de software, Teste de Software, Hospedagem Web, Gestão de Site , Teste de Website

Ver mais: restfull proxy, gwt service, gwt rpc service, write a, sample json data, rpc, rest service, proxy in, java proxy, java json, java gwt, gwt, rest service data, system format java, java rdp server, php rest json, json string, php json rest, php json write, system proxy, post json, php read json, help modify

Acerca do Empregador:
( 131 comentários ) Johannesburg, South Africa

ID do Projeto: #3041666

Premiar a:

ramdani

See private message.

$255 USD em 5 dias
(5 Avaliações)
4.2

2 freelancers estão ofertando em média $213 para este trabalho

matthewpocock

See private message.

$170 USD in 5 dias
(3 Comentários)
3.6