Quantcast
Channel: Sonos Forums
Viewing all articles
Browse latest Browse all 8481

XML structure of event data.

$
0
0
I'm testing code that receives and processes event message from a service in a SONOS device.

In the spec that payload is described as XML, yet in the received message it doesn't quite look correct, take a look at this fragment:

Code:

NOTIFY /some_identifier_that_suits_our_needs HTTP/1.1
HOST: 192.168.1.6:1893
CONTENT-TYPE: text/xml
CONTENT-LENGTH: 6270
NT: upnp:event
NTS: upnp:propchange
SID: uuid:RINCON_000E5872F05201400_sub0000017612
SEQ: 0

<e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0"><e:property><LastChange>&lt;Event xmlns=&quot;urn:schemas-upnp-org:metadata-1-0/AVT/&quot; xmlns:r=&quot;urn:schemas-rinconnetworks-com:metadata-1-0/&quot;&gt;&lt;InstanceID val=&quot;0&quot;&gt;&lt;TransportState val=&quot;PLAYING&quot;/&gt;&lt;CurrentPlayMode val=&quot;NORMAL&quot;/&gt;&lt;CurrentCrossfadeMode

As you can see there is no standard XML line of the form <?xml version="1.0"?> which should precede the <e:propertyset> stuff.

This is not an artifact of a processing bug in the recipient logic either because WireShark also shows that this XML prefix is absent.

I guess this is valid but why does it differ from the spec? (This is present in the specs for UPnP 1.0 and 1.1).

Thanks

PS: This seems to be the case for other devices too like Broadcom routers etc - so is not specific to SONOS.

Also I used to write data feed handlers for stock exchanges and service providers (like the Financial Times) where I learned to make sure any detail like this is understood before assuming anything - hence my apparent pedantry!

Viewing all articles
Browse latest Browse all 8481

Latest Images

Trending Articles



Latest Images