-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem using gmrender-resurrect with Java Cling: Incorrect namespace #42
Comments
Hi again, another issue on the same topic. After fixing the above error by correct the xml namespace, the XML Parser of cling again complains. The event xml looks like this: <?xml version="1.0"?>
<Event xmlns="urn:schemas-upnp-org:metadata-1-0/RCS/">
<InstanceID val="0">
<GreenVideoGain val="0"/>
<BlueVideoBlackLevel val="0"/>
<VerticalKeystone val="0"/>
<GreenVideoBlackLevel val="0"/>
<Volume val="70"/>
<Loudness val="0"/>
<A_ARG_TYPE_InstanceID val="0"/>
<RedVideoGain val="0"/>
<ColorTemperature val="0"/>
<Sharpness val="0"/>
<A_ARG_TYPE_PresetName val=""/>
<RedVideoBlackLevel val="0"/>
<BlueVideoGain val="0"/>
<Mute val="0"/>
<A_ARG_TYPE_Channel val=""/>
<HorizontalKeystone val="0"/>
<VolumeDB val="-3072"/>
<PresetNameList val=""/>
<Contrast val="0"/>
<Brightness val="0"/>
</InstanceID>
</Event> The error is the following:
The underlying xml schema looks like this:
You find the full schema at https://raw.github.com/4thline/cling/master/support/src/main/resources/org/fourthline/cling/support/renderingcontrol/metadata-1.0-rcs.xsd The author also add a note at the beginning of the file, which explains the problem with the event namespaces: <!--
TODO: UPNP VIOLATION: RenderingControl 1.0 specification schema says "/RCS/" but examples
in the spec say "/AVT_RCS". We had "/AVT_RCS", then "/RCS", now we have "/RCS/", let's
see who complains.
--> Thanks and best regards, |
Thanks for the report. Good to have XML parsers that are a bit more strict to uncover these problems. I'll have a look. |
Thanks to @astahlhofen to notice. This should fix the first part of bug #42.
Please check it out, this should fix both these issues. |
Thanks for the quick fix. But a small change is necessary, because you forgot the Loudness-Attribute. Loudness
============================================================-->
<xsd:element name="Loudness">
<xsd:complexType>
<xsd:attribute name="val" type="xsd:boolean"
use="required"/>
<xsd:attribute name="channel" type="xsd:string"
use="required"/>
</xsd:complexType>
</xsd:element> So you have to change the if-condition inside variable_container.c to
I've already tested this small change on my local version and now the XML-Parser parses the event xml complaint-free ;-) |
Alright, should be working now. Thanks for the report! |
Hi,
I'm writing currently a Java application, based on the Java Cling library.
When I tried to subscribe my app for an Upnp event, everything works fine for events published by AVTransportService. But if I listen to events of the RenderingControlService, cling failed to parse the xml.
The reason is, that you're using the wrong namespace for the special RenderingControlService.
Your xml looks like this for both event types:
This is correct for AVTransportService-Events. But for RenderingControlService-Events, the right syntax would look like this:
Can you please fix this?
Thank's in advance and best regards,
Andreas
The text was updated successfully, but these errors were encountered: