when trying to pass arrays/lists of elements to the (admin) webservice as JSON, I noticed that only one of the elements actually makes it through the parsing stage in the webservice. When passing the request as XML however, everything works fine.
Is this a known issue? And is that maybe why the admin GUI gladly takes JSON responses, but sends XML requests to the webservice?
Example with AdminCreateWaitSet:
Code: Select all
{
"Header": {
"context": { .... }
},
"Body": {
"AdminCreateWaitSetRequest": {
"_jsns": "urn:zimbraAdmin",
"add": [
{
"a": {
"folderInterests": "2",
"name": "test_a@myzimbra",
"types": "all"
}
},
{
"a": {
"folderInterests": "2,5",
"name": "test_b@myzimbra",
"types": "all"
}
}
]
}
}
}
Another one, GetLoggerStats:
Code: Select all
{
"Header": {
"context": { .... }
}
},
"Body": {
"GetLoggerStatsRequest": [
{
"_jsns": "urn:zimbraAdmin",
"endTime": {
"time": "1692366330"
},
"startTime": {
"time": "1692366180"
},
"stats": {
"name": "cpu.csv",
"values": [
{
"stat": {
"name": "cpu:user"
}
},
{
"stat": {
"name": "cpu:iowait"
}
}
]
}
}
]
}
}
I tried to find out whether this only affects the "zimbraAdmin" webservice, so I tried to cross-check with the "zimbraMail" service. One suitable example request I could find is ModifyContactRequest (with multiple ModifyContactRequest->cn->a elements).
This request works correctly, but looking at the Java code it turns out the request data is parsed in a different way and not like the aforementioned example requests in the admin service.
With XML requests however, there are no such problems.
Has anybody else noticed this? Am I on to something or am I just doing it wrong?
Thanks for any thoughts on this.