Hello, I have been trying to get the media gate to work with the Philips SL50i.
The first problem was that the SL50i sent a Browse request message that contained a null char at the end of the request that caused an "Content is not allowed in trailing section." error. I fixed this by filtering out the char.
This allowed CyberMediaGate to respond with a BrowseResponse, however the SL50i does not seem to like the responce.
I have captured the responce from TwonkyVision and there seems to be a difference in what the browse responce contains. These are the differences that I can see:
TwonkyVision
returns a object.container.musicContainer
For each index, returns a link to an m3u formated playlist. for example:
<;res duration="185:54:14" protocolInfo="http-get:*:audio/x-mpegurl:*">;http://10.0.0.1:8080/virtual/4.m3u
<;/res>;
CyberMediaGate
returns a a object.container
Does not reference anything to play?
I am new to UPNP, I did not known it even existed a week ago, so my first question is does any of this make sense? Which end is at fault (I think it is the SL50i)? How is it best to add support for the SL50i?
Thanks, and well done with the Cybergate project, it is very impressive.
Mark Retallack
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have had a better look at what is going on. Using ethereal I have captured the output from Philips MM and the responce seems to be almost exactly the same as cmgate, except the following entry is used in the Result block:
i have tried lots of things but i am still unable to get the Philips SL50i to responce correctly to the BrowseResponce. It always said "unable to browse".
I will do a bit more digging.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<ObjectID>0</ObjectID>
<BrowseFlag>BrowseDirectChildren</BrowseFlag>
<Filter>*</Filter>
<StartingIndex>0</StartingIndex>
<RequestedCount>12</RequestedCount>
<SortCriteria></SortCriteria>
</u:Browse>
</s:Body></s:Envelope>
[Fatal Error] :9:23: Content is not allowed in trailing section.
CyberGarage warning : org.xml.sax.SAXParseException: Content is not allowed in trailing section.
org.cybergarage.xml.ParserException: org.xml.sax.SAXParseException: Content is not allowed in trailing section.
at org.cybergarage.xml.parser.XercesParser.parse(XercesParser.java:122)
at org.cybergarage.soap.SOAPRequest.getRootNode(SOAPRequest.java:122)
at org.cybergarage.soap.SOAPRequest.getEnvelopeNode(SOAPRequest.java:142)
at org.cybergarage.soap.SOAPRequest.getBodyNode(SOAPRequest.java:147)
at org.cybergarage.upnp.control.ActionRequest.getActionNode(ActionRequest.java:45)
at org.cybergarage.upnp.control.ActionRequest.getActionName(ActionRequest.java:55)
at org.cybergarage.upnp.Device.deviceActionControlRecieved(Device.java:1355)
at org.cybergarage.upnp.Device.deviceControlRequestRecieved(Device.java:1340)
at org.cybergarage.upnp.Device.soapActionRecieved(Device.java:1325)
at org.cybergarage.upnp.Device.httpPostRequestRecieved(Device.java:1304)
at org.cybergarage.upnp.Device.httpRequestRecieved(Device.java:1237)
at org.cybergarage.upnp.media.server.MediaServer.httpRequestRecieved(MediaServer.java:152)
at org.cybergarage.http.HTTPServer.performRequestListener(HTTPServer.java:155)
at org.cybergarage.http.HTTPServerThread.run(HTTPServerThread.java:47)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in trailing section.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.cybergarage.xml.parser.XercesParser.parse(XercesParser.java:106)
... 13 more
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.19-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
Cache-Control: max-age=1800
EXT:
Date: Thu, 20 Jan 2005 17:24:49 GMT
ST: urn:schemas-upnp-org:device:MediaServer:1
USN: uuid:362d9414-31a0-48b6-b684-2b4bd38391d0::upnp:rootdevice
Location: http://10.0.0.1:38520/description.xml
MYNAME: Cyber Garage Media Server
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
mark@hippy:~/buildhome/UPnP/java/cmgatejava> java -jar cmgatejava111.jar
[Fatal Error] :9:23: Content is not allowed in trailing section.
CyberGarage warning : org.xml.sax.SAXParseException: Content is not allowed in trailing section.
org.cybergarage.xml.ParserException: org.xml.sax.SAXParseException: Content is not allowed in trailing section.
at org.cybergarage.xml.parser.XercesParser.parse(XercesParser.java:122)
at org.cybergarage.soap.SOAPRequest.getRootNode(SOAPRequest.java:122)
at org.cybergarage.soap.SOAPRequest.getEnvelopeNode(SOAPRequest.java:142)
at org.cybergarage.soap.SOAPRequest.getBodyNode(SOAPRequest.java:147)
at org.cybergarage.upnp.control.ActionRequest.getActionNode(ActionRequest.java:45)
at org.cybergarage.upnp.control.ActionRequest.getActionName(ActionRequest.java:55)
at org.cybergarage.upnp.Device.deviceActionControlRecieved(Device.java:1355)
at org.cybergarage.upnp.Device.deviceControlRequestRecieved(Device.java:1340)
at org.cybergarage.upnp.Device.soapActionRecieved(Device.java:1325)
at org.cybergarage.upnp.Device.httpPostRequestRecieved(Device.java:1304)
at org.cybergarage.upnp.Device.httpRequestRecieved(Device.java:1237)
at org.cybergarage.upnp.media.server.MediaServer.httpRequestRecieved(MediaServer.java:152)
at org.cybergarage.http.HTTPServer.performRequestListener(HTTPServer.java:155)
at org.cybergarage.http.HTTPServerThread.run(HTTPServerThread.java:47)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in trailing section.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.cybergarage.xml.parser.XercesParser.parse(XercesParser.java:106)
... 13 more
This looks like the first problem that I found (see my first post), it was traced to a single NULL char that was at the end of the Bowse request. I used the following code to filter it out:
try
{
// print out the contence of the stream
while(intValue >= 0 )
{
// read the next byte
intValue = inStream.read();
if (intValue>=0)
{
Byte bytValue = new Byte((byte)intValue);
// check if the current byte is a valid byte
if (bytValue.byteValue() != 0)
{
vecArray.add(bytValue);
}
}
}
}
catch(IOException error)
{
}
Enumeration enmArray = vecArray.elements();
byte bayBuffer[] = new byte[vecArray.size()];
int intOffset = 0;
while(enmArray.hasMoreElements())
{
Byte bytCurrentByte = (Byte)enmArray.nextElement();
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<ObjectID>0</ObjectID>
<BrowseFlag>BrowseDirectChildren</BrowseFlag>
<Filter>*</Filter>
<StartingIndex>0</StartingIndex>
<RequestedCount>12</RequestedCount>
<SortCriteria></SortCriteria>
</u:Browse>
</s:Body></s:Envelope>
[Fatal Error] :9:23: Content is not allowed in trailing section.
CyberGarage warning : org.xml.sax.SAXParseException: Content is not allowed in trailing section.
org.cybergarage.xml.ParserException: org.xml.sax.SAXParseException: Content is not allowed in trailing section.
at org.cybergarage.xml.parser.XercesParser.parse(XercesParser.java:122)
at org.cybergarage.soap.SOAPRequest.getRootNode(SOAPRequest.java:122)
at org.cybergarage.soap.SOAPRequest.getEnvelopeNode(SOAPRequest.java:142)
at org.cybergarage.soap.SOAPRequest.getBodyNode(SOAPRequest.java:147)
at org.cybergarage.upnp.control.ActionRequest.getActionNode(ActionRequest.java:45)
at org.cybergarage.upnp.control.ActionRequest.getActionName(ActionRequest.java:55)
at org.cybergarage.upnp.Device.deviceActionControlRecieved(Device.java:1355)
at org.cybergarage.upnp.Device.deviceControlRequestRecieved(Device.java:1340)
at org.cybergarage.upnp.Device.soapActionRecieved(Device.java:1325)
at org.cybergarage.upnp.Device.httpPostRequestRecieved(Device.java:1304)
at org.cybergarage.upnp.Device.httpRequestRecieved(Device.java:1237)
at org.cybergarage.upnp.media.server.MediaServer.httpRequestRecieved(MediaServer.java:152)
at org.cybergarage.http.HTTPServer.performRequestListener(HTTPServer.java:155)
at org.cybergarage.http.HTTPServerThread.run(HTTPServerThread.java:47)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in trailing section.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.cybergarage.xml.parser.XercesParser.parse(XercesParser.java:106)
... 13 more
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.30-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
Cache-Control: max-age=1800
EXT:
Date: Wed, 02 Feb 2005 17:44:15 GMT
ST: urn:schemas-upnp-org:device:MediaServer:1
USN: uuid:362d9414-31a0-48b6-b684-2b4bd38391d0::upnp:rootdevice
Location: http://10.0.0.1:38520/description.xml
MYNAME: Cyber Garage Media Server
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.30-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
Cache-Control: max-age=1800
EXT:
Date: Wed, 02 Feb 2005 17:44:23 GMT
ST: urn:schemas-upnp-org:device:MediaServer:1
USN: uuid:362d9414-31a0-48b6-b684-2b4bd38391d0::upnp:rootdevice
Location: http://10.0.0.1:38520/description.xml
MYNAME: Cyber Garage Media Server
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I have been trying to get the media gate to work with the Philips SL50i.
The first problem was that the SL50i sent a Browse request message that contained a null char at the end of the request that caused an "Content is not allowed in trailing section." error. I fixed this by filtering out the char.
This allowed CyberMediaGate to respond with a BrowseResponse, however the SL50i does not seem to like the responce.
I have captured the responce from TwonkyVision and there seems to be a difference in what the browse responce contains. These are the differences that I can see:
TwonkyVision
returns a object.container.musicContainer
For each index, returns a link to an m3u formated playlist. for example:
<;res duration="185:54:14" protocolInfo="http-get:*:audio/x-mpegurl:*">;http://10.0.0.1:8080/virtual/4.m3u
<;/res>;
CyberMediaGate
returns a a object.container
Does not reference anything to play?
I am new to UPNP, I did not known it even existed a week ago, so my first question is does any of this make sense? Which end is at fault (I think it is the SL50i)? How is it best to add support for the SL50i?
Thanks, and well done with the Cybergate project, it is very impressive.
Mark Retallack
I have had a better look at what is going on. Using ethereal I have captured the output from Philips MM and the responce seems to be almost exactly the same as cmgate, except the following entry is used in the Result block:
<desc nameSpace="http://www.simpledevices.com/ns/upnp/" id="delete_when_empty">false</desc>
<desc nameSpace="http://www.simpledevices.com/ns/upnp/" id="cacheable">true</desc>
<res></res>
i have tried lots of things but i am still unable to get the Philips SL50i to responce correctly to the BrowseResponce. It always said "unable to browse".
I will do a bit more digging.
Hi Mark,
I want to know your problem in more detail.
I posted the new package using latest CyberLink to the following site as v1.1.1.
https://sourceforge.net/project/showfiles.php?group_id=75638&package_id=109386
The package is added a debug option. Please run with the following verbose option.
java -jar cmgatejava111.jar
The verbose option outputs all soap messages, and tell me the result :-)
thanks for the reply, just re-read it and this is the output I think you wanted:
mark@hippy:~/buildhome/UPnP/java/cmgatejava> java -jar cmgatejava111.jar -v
CyberGarage message : Loadin Directories (1) ....
CyberGarage message : [0] = Music,/home/mark/infostuff/transcode/mpg/eels
CyberGarage message : accept ...
CyberGarage message : sock = /10.0.0.11:13334
CyberGarage message : httpServThread ...
CyberGarage message : uri = /description.xml
GET /description.xml HTTP/1.0
HOST: 10.0.0.1:38520
CyberGarage message : httpGetRequestRecieved = /description.xml
CyberGarage message : accept ...
CyberGarage message : sock = /10.0.0.11:13591
CyberGarage message : httpServThread ...
CyberGarage message : uri = /service/ContentDirectory_event
SUBSCRIBE /service/ContentDirectory_event HTTP/1.1
HOST: 10.0.0.1:38520
CALLBACK: <http://10.0.0.11:80/>
NT: upnp:event
TIMEOUT: Second-1800
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.19-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
SID: uuid:6efa-a101-dc08-e02e
TIMEOUT: Second-1800
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.19-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
SID: uuid:6efa-a101-dc08-e02e
TIMEOUT: Second-1800
Date: Thu, 20 Jan 2005 17:24:35 GMT
CyberGarage message : accept ...
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.19-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
Cache-Control: max-age=1800
EXT:
Date: Thu, 20 Jan 2005 17:24:41 GMT
ST: urn:schemas-upnp-org:device:MediaServer:1
USN: uuid:362d9414-31a0-48b6-b684-2b4bd38391d0::upnp:rootdevice
Location: http://10.0.0.1:38520/description.xml
MYNAME: Cyber Garage Media Server
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.19-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
Cache-Control: max-age=1800
EXT:
Date: Thu, 20 Jan 2005 17:24:42 GMT
ST: urn:schemas-upnp-org:device:MediaServer:1
USN: uuid:362d9414-31a0-48b6-b684-2b4bd38391d0::upnp:rootdevice
Location: http://10.0.0.1:38520/description.xml
MYNAME: Cyber Garage Media Server
CyberGarage message : sock = /10.0.0.11:15128
CyberGarage message : httpServThread ...
CyberGarage message : accept ...
CyberGarage message : uri = /service/ContentDirectory_control
POST /service/ContentDirectory_control HTTP/1.0
Content-Type: text/xml
SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"
Content-Length: 423
Host: 10.0.0.1:38520
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<ObjectID>0</ObjectID>
<BrowseFlag>BrowseDirectChildren</BrowseFlag>
<Filter>*</Filter>
<StartingIndex>0</StartingIndex>
<RequestedCount>12</RequestedCount>
<SortCriteria></SortCriteria>
</u:Browse>
</s:Body></s:Envelope>
POST /service/ContentDirectory_control HTTP/1.0
Content-Type: text/xml
SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"
Content-Length: 423
Host: 10.0.0.1:38520
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<ObjectID>0</ObjectID>
<BrowseFlag>BrowseDirectChildren</BrowseFlag>
<Filter>*</Filter>
<StartingIndex>0</StartingIndex>
<RequestedCount>12</RequestedCount>
<SortCriteria></SortCriteria>
</u:Browse>
</s:Body></s:Envelope>
[Fatal Error] :9:23: Content is not allowed in trailing section.
CyberGarage warning : org.xml.sax.SAXParseException: Content is not allowed in trailing section.
org.cybergarage.xml.ParserException: org.xml.sax.SAXParseException: Content is not allowed in trailing section.
at org.cybergarage.xml.parser.XercesParser.parse(XercesParser.java:122)
at org.cybergarage.soap.SOAPRequest.getRootNode(SOAPRequest.java:122)
at org.cybergarage.soap.SOAPRequest.getEnvelopeNode(SOAPRequest.java:142)
at org.cybergarage.soap.SOAPRequest.getBodyNode(SOAPRequest.java:147)
at org.cybergarage.upnp.control.ActionRequest.getActionNode(ActionRequest.java:45)
at org.cybergarage.upnp.control.ActionRequest.getActionName(ActionRequest.java:55)
at org.cybergarage.upnp.Device.deviceActionControlRecieved(Device.java:1355)
at org.cybergarage.upnp.Device.deviceControlRequestRecieved(Device.java:1340)
at org.cybergarage.upnp.Device.soapActionRecieved(Device.java:1325)
at org.cybergarage.upnp.Device.httpPostRequestRecieved(Device.java:1304)
at org.cybergarage.upnp.Device.httpRequestRecieved(Device.java:1237)
at org.cybergarage.upnp.media.server.MediaServer.httpRequestRecieved(MediaServer.java:152)
at org.cybergarage.http.HTTPServer.performRequestListener(HTTPServer.java:155)
at org.cybergarage.http.HTTPServerThread.run(HTTPServerThread.java:47)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in trailing section.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.cybergarage.xml.parser.XercesParser.parse(XercesParser.java:106)
... 13 more
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.19-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
Cache-Control: max-age=1800
EXT:
Date: Thu, 20 Jan 2005 17:24:49 GMT
ST: urn:schemas-upnp-org:device:MediaServer:1
USN: uuid:362d9414-31a0-48b6-b684-2b4bd38391d0::upnp:rootdevice
Location: http://10.0.0.1:38520/description.xml
MYNAME: Cyber Garage Media Server
Thanks for the reply, this is the output:
mark@hippy:~/buildhome/UPnP/java/cmgatejava> java -jar cmgatejava111.jar
[Fatal Error] :9:23: Content is not allowed in trailing section.
CyberGarage warning : org.xml.sax.SAXParseException: Content is not allowed in trailing section.
org.cybergarage.xml.ParserException: org.xml.sax.SAXParseException: Content is not allowed in trailing section.
at org.cybergarage.xml.parser.XercesParser.parse(XercesParser.java:122)
at org.cybergarage.soap.SOAPRequest.getRootNode(SOAPRequest.java:122)
at org.cybergarage.soap.SOAPRequest.getEnvelopeNode(SOAPRequest.java:142)
at org.cybergarage.soap.SOAPRequest.getBodyNode(SOAPRequest.java:147)
at org.cybergarage.upnp.control.ActionRequest.getActionNode(ActionRequest.java:45)
at org.cybergarage.upnp.control.ActionRequest.getActionName(ActionRequest.java:55)
at org.cybergarage.upnp.Device.deviceActionControlRecieved(Device.java:1355)
at org.cybergarage.upnp.Device.deviceControlRequestRecieved(Device.java:1340)
at org.cybergarage.upnp.Device.soapActionRecieved(Device.java:1325)
at org.cybergarage.upnp.Device.httpPostRequestRecieved(Device.java:1304)
at org.cybergarage.upnp.Device.httpRequestRecieved(Device.java:1237)
at org.cybergarage.upnp.media.server.MediaServer.httpRequestRecieved(MediaServer.java:152)
at org.cybergarage.http.HTTPServer.performRequestListener(HTTPServer.java:155)
at org.cybergarage.http.HTTPServerThread.run(HTTPServerThread.java:47)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in trailing section.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.cybergarage.xml.parser.XercesParser.parse(XercesParser.java:106)
... 13 more
This looks like the first problem that I found (see my first post), it was traced to a single NULL char that was at the end of the Bowse request. I used the following code to filter it out:
//------------------------------------------------------------
Vector vecArray = new Vector();
int intValue = 0;
try
{
// print out the contence of the stream
while(intValue >= 0 )
{
// read the next byte
intValue = inStream.read();
if (intValue>=0)
{
Byte bytValue = new Byte((byte)intValue);
// check if the current byte is a valid byte
if (bytValue.byteValue() != 0)
{
vecArray.add(bytValue);
}
}
}
}
catch(IOException error)
{
}
Enumeration enmArray = vecArray.elements();
byte bayBuffer[] = new byte[vecArray.size()];
int intOffset = 0;
while(enmArray.hasMoreElements())
{
Byte bytCurrentByte = (Byte)enmArray.nextElement();
bayBuffer[intOffset++] = bytCurrentByte.byteValue();
}
InputStream ipsNewStream = new ByteArrayInputStream(bayBuffer);
InputSource inSrc = new InputSource(ipsNewStream);
//------------------------------------------------------------
I have tryed using the kXML2Parser instead of the XercesParser, and that also fixed the problem.
setXMLParser(new kXML2Parser());
If I use the XercesParser and add the null char filter, the folowing output is generated with debug enabled:
CyberGarage message : sock = /10.0.0.11:11025
CyberGarage message : httpServThread ...
CyberGarage message : accept ...
CyberGarage message : uri = /service/ContentDirectory_control
POST /service/ContentDirectory_control HTTP/1.0
Content-Type: text/xml
SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"
Content-Length: 423
Host: 10.0.0.1:38520
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<ObjectID>0</ObjectID>
<BrowseFlag>BrowseDirectChildren</BrowseFlag>
<Filter>*</Filter>
<StartingIndex>0</StartingIndex>
<RequestedCount>12</RequestedCount>
<SortCriteria></SortCriteria>
</u:Browse>
</s:Body></s:Envelope>
Sorry missed the rest of the output:
HTTP/1.1 200 OK
Content-Type: text/xml; charset="utf-8"
Server: Linux/2.6.5-7.111.19-default UPnP/1.0 CyberLink/1.6
Content-Length: 1012
EXT:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:BrowseResponse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<Result><?xml version="1.0" encoding="utf-8"?><DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/">
<container id="1" parentID="0" restricted="1" searchable="0" childCount="12">
<upnp:class>object.container</upnp:class>
<upnp:writeStatus>UNKNOWN</upnp:writeStatus>
<dc:title>Music</dc:title>
</container>
</DIDL-Lite>
</Result>
<NumberReturned>1</NumberReturned>
<TotalMatches>1</TotalMatches>
<UpdateID>14</UpdateID>
</u:BrowseResponse>
</s:Body>
</s:Envelope>
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.19-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
Cache-Control: max-age=1800
EXT:
Date: Thu, 20 Jan 2005 17:05:10 GMT
ST: urn:schemas-upnp-org:device:MediaServer:1
USN: uuid:362d9414-31a0-48b6-b684-2b4bd38391d0::upnp:rootdevice
Location: http://10.0.0.1:38520/description.xml
MYNAME: Cyber Garage Media Server
Hi Mark,
I fixed a bug about your problem today, and I have released the new package as CyberLink v1.6.2 and CyberMediaGate v1.1.2.
I fixed HTTPPacket::set() not to read over the content length when the stream is keep alive such as HTTP v1.1 client.
Please check it :-)
the same problem is happining: I think its a problem with the Philips SL50i, it sends a null char at the end of the packet. i can se it on ethereal.
mark@hippy:~/buildhome/UPnP/java/cmgatejava> java -jar cmgatejava112.jar -v
CyberGarage message : Loadin Directories (2) ....
CyberGarage message : [0] = Music,/home/mark/infostuff/transcode/mpg/eels
CyberGarage message : [1] = Test,/home/mark/infostuff/music/mpg/eels
CyberGarage message : accept ...
CyberGarage message : sock = /10.0.0.11:6923
CyberGarage message : httpServThread ...
CyberGarage message : uri = /description.xml
GET /description.xml HTTP/1.0
HOST: 10.0.0.1:38520
CyberGarage message : httpGetRequestRecieved = /description.xml
CyberGarage message : accept ...
CyberGarage message : sock = /10.0.0.11:7180
CyberGarage message : httpServThread ...
CyberGarage message : uri = /service/ContentDirectory_event
SUBSCRIBE /service/ContentDirectory_event HTTP/1.1
HOST: 10.0.0.1:38520
CALLBACK: <http://10.0.0.11:80/>
NT: upnp:event
TIMEOUT: Second-1800
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.30-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
SID: uuid:d43f-a101-0774-e0bf
TIMEOUT: Second-1800
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.30-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
SID: uuid:d43f-a101-0774-e0bf
TIMEOUT: Second-1800
Date: Wed, 02 Feb 2005 17:43:57 GMT
CyberGarage message : accept ...
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.30-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
Cache-Control: max-age=1800
EXT:
Date: Wed, 02 Feb 2005 17:44:06 GMT
ST: urn:schemas-upnp-org:device:MediaServer:1
USN: uuid:362d9414-31a0-48b6-b684-2b4bd38391d0::upnp:rootdevice
Location: http://10.0.0.1:38520/description.xml
MYNAME: Cyber Garage Media Server
CyberGarage message : sock = /10.0.0.11:8717
CyberGarage message : httpServThread ...
CyberGarage message : accept ...
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.30-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
Cache-Control: max-age=1800
EXT:
Date: Wed, 02 Feb 2005 17:44:09 GMT
ST: urn:schemas-upnp-org:device:MediaServer:1
USN: uuid:362d9414-31a0-48b6-b684-2b4bd38391d0::upnp:rootdevice
Location: http://10.0.0.1:38520/description.xml
MYNAME: Cyber Garage Media Server
CyberGarage message : uri = /service/ContentDirectory_control
POST /service/ContentDirectory_control HTTP/1.0
Content-Type: text/xml
SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"
Content-Length: 423
Host: 10.0.0.1:38520
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<ObjectID>0</ObjectID>
<BrowseFlag>BrowseDirectChildren</BrowseFlag>
<Filter>*</Filter>
<StartingIndex>0</StartingIndex>
<RequestedCount>12</RequestedCount>
<SortCriteria></SortCriteria>
</u:Browse>
</s:Body></s:Envelope>
POST /service/ContentDirectory_control HTTP/1.0
Content-Type: text/xml
SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"
Content-Length: 423
Host: 10.0.0.1:38520
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
<ObjectID>0</ObjectID>
<BrowseFlag>BrowseDirectChildren</BrowseFlag>
<Filter>*</Filter>
<StartingIndex>0</StartingIndex>
<RequestedCount>12</RequestedCount>
<SortCriteria></SortCriteria>
</u:Browse>
</s:Body></s:Envelope>
[Fatal Error] :9:23: Content is not allowed in trailing section.
CyberGarage warning : org.xml.sax.SAXParseException: Content is not allowed in trailing section.
org.cybergarage.xml.ParserException: org.xml.sax.SAXParseException: Content is not allowed in trailing section.
at org.cybergarage.xml.parser.XercesParser.parse(XercesParser.java:122)
at org.cybergarage.soap.SOAPRequest.getRootNode(SOAPRequest.java:122)
at org.cybergarage.soap.SOAPRequest.getEnvelopeNode(SOAPRequest.java:142)
at org.cybergarage.soap.SOAPRequest.getBodyNode(SOAPRequest.java:147)
at org.cybergarage.upnp.control.ActionRequest.getActionNode(ActionRequest.java:45)
at org.cybergarage.upnp.control.ActionRequest.getActionName(ActionRequest.java:55)
at org.cybergarage.upnp.Device.deviceActionControlRecieved(Device.java:1355)
at org.cybergarage.upnp.Device.deviceControlRequestRecieved(Device.java:1340)
at org.cybergarage.upnp.Device.soapActionRecieved(Device.java:1325)
at org.cybergarage.upnp.Device.httpPostRequestRecieved(Device.java:1304)
at org.cybergarage.upnp.Device.httpRequestRecieved(Device.java:1237)
at org.cybergarage.upnp.media.server.MediaServer.httpRequestRecieved(MediaServer.java:152)
at org.cybergarage.http.HTTPServer.performRequestListener(HTTPServer.java:155)
at org.cybergarage.http.HTTPServerThread.run(HTTPServerThread.java:47)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in trailing section.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.cybergarage.xml.parser.XercesParser.parse(XercesParser.java:106)
... 13 more
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.30-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
Cache-Control: max-age=1800
EXT:
Date: Wed, 02 Feb 2005 17:44:15 GMT
ST: urn:schemas-upnp-org:device:MediaServer:1
USN: uuid:362d9414-31a0-48b6-b684-2b4bd38391d0::upnp:rootdevice
Location: http://10.0.0.1:38520/description.xml
MYNAME: Cyber Garage Media Server
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/2.6.5-7.111.30-default UPnP/1.0 CyberLink/1.6
Content-Length: 0
Cache-Control: max-age=1800
EXT:
Date: Wed, 02 Feb 2005 17:44:23 GMT
ST: urn:schemas-upnp-org:device:MediaServer:1
USN: uuid:362d9414-31a0-48b6-b684-2b4bd38391d0::upnp:rootdevice
Location: http://10.0.0.1:38520/description.xml
MYNAME: Cyber Garage Media Server
Hi Mark,
I checked that CyberLink and Xerces couldn't parse
the null data normally such as your devices.
It seem that the device will be release at March, but I would like to get the device in Japan :-)
Thanks for your report.
Hi Satoshi,
I have reported the bug releted to parsing XML with Xerces some moth ago. Have you add my patch to your code?
You can check my bug report and releted patch at:
https://sourceforge.net/forum/forum.php?thread_id=1161656&forum_id=258158
P.S.: Have you ever recieved a e-mail from me?