2008-11-11, 20:04
Hi,
I'm trying to communicate with a Sneaky Ds using AppleScript (on Mac OS X), which supports making SOAP rpc calls. My problem is that as soon as I am sending parameters _to_ the Ds (IN paramaters) I get a very unhelpful "UPnPError" and I can't figure out where I am going wrong.
Here's what I do:
1. Start Script Editor, enter this script (replace the IP with whatever IP your Ds device has, I gleaned my from the Linn Config app) making sure this amounts to 3 lines:
tell application "http://192.168.0.40:55178/Ds/Media/control"
return call soap {method name:"PlaylistSequence", method namespace uri:"urn:linn-co-uk:service:Media:1", SOAPAction:"urn:linn-co-uk:service:Media:1#PlaylistSequence"}
end tell
2. Run the script and it will respond with the sequence number (in my case "10"). Great. So I can send actions to the Ds and it responds, but in this case there were no IN parameters.
3. Enter this next script, making sure you swap the IP and sequence number (the "10" after aSeq
from step 2:
tell application "http://192.168.0.40:55178/Ds/Media/control"
return call soap {method name:"PlaylistTrackCount", method namespace uri:"urn:linn-co-uk:service:Media:1", parameters:{aSeq:"10"}, SOAPAction:"urn:linn-co-uk:service:Media:1#PlaylistTrackCount"}
end tell
4. Running this script results in "control got an error: UPnPError".
I was thinking the problem might be that the "method namespace" is wrong. I looked through the docs for the Media service on Linn's site and I also checked the service XML (which I got from the Ds itself) but the namespace is not mentioned anywhere. From what I can understand, the UPnP specs (which are just not very easy to read) says that the namespace should be the urn for the service, which is what I entered above.
Has anybody got any other idea what the problem may be? I doubt it has anything to do with AppleScript -- all it does is to http POST a SOAP request to the IP specified.
Thanks,
Björn
I'm trying to communicate with a Sneaky Ds using AppleScript (on Mac OS X), which supports making SOAP rpc calls. My problem is that as soon as I am sending parameters _to_ the Ds (IN paramaters) I get a very unhelpful "UPnPError" and I can't figure out where I am going wrong.
Here's what I do:
1. Start Script Editor, enter this script (replace the IP with whatever IP your Ds device has, I gleaned my from the Linn Config app) making sure this amounts to 3 lines:
tell application "http://192.168.0.40:55178/Ds/Media/control"
return call soap {method name:"PlaylistSequence", method namespace uri:"urn:linn-co-uk:service:Media:1", SOAPAction:"urn:linn-co-uk:service:Media:1#PlaylistSequence"}
end tell
2. Run the script and it will respond with the sequence number (in my case "10"). Great. So I can send actions to the Ds and it responds, but in this case there were no IN parameters.
3. Enter this next script, making sure you swap the IP and sequence number (the "10" after aSeq
from step 2:tell application "http://192.168.0.40:55178/Ds/Media/control"
return call soap {method name:"PlaylistTrackCount", method namespace uri:"urn:linn-co-uk:service:Media:1", parameters:{aSeq:"10"}, SOAPAction:"urn:linn-co-uk:service:Media:1#PlaylistTrackCount"}
end tell
4. Running this script results in "control got an error: UPnPError".
I was thinking the problem might be that the "method namespace" is wrong. I looked through the docs for the Media service on Linn's site and I also checked the service XML (which I got from the Ds itself) but the namespace is not mentioned anywhere. From what I can understand, the UPnP specs (which are just not very easy to read) says that the namespace should be the urn for the service, which is what I entered above.
Has anybody got any other idea what the problem may be? I doubt it has anything to do with AppleScript -- all it does is to http POST a SOAP request to the IP specified.
Thanks,
Björn
laylistTrackCount xmlns:m="urn:linn-co-uk:service:Media:1">