kolo / xmlrpc

Implementation of XMLRPC protocol in Go language.
MIT License
159 stars 94 forks source link

Passing multiple arguments #37

Closed EyckWigo closed 5 years ago

EyckWigo commented 8 years ago

I'm trying to pass multiple arguments to a XMLRPC call, but I keep getting hashes and arrays instead

var dataSlice [5]string 
var interfaceSlice []interface{} = make([]interface{}, len(dataSlice))
for i, d := range dataSlice {
    interfaceSlice[i] = d
}

xmlrpc.Call("Sth.method", &interfaceSlice, &result)

and on server side I can see, that that data was encoded as a single Array ( or, if I provide a struct, as a Hash )

EyckWigo commented 8 years ago

It turns out, that

xmlrpc.Call("Sth.method", interfaceSlice, &result)

triggers the desired behaviour.