kolo / xmlrpc

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

Cannot decode an array response #43

Closed alecthegeek closed 7 years ago

alecthegeek commented 8 years ago

When my server responds with the following

<methodResponse>
    <params>
        <param>
            <value>
                <array>
                    <data>
                        <value>
                            Account1
                            </value>
                        <value>
                            Account2
                            </value>
                        </data>
                    </array>
                </value>
            </param>
        </params>
    </methodResponse>

I get an error message reading body error: type mismatch - can't unmarshal interface to string. Simpler responses (e.g. a string) can be decoded fine.

Does anyone know if this case does work? Looking at the decoder I see there is a case for strings with no type (default to string). I'm not sure how to get the tests to run.

Thanks

alecthegeek commented 7 years ago

OK -- I gave up and moved to github.com/divan/gorilla-xmlrpc/xml

kodburn commented 6 years ago
<data>
    <value>
       <string>Account1</string>
    </value>
    <value>
      <string>Account1</string>
    </value>
</data>

Should work fine.