UPnP implementation in KODI

275 views Asked by At

I am trying to play a song that is in a system with url http://192.168.1.160:10243/WMPNSSv4/1921188402/1_NC0yNTY.mp3 in kodi.

The same code works in windows media player but why not in KODI?

The IP of the system with KODI is 192.168.1.144 I am trying to send action as below:

curl -v -o response.xml -H "Content-Type: text/xml; Charset="UTF-8"" -H "SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI"" -d @AV_transport.xml -X POST http://192.168.1.144:1356/AVTransport/c093ed10-0986-7173-937f-3fc4bbf9ec3a/control.xml

My AV_transport.xml contains:

<?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:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:Service:AVTransport:1">
            <InstanceID>0</InstanceID>
            <CurrentURI>http://192.168.1.160:10243/WMPNSSv4/1921188402/1_NC0yNTY.mp3</CurrentURI>
            <CurrentURIMetaData></CurrentURIMetaData>

        </u:SetAVTransportURI>
    </s:Body>
</s:Envelope>

I am getting header message as 500 Bad reuest: Bad namespace. Please tell me where I have an error in my code.

1

There are 1 answers

0
Jussi Kukkonen On BEST ANSWER

I'm fairly sure XML namespace names are case sensitive by definition, and even if they aren't I would expect some implementations to treat them like that. Probably some software does not consider the capital S valid here:

xmlns:u="urn:schemas-upnp-org:Service:AVTransport:1"