Sorry. Didn't catch the use of a map for the data. The "data" must be a string when useSimpleHttp is true because RPC doesn't know how you want the data serialized. You will need to do that first.
If you are using XML or JSON you can use a DataSource instead and still use PUT instead of POST.
Announcement
Collapse
No announcement yet.
X
-
Using setData instead of setParams generates this message:
I'm not sure why it's trying to convert to XML instead of sending as Request Body. Anyway flag I'm missing on RPCRequest object?Code:WARN:Comm:Non-string data object passed to sendXML as request.data:{comments: "TEST-GWT"} attempting to convert to a string.
Leave a comment:
-
RPCRequest.setHttpMethod("PUT") doesn not submit parameters?
Hello
I'm using following code to submit RPC request using PUT method. It does not seem to send the parameters:
However, simply changing PUT to POST makes the parameter 'comments' to show up in the Servlet.Code:RPCRequest req = new RPCRequest(); HashMap<String,String> data = new HashMap<String,String>(); data.put("comments", "TEST-GWT"); // <- never shows up in the servlet req.setParams(data); req.setEvalResult(false); req.setHttpMethod("PUT"); req.setActionURL("/app/customers"); req.setUseSimpleHttp(true); RPCCallback callback = new RPCCallback() {...} RPCManager.sendRequest(req, callback);
Can someone point me in the right direction. Thanks.Tags: None
Leave a comment: