2

I am using retrofit with SimpleXmlConverterFactory. I tried every combination I know but I keep getting this error also I checked several questions like this and this. But I couldn't figure it out.

Parameter 'DASH' does not have a match in class com.example.exoplayer.api.model.XmlGroupList

Final version of my model is like this:

@Root(name = "DASH", strict = false)
data class DASH(
    @Attribute(required = true)
    val Name: String?,
    @Attribute(required = true)
    val DRM: String?,
    @Attribute(required = true)
    val StreamLink: String?)


data class XmlGroupList(
    @Element(name = "DASH", required = false)
    val DASH: DASH,
    @ElementList(name = "Thumbnail", inline = true)
    val Thumbnail: List<Thumbnail>?
)

@Root(name = "Thumbnail", strict = false)
data class Thumbnail(
    @Attribute(required = true)
    val Name: String?,
    @Attribute(required = true)
    val DRM: String?,
    @Attribute(required = true)
    val StreamLink: String?
)

And the Xml is:

<GroupList>
<DASH Name="LivePreset_test Output" StreamLink="www.xxxx.xxxx.mpd" DRM="0"/>
<Thumbnail Name="Thumbnail Output" StreamLink="www.xxxx.xxxx.vtt" DRM="0"/>
<Thumbnail Name="Poster Output" StreamLink="www.xxxx.xxxx.vtt" DRM="0"/>
</GroupList>

0 Answers0