Soup.xmlrpc_parse_method_response looks not working
Submitted by Guillaume Gauvrit
Link to original bug (#710512)
Description
I have done many tests to get it working but it's look buggy:
Here is an exemple that should works:
const GObject = imports.gi.GObject;
const Soup = imports.gi.Soup;
let val = new GObject.Value();
let response = '<?xml version="1.0"?><methodResponse><params><param>'+
'<value><string>South Dakota</string></value></param></params></methodResponse>';
Soup.xmlrpc_parse_method_response(response, -1, val);
log(val.data);
let val = new GObject.Value();
let response = '<methodResponse><params><param><value><struct><member>' +
'<name>api_version</name><value><string>3.3.0</string></value></member>' +
'</struct></value></param></params></methodResponse>';
Soup.xmlrpc_parse_method_response(response, response.length, val);
log(val.data);
here is the result:
% gjs test.js
Gjs-Message: JS LOG: ,
(gjs:17200): Gjs-WARNING **: JS ERROR: Error: Unable to introspect element-type of container in GValue
@test.js:16
JS_EvaluateScript() failed
Edited by Philip Chimento