Closed GoogleCodeExporter closed 9 years ago
internal ref b/1314311
Original comment by galgwt.reviews@gmail.com
on 7 Aug 2008 at 6:33
internal suggestion is to either pass encoding on the query parameter (or
inline with
the content) or to otherwise loosen up on the RPC check (as already noted.)
Original comment by ericzun...@gmail.com
on 18 Aug 2008 at 10:23
Eric made a change to GWT's RPC servlet to enable the header checks to be
programatically disabled, since the
Gadget container strips them off. This change was committed in r3549, and will
be included in a post GWT 1.5
RC2 build.
Original comment by mmendez+personal@google.com
on 25 Aug 2008 at 2:57
Is this fixed in GWT 1.5.2 ?
Original comment by norman.m...@googlemail.com
on 12 Sep 2008 at 12:03
Is this fixed in GWT 1.5.2 ?
Original comment by norman.m...@googlemail.com
on 12 Sep 2008 at 12:04
The necessary changes were included in 1.5.2.
Original comment by mmendez+personal@google.com
on 12 Sep 2008 at 12:15
Steps for getting RPC working:
After creating the service, update it with the cachedURL retrieved from the
Gadget API.
gadgetService = GWT.create(GadgetService.class);
// Work around the Single Origin Policy(SOP) when the gadget is hosted inside the
gadget spec.
ServiceDefTarget serviceDef = (ServiceDefTarget) gadgetService;
String rpcUrl = serviceDef.getServiceEntryPoint();
rpcUrl = intrinsicMethods.getCachedUrl(rpcUrl);
serviceDef.setServiceEntryPoint(rpcUrl);
Then on the server side, you need to request that RemoteServiceServlet turn off
strict HTTP header checking by overriding a 'checkHeaders()':
public class GadgetRPCServlet extends RemoteServiceServlet implements
GadgetService {
@Override
protected boolean checkHeaders() {
return false;
}
Original comment by galgwt.reviews@gmail.com
on 12 Sep 2008 at 12:36
Thx for the example. But where the "checkHeaders()" method is coming from ? I
don't
see itin the RemoteServiceServlet source code...
Thx
Original comment by norman.m...@googlemail.com
on 13 Sep 2008 at 11:28
Sorry, that was from an early verison of the patch. This is the method you
need to
override.
protected String readContent(HttpServletRequest request)
throws ServletException, IOException {
return RPCServletUtils.readContentAsUtf8(request, true);
}
for a Gadget, implement it as:
protected String readContent(HttpServletRequest request)
throws ServletException, IOException {
return RPCServletUtils.readContentAsUtf8(request, false);
}
Original comment by galgwt.reviews@gmail.com
on 13 Sep 2008 at 11:57
Original comment by zundel@google.com
on 21 Dec 2009 at 1:57
Original issue reported on code.google.com by
galgwt.reviews@gmail.com
on 7 Aug 2008 at 6:32