I'm having the same issue with my WebUI.
There are few problems here :
1) in json, string value must be quoted : forceOnlineResourceRefresh should be "forceOnlineResourceRefresh"
=> it's minor, cause it's automatically corrected by the gson lib.
2) in java, the variable name is "parameter
s" not "parameter". The XML is working, cause of a renaming annotation : @XStreamImplicit(itemFieldName = "parameter").
This annotation is specific to Xstream and ignored by Gson.
=> 3 options to resolve this :
2.a) use "parameters" in json and "parameter" in xml (no evolution, just need to update the REST API).
- Code:
json : {"name":"forceOnlineResourceRefresh","parameters":1}
xml : <action><name>forceOnlineResourceRefresh</name><parameter>1</parameter></action>
2.b) add a Gson annotation to rename to "parameter" everywhere : @SerializedName("parameter")
2.c) remove the annotation @XStreamImplicit and use "parameters" everywhere.
Zip, it's up to you!
3) in java, the variable is a List<String>, not a simple String.
=> Add [] to your json request (2nd is better) :
- Code:
{"name":"forceOnlineResourceRefresh","parameters": [ 1 ]}
{"name":"forceOnlineResourceRefresh","parameters": [ "1" ]}
For now, you can try the latest request for you android console.