我用的是retrofit
和SimpleXMLConverterFactory
.
And I always get an
ConstructorException: Parameter 'success' does not have a match in class ResponseInfo
And I have no idea what could be wrong. The xml is very simple and i only want the string from the success
node.
XML:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<success>LoremIpsum</success>
</response>
ResponseInfo:
@Root(strict = false, name = "response")
data class ResponseInfo(@Element(required = false, name = "success) var success: String)
编辑1:我测试了Api调用,它返回给定的xml.
Thanks