Attn developpers: bug in GetPositionInfo SOAP response
Posted by: bubbleguuum on 19 December 2011
There's a bug in GetPositionInfo SOAP response: TrackMetaData is not XML escaped, producing unparsable XML. Moreover this field shouldn't start with the xml prolog (<?xml version='1.0' encoding='UTF-8' ?>
device exception: org.fourthline.cling.g.b.j: Can't transform message payload: org.xmlpull.v1.XmlPullParserException: processing instructions must not start with xml (position:unknown @8:19 in java.io.StringReader@410b77f0)
context: GetPositionInfo
Manufacturer: Naim Audio Ltd.
Model Description: naimuniti
Model Name: naimuniti
Model Number: 1.0
bad XML: <s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:GetPositionInfoResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
<Track>1</Track>
<TrackDuration>0:02:52</TrackDuration>
<TrackMetaData><?xml version='1.0' encoding='UTF-8' ?><DIDL-Lite xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlnsc="http://purl.org/dc/elements/1.1/" xmlnslna="urn:schemas-dlna-org:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><item id="64$1$6E$1"><upnp:class>object.item.audioItem</upnp:class><dc:title>pyjamarama</dc:title><dc:creator>Bryan Ferry and Roxy Music</dc:creator><upnp:artist>Bryan Ferry and Roxy Music</upnp:artist><upnp:albumArtURI>http://192.168.5.11:8200/AlbumArt/844-1912.jpg</upnp:albumArtURI><upnp:albumArtURI dlnarofileID="JPEG_TN">http://192.168.5.11:8200/AlbumArt/844-1912.jpg</upnp:albumArtURI><upnp:album>The Platinum Collection</upnp:album><upnpriginalTrackNumber>102</upnpriginalTrackNumber><dcate>2004-01-01</dcate><ownerUdn>4d696e69-444c-164e-9d41-002202001c06</ownerUdn><res protocolInfo="http-get:*:audio/mpegLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0" bitrate="160000" sampleFrequency="44100" duration="0:02:52.000">http://192.168.5.11:8200/MediaItems/1912.mp3</res></item></DIDL-Lite>t;res protocolInfo="http-get:*:audio/mpegLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0" bitrate="160000" sampleFrequency="44100" duration="0:02:52.000">http://192.168.5.11:8200/MediaItems/1912.mp3</res></item></DIDL-Lite></TrackMetaData>
<TrackURI>http://192.168.5.11:8200/MediaItems/1912.mp3</TrackURI>
<RelTime>0:00:01</RelTime>
<AbsTime>0:00:01</AbsTime>
<RelCount>1000</RelCount>
<AbsCount>1000</AbsCount>
</u:GetPositionInfoResponse>
</s:Body>
</s:Envelope>