INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MCWS Documentation Page Working Strangely  (Read 2130 times)

willrbaar

  • Junior Woodchuck
  • **
  • Posts: 53
MCWS Documentation Page Working Strangely
« on: December 18, 2015, 06:07:23 pm »

I've started looking into using the MCWS Web Services and need help fixing a problem I have encountered.  I hooked up to the MCWS Documentation page for the first time, and the page operated strangely.  I'm using MC 21.0.27 and I'm trying to access the documentation from the same computer that MC21 is installed.  Some of the links operated correctly, in that when I clicked on the 'Click Here' Info link, I got back the expected information (Alive, Pause, Stop,...).  On many other 'Click Here' Info Links I would start the first album in the Player Library, and not get the information (Play> File Name, Play Advanced, Files>Search, Playlist...).  On other 'Click Here' Info Links I would get back "This Web Page Could Not Be Displayed", with a HTTP 500 Internal Server Error ( Playlist>files, connect, File>Get File...).  I turned off the firewall and that didn't do anything.  I put in an authentication code, and that didn't do anything.  I was never asked for an access code, and I was wondering if that is the problem.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: MCWS Documentation Page Working Strangely
« Reply #1 on: December 18, 2015, 06:36:12 pm »

A few answers...

I turned off the firewall and that didn't do anything.  I put in an authentication code, and that didn't do anything.  I was never asked for an access code, and I was wondering if that is the problem.

When accessing MCWS on the local host, authentication is not required, and the windows firewall won't block those attempts. The links used in the self-documenting web pages all point at localhost, so no authentication is required. A very over-active third-party firewall or security application could block functionality though, and you would probably be best served by setting it to "trust" MC and its processes through whatever means the application provides.

Also, in regards to the Access Code: This is not a security feature. The access code is simply a mechanism provided by JRiver that allows users to lookup and connect to their servers without needing to understand (very well) how IP addresses work and to deal with dynamic IPs changing.  All it does is:
1. When MC runs, it registers the server's current IP addresses (public and internal, as needed) with JRiver's servers as belonging to that particular Access Key.
2. When a client tries to connect to the server, it can use the access key, which will then ask JRiver's servers where it last saw this particular server. After which, the client connects directly via IP address.

Once you're connected to the server (and seeing the documentation means you are connected), it isn't needed. You already have the address.

On many other 'Click Here' Info Links I would start the first album in the Player Library, and not get the information (Play> File Name, Play Advanced, Files>Search, Playlist...).  On other 'Click Here' Info Links I would get back "This Web Page Could Not Be Displayed", with a HTTP 500 Internal Server Error ( Playlist>files, connect, File>Get File...).

The examples given in the documentation aren't intended to be used directly (by clicking on the links). It is showing you how to craft the URL that you use to get the information back you need, or perform the operation you need. So, as an example, the link example for Link Zones is:
http://localhost:10630/MCWS/v1/Playback/LinkZones?Zone1=-1&ZoneType1=ID&Zone2=-1&ZoneType2=ID

This will link the currently active Zone (ID -1) to the zone with ID 2. But, if you don't have a zone called ID 2, then it'll fail. They're designed to be looked at, generally, not directly used.

Most of the Playlist manipulation tool examples are pointed at the current playlist, but some (the more dangerous ones, typically) don't have any Playlist ID included, and are likely to fail.

I don't know that I've seen any 500 errors, though. So you should perhaps explain exactly what link you clicked on and what
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

willrbaar

  • Junior Woodchuck
  • **
  • Posts: 53
Re: MCWS Documentation Page Working Strangely
« Reply #2 on: December 19, 2015, 09:01:16 am »

Quote
[/The examples given in the documentation aren't intended to be used directly (by clicking on the links). It is showing you how to craft the URL that you use to get the information back you need, or perform the operation you need. So, as an example, the link example for ...

Thanks for the response.  I don't think your above understood what I was saying, or I'm not understanding you.  On the MCWS document page, they have the following (or similar) after each command section (there must be at least 50 command sections):
 
Examples:
 Click here

When I click on the 'Click here'; I get one of three types of responses from the browser: 1) the first song on MC21's player list is started (which I don't believe is an intended response); 2) The browser tells me the Web site is not available (which I don't believe is an intended response); or 3) or I get back something, for example, like this for clicking on the 'Authenticate' command,

<?xml version="1.0" encoding="UTF-8" standalone="true"?>

-<Response Status="OK">

<Item Name="Token">TO06JlFN</Item>

</Response>

I believe this is an intended response.  

So, I am not getting the examples for about 2/3 of the examples when I click on them.  So, these examples would be very beneficial in putting together code.  Can you help?

Logged
Pages: [1]   Go Up