plutinosoft / Platinum

UPnP SDK
http://plutinosoft.com/platinum
Other
500 stars 145 forks source link

False URL created by Device.getAbsolutePath(String path) #17

Closed axen1314 closed 6 years ago

axen1314 commented 6 years ago

I tried to get an action by using these: Service service = device.getService("urn:schemas-upnp-org:device:MediaRenderer:1"); Action action = service.getAction("SetAVTransportURI"); Then I found "service" is created but "action" is null. I checked the source code and confirmed it caused by these:

` // Service.java private Node getSCPDNode() { try {

    URL scpdUrl = new URL(rootDev.getAbsoluteURL(scpdURLStr));

    scpdNode = getSCPDNode(scpdUrl);        

    if (scpdNode != null) {

       data.setSCPDNode(scpdNode);

       return scpdNode;

   }

}
...

} ` it got a false URL by using rootDev.getAbsoluteURL(scpdURLStr), this is what I got: image Is is a bug?

c0diq commented 6 years ago

I think you’re mistaken about which SDK. Looks like you’re using Cyber (java)

-s

On Oct 19, 2018, at 7:02 PM, Axen1314 notifications@github.com wrote:

I tried to get an action by using these: Service service = device.getService("urn:schemas-upnp-org:device:MediaRenderer:1"); Action action = service.getAction("SetAVTransportURI"); Then I found "service" is created but "action", I checked the source code and confirmed it caused by these: // Service.java private Node getSCPDNode() { ... try { URL scpdUrl = new URL(rootDev.getAbsoluteURL(scpdURLStr)); scpdNode = getSCPDNode(scpdUrl); if (scpdNode != null) { data.setSCPDNode(scpdNode); return scpdNode; } } ... } it got a false URL by using rootDev.getAbsoluteURL(scpdURLStr), this is what I got:

Is is a bug?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

axen1314 commented 6 years ago

Oh,yes!Sorry,I made a mistake! Thanks for you reply very much.

axen1314 commented 6 years ago

Oh,yes!Sorry,I made a mistake! Thanks for you reply very much.