Hello, I've created an application in java which searchs in the network for devices which support urn:schemas-upnp-org:service:ContentDirectory:2. If this application find a device, the contents of it should be displayed in a jTable.
My Code is:
DeviceList rootDevList = getDeviceList();
int nRootDevs = rootDevList.size();
for (int n = 0; n < nRootDevs; n++)
{
Device dev = rootDevList.getDevice(n);
ServiceList rootServList = dev.getServiceList();
int nRootServ = rootServList.size();
for (int m = 0; m < nRootServ; m++)
{
Service serv = rootServList.getService(m);
if (serv.getServiceType().equals(
"urn:schemas-upnp-org:service:ContentDirectory:2"))
{
stop();
devicesFound = true;
Hello, I've created an application in java which searchs in the network for devices which support urn:schemas-upnp-org:service:ContentDirectory:2. If this application find a device, the contents of it should be displayed in a jTable.
My Code is:
DeviceList rootDevList = getDeviceList();
int nRootDevs = rootDevList.size();
for (int n = 0; n < nRootDevs; n++)
{
Device dev = rootDevList.getDevice(n);
ServiceList rootServList = dev.getServiceList();
int nRootServ = rootServList.size();
for (int m = 0; m < nRootServ; m++)
{
Service serv = rootServList.getService(m);
if (serv.getServiceType().equals(
"urn:schemas-upnp-org:service:ContentDirectory:2"))
{
stop();
devicesFound = true;
lblStatus.setText("Found device: "
+ dev.getFriendlyName());
System.out.println(dev.getLocation());
System.out.println(dev.getFriendlyName());
System.out.println(serv.getControlURL());
System.out.println(serv.getEventSubURL());
System.out.println(serv.getSCPDURL());
}
else if (!devicesFound)
{
lblStatus
.setText("No devices were found");
}
}
}
Can you give me a hint how to continue?
Thank you a lot,
Freddy