Nov 4, 2011 at 2:16 PM
Edited Nov 4, 2011 at 2:29 PM
First of all that error sounds like its a problem with the specific soap request for the call to that action, this is why I think it could be something to do with the URL, maybe you should try escaping the URL? The best way for you to determine what the
problem is, is to use a packet snooper and see what data is being sent to and from your Samsung TV, pay close attention to the headers and XML soap data to ensure it is intact and escaped properly, i use a program called Snoop2 which utilises WinPCap.
Also, can you please send me the XML description document for the devices and services for your Samsung TV?
Another thing, according to the AVTransport:1 document here:
The third parameter of the SetAVTransportURI action should be set to NOT_IMPLEMENTED if it is not implement, not an empty string, maybe you could try that as well.
Also, i noticed you are passing 0 for the first parameter (
InstanceID ), however according to the same service document:
"This state variable is introduced to provide type information for the “InstanceID” input parameter presentin all AVTransport actions. It identifies the virtual instance of the AVTransport service to which the actionapplies. A valid InstanceID
is obtained from a ‘factory’ method in the ConnectionManager service: the PrepareForConnection action."
So you should be calling PrepareForConnection to get the instance ID, i realise the error you are getting dosnt sound like any of these issues, but sometimes the errors can be strange and wonderful when working with UPnP.
Another thing, are you sure your TV implements the UPnP properly, you would be surprised how many devices dont implement certain features properly.
Last of all, it COULD be a bug in the Microsoft UPnP implmenetation, what OS are you using, because I have found the UPnP implementation in Windows 7 to be MUCH better than windows xp. The framework itself does not handle anything to do with the SOAP request,
it lets the UPnP COM objects handle that, so you will need to do some packet sniffing to find the problem if you cant find it with trial and error.