title: Android cling-android Upnp SetAVTransportURI send Upnp Response = 500 Internal server error on xbox one
body: <p>i'have a probleme using Upnp to send video file to xbox one with java/android.</p>
  
  <p>I use <a href="http://4thline.org/projects/cling/" rel="nofollow">cling api</a> to discover and connect upnp device over network.
  The discover operation work well, the xbox one is detected.
  The problem is when i try to send video link to this device.</p>
  
  <p>Here, it's the xbox response on upnp connect service:</p>
  
  <pre><code>&lt;root xmlns="urn:schemas-upnp-org:device-1-0"
    xmlns:df="http://schemas.microsoft.com/windows/2008/09/devicefoundation"
    xmlns:microsoft="urn:schemas-microsoft-com:WMPDMR-1-0"
    xmlns:pnpx="http://schemas.microsoft.com/windows/pnpx/2005/11"&gt;
  
  &lt;specVersion&gt;
    &lt;major&gt;1&lt;/major&gt;
    &lt;minor&gt;0&lt;/minor&gt;
  &lt;/specVersion&gt;
  &lt;device&gt;`
  &lt;deviceType&gt;urn:schemas-upnp-org:device:MediaRenderer:1&lt;/deviceType&gt;
  &lt;friendlyName&gt;Xbox-SystemOS&lt;/friendlyName&gt;
  &lt;modelName&gt;Xbox One&lt;/modelName&gt;
  &lt;modelDescription&gt;Digital Media Renderer&lt;/modelDescription&gt;
  &lt;manufacturer&gt;Microsoft Corporation&lt;/manufacturer&gt;
  &lt;manufacturerURL&gt;http://www.microsoft.com&lt;/manufacturerURL&gt;
  &lt;modelURL&gt;http://xbox.com&lt;/modelURL&gt;
  &lt;UDN&gt;uuid:6e5e6c24-e450-4c6b-8987-89c6be33a1f7&lt;/UDN&gt;
  &lt;df:X_containerId&gt;{6E5E6C24-E450-4C6B-8987-89C6BE33A1F7}&lt;/df:X_containerId&gt;
  &lt;dlna:X_DLNACAP xmlns:dlna="urn:schemas-dlna-org:device-1-0"/&gt;
  &lt;dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0"&gt;DMR-1.50&lt;/dlna:X_DLNADOC&gt;
  &lt;pnpx:X_deviceCategory&gt;MediaDevices&lt;/pnpx:X_deviceCategory&gt;
  &lt;pnpx:X_hardwareId&gt;VEN_0125&amp;DEV_0002&amp;REV_0001 VEN_0125&amp;DEV_0002&lt;/pnpx:X_hardwareId&gt;
  &lt;iconList&gt;
      &lt;icon&gt;
          &lt;mimetype&gt;image/jpeg&lt;/mimetype&gt;
          &lt;width&gt;120&lt;/width&gt;
          &lt;height&gt;120&lt;/height&gt;
          &lt;depth&gt;24&lt;/depth&gt;
          &lt;url&gt;/upnphost/udhisapi.dll?content=uuid:cde23e6c-d763-427d-b96b-c71a8cc5a3a5&lt;/url&gt;
      &lt;/icon&gt;
      &lt;icon&gt;
          &lt;mimetype&gt;image/jpeg&lt;/mimetype&gt;
          &lt;width&gt;48&lt;/width&gt;
          &lt;height&gt;48&lt;/height&gt;
          &lt;depth&gt;24&lt;/depth&gt;
          &lt;url&gt;/upnphost/udhisapi.dll?content=uuid:a89beb23-a099-4f65-8cd5-aad6e7210db0&lt;/url&gt;
      &lt;/icon&gt;
      &lt;icon&gt;
          &lt;mimetype&gt;image/png&lt;/mimetype&gt;
          &lt;width&gt;120&lt;/width&gt;
          &lt;height&gt;120&lt;/height&gt;
          &lt;depth&gt;24&lt;/depth&gt;
          &lt;url&gt;/upnphost/udhisapi.dll?content=uuid:d4eb98f9-e708-4faa-bcd4-591a9365d000&lt;/url&gt;
      &lt;/icon&gt;
      &lt;icon&gt;
          &lt;mimetype&gt;image/png&lt;/mimetype&gt;
          &lt;width&gt;48&lt;/width&gt;
          &lt;height&gt;48&lt;/height&gt;
          &lt;depth&gt;24&lt;/depth&gt;
          &lt;url&gt;/upnphost/udhisapi.dll?content=uuid:ba12866a-d6c8-4a19-94e7-7a2ed8f305b3&lt;/url&gt;
      &lt;/icon&gt; 
  &lt;/iconList&gt;
  &lt;serviceList&gt;
      &lt;service&gt;
          &lt;serviceType&gt;urn:schemas-upnp-org:service:RenderingControl:1&lt;/serviceType&gt;
          &lt;serviceId&gt;urn:upnp-org:serviceId:RenderingControl&lt;/serviceId&gt;
          &lt;controlURL&gt;/upnphost/udhisapi.dll?control=uuid:6e5e6c24-e450-4c6b-8987-89c6be33a1f7+urn:upnp-org:serviceId:RenderingControl&lt;/controlURL&gt;
          &lt;eventSubURL&gt;/upnphost/udhisapi.dll?event=uuid:6e5e6c24-e450-4c6b-8987-89c6be33a1f7+urn:upnp-org:serviceId:RenderingControl&lt;/eventSubURL&gt;
          &lt;SCPDURL&gt;/upnphost/udhisapi.dll?content=uuid:654eefc5-0e1b-4bfa-a72f-e02001be36e4&lt;/SCPDURL&gt;
      &lt;/service&gt;
      &lt;service&gt;
          &lt;serviceType&gt;urn:schemas-upnp-org:service:AVTransport:1&lt;/serviceType&gt;
          &lt;serviceId&gt;urn:upnp-org:serviceId:AVTransport&lt;/serviceId&gt;
          &lt;controlURL&gt;/upnphost/udhisapi.dll?control=uuid:6e5e6c24-e450-4c6b-8987-89c6be33a1f7+urn:upnp-org:serviceId:AVTransport&lt;/controlURL&gt;
          &lt;eventSubURL&gt;/upnphost/udhisapi.dll?event=uuid:6e5e6c24-e450-4c6b-8987-89c6be33a1f7+urn:upnp-org:serviceId:AVTransport&lt;/eventSubURL&gt;
          &lt;SCPDURL&gt;/upnphost/udhisapi.dll?content=uuid:85466b84-2a4a-4514-b7a4-2bb7a4871da4&lt;/SCPDURL&gt;
      &lt;/service&gt;
      &lt;service&gt;
          &lt;serviceType&gt;urn:schemas-upnp-org:service:ConnectionManager:1&lt;/serviceType&gt;
          &lt;serviceId&gt;urn:upnp-org:serviceId:ConnectionManager&lt;/serviceId&gt;
          &lt;controlURL&gt;/upnphost/udhisapi.dll?control=uuid:6e5e6c24-e450-4c6b-8987-89c6be33a1f7+urn:upnp-org:serviceId:ConnectionManager&lt;/controlURL&gt;
          &lt;eventSubURL&gt;/upnphost/udhisapi.dll?event=uuid:6e5e6c24-e450-4c6b-8987-89c6be33a1f7+urn:upnp-org:serviceId:ConnectionManager&lt;/eventSubURL&gt;
          &lt;SCPDURL&gt;/upnphost/udhisapi.dll?content=uuid:1de93088-6694-4d7c-a4a5-771ae3008378&lt;/SCPDURL&gt;
      &lt;/service&gt;
  &lt;/serviceList&gt;
  &lt;/device&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>As said in the <a href="http://4thline.org/projects/cling/support/manual/cling-support-manual.html#javadoc.example.mediarenderer.AVTransportTest.testCustomPlayer.." rel="nofollow">api documentation</a>, you have to send first an SetAVTransportURI action to the device wich provide the url of the video file:</p>
  
  <pre><code>4.2. Controlling a renderer
  Cling Support provides several action callbacks that simplify creating a     control point for the AVTransport service. This is the client side of your     player, the remote control.
  
  This is how you set an URI for playback:
  
  ActionCallback setAVTransportURIAction = new SetAVTransportURI(service, "http://www.duorimes.siquiere.fr/wa_files/Il_20camino.flv", "NO METADATA") {
              @Override
              public void failure(ActionInvocation invocation, UpnpResponse     operation, String defaultMsg) {
                  // Something was wrong
          }
      };
  This is how you actually start playback:
  
  ActionCallback playAction = new Play(service) {
              @Override
              public void failure(ActionInvocation invocation, UpnpResponse     operation, String defaultMsg) {
                  // Something was wrong
              }
          };
  </code></pre>
  
  <p>In my case, the first action send me a 500 error code (Internal server error)</p>
  
  <p>Did someone ever experience the same problem?</p>
  
  <p>Thanks by advance for your help.</p>