Hi Stefano

I'll post the XML on Monday, but in answer to your question:

Looking at the code the id should never be empty, because the function
is called as follow:
        String localId = new
StringBuffer(id).append("/device/").append(i).toString();
         buildDevice(localId,devUPnP,aux[0]);
and as you can see the localId can't be an empty String.

... The point that I was making was that if you follow this function back:

public static Device createCyberLinkDevice(ServiceReference sr)
    private static Device buildRootDeviceNode(Node root,ServiceReference sr)
        addDevices("",devUPnP,sr);

You find that the empty string is passed in whenever a new root device is 
created. Is this correct?
This means that every device will have a localId  starting /device/




On 28/06/2008 10:29, "Stefano Lenzi" <[EMAIL PROTECTED]> wrote:

Jackson, Bruce wrote:
> We are experiencing a problem, when trying to build a ContentDirectory which 
> can be seen by an Xbox 360.
> We are aware that the Xbox uses a "modified" UPnP implementation, and having 
> taken this into account, the Xbox can see the UPnP device, (that is, it 
> requests the device description xml) but never does anything else. Thus, we 
> believe that there is something we have set incorrectly in the device xml.
>
> In order to debug this problem, we have a correct xml capture from a Windows 
> Media Center which does work with the Xbox. We realised from this, that we 
> could not make our ContentDirectory "look like" the MS media center, because 
> the device xml/service/event URLs are machine generated, and cannot be 
> prefixed by the ID field.

Can you post the XML section that you are referring to of the captured XML?

>
> I don't actually think this is the problem, but I was wondering why the id 
> field is ignored, rather than being prefixed, since the method:
>
> private static void buildDevice(String id,Device parent, ServiceReference sr) 
> actually contains the line:
>
> devUPnP.setLocation(id+"/gen-desc.xml");
>
> ... But the calling function only passes an empty String as id.

Looking at the code the id should never be empty, because the function
is called as follow:
        String localId = new
StringBuffer(id).append("/device/").append(i).toString();
         buildDevice(localId,devUPnP,aux[0]);
and as you can see the localId can't be an empty String.

BTW, inspecting again the code it seems to me that either the line:
        dd.setDescriptionURI(id+"/gen-des
        devUPnP.setLocation(id+"/gen-desc.xml");
inside the method buildDevice should be removed. I can't perform any
test now so if you want to remove those line from the method and check
if something changes.

Ciao,
Stefano "Kismet" Lenzi

Reply via email to