开发者

GWT interface to Solr index

开发者 https://www.devze.com 2022-12-08 19:49 出处:网络
I have开发者_Go百科 a solr index on a remote server and need to create a search page interface. I am using GWT to code the pages and XML-HTTP to query the index and receive the response. The problem i

I have开发者_Go百科 a solr index on a remote server and need to create a search page interface. I am using GWT to code the pages and XML-HTTP to query the index and receive the response. The problem is the same-site origin security policy. It won't let JavaScript retrieve the remote XML data. Is there a workaround for this, without using JSON preferably.


A similar problem: Make GWT interact with ASP.NET Web Service

The answers there should also apply here.

Depending on the type of data that you want to send (that is, how "public" they are), JSONP might not be the best option - it's not the safest method of transport (pure JSON is safer, but to overcome SOP you need the padding).

If you have a Java server on the.. server side, I'd go with GWT <-> servlet (acting as proxy, on the same domain as your main app) <-> web service (any domain) - the safest and cleanest code, afaict.

0

精彩评论

暂无评论...
验证码 换一张
取 消