ahkenho / sukiyoshi

Automatically exported from code.google.com/p/sukiyoshi
0 stars 0 forks source link

Unknown method json response from CreateVideo call #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I instantiate a BrightcoveConfig object and then a BCAPI instance from that.
2. Open a filestream to a file and read all bytes out of the file and close the 
stream.
3. Create a BCVideo instance with only the required fields filled in, 
shortdescription and name. 
4. I call bcapi.CreateVideo using the BCVideo instance, Path.GetFileName(file), 
fileBytes, BCEncodeType.MP4).

What is the expected output? What do you see instead?
There's a short pause as the library creates the required JSON and sends it to 
Brightcove and then a SerializationException exception is thrown in 
BrightcoveSDK.JSON.Converter at ln 23 - obj = (T)serializer.ReadObject(ms); 
Exception message is "Expecting element 'root' from namespace "..Encountered 
'None' with name ", namespace". The string parameter json is set to - {"error": 
"UNKNOWN_METHOD","code":301}

What version of the product are you using? On what operating system?
I'm using the latest version of sukiyoshi that I pulled directly from svn, 
current build number is 95. The project that I created is a Console application 
built until .NET 4.0 on a Windows 7 Professional machine running Visual Studio 
2010 Ultimate (10.0.40219.1). 

Please provide any additional information below.
The exact method I'm using is attached.
A simplified version of the app.config file I'm using is also attached.

Original issue reported on code.google.com by tjames...@hotmail.com on 20 Jul 2011 at 3:08

Attachments:

GoogleCodeExporter commented 9 years ago
Hi, using your code I was able to upload a video of my own to my own account. 
What you're doing looks correct so there may be something else causing the 
issue. I'm not sure if there are different levels of accounts that don't allow 
you to upload but that might be the case. The account I have is a developer 
account which is pretty free but I know I did have to request brightcove for 
specific account status to test sharing features. If the error is unknown 
method I'd quick shoot an email to a brightcove rep and make sure that you can 
upload through the API with your account type. 

Original comment by stiles.m...@gmail.com on 1 Sep 2011 at 2:01

GoogleCodeExporter commented 9 years ago
Hey - I apologize I didn't answer my own question but after running loops with 
Brightcove support (which told me everything was fine) I found out that the 
problems lies with my app.config file. My WriteURL is incorrect, here are the 
correct values:

<ReadURL value="http://api.brightcove.com/services/library" />
<WriteURL value="http://api.brightcove.com/services/library" />

I had my WriteURL set to the same address as the ReadURL which causes the 
cryptic exception. 

Original comment by tjames...@hotmail.com on 1 Sep 2011 at 2:22