我从here获得了Kaltura java源代码。我试图在eclipse中运行此代码但收到一些错误。主要问题是如何编译此代码以获得输出。错误如下所示。
本地生成的KS:[NTk1MmUyNTgxMmU0ODhiOWZhMDgzOTBhOGNlYTA4NThlMmU3OTMxZXw1NDMyMTs1NDMyMTsxMzk4MjI1NTEzOzI7Nzk1Mzt0ZXN0VXNlcjs =] 示例失败。 com.kaltura.client.KalturaApiException:无效的KS" NTk1MmUyNTgxMmU0ODhiOWZhMDgzOTBhOGNlYTA4NThlMmU3OTMxZXw1NDMyMTs1NDMyMTsxMzk4MjI1NTEzOzI7Nzk1Mzt0ZXN0VXNlcjs =",错误" -1,INVALID_STR" 在com.kaltura.client.KalturaClientBase.getExceptionOnAPIError(KalturaClientBase.java:617) 在com.kaltura.client.KalturaClientBase.throwExceptionOnAPIError(KalturaClientBase.java:621) 在com.kaltura.client.KalturaClientBase.doQueue(KalturaClientBase.java:274) 在com.kaltura.client.services.KalturaMediaService.list(KalturaMediaService.java:316) 在com.kaltura.client.services.KalturaMediaService.list(KalturaMediaService.java:305) 在com.kaltura.client.services.KalturaMediaService.list(KalturaMediaService.java:301) 在Kaltura.list(Kaltura.java:115) 在Kaltura.main(Kaltura.java:60)
答案 0 :(得分:1)
我猜是因为您将请求网址设置为http://www.kaltura.com/api_v3/index.php?service=media&action=list,这是在下面返回的XML。
<xml>
<result>
<error>
<objectType>KalturaAPIException</objectType>
<code>SERVICE_FORBIDDEN</code>
<message>The access to service [media->list] is forbidden</message>
<args>
<item>
<objectType>KalturaAPIExceptionArg</objectType>
<name>SERVICE</name>
<value>media->list</value>
</item>
</args>
</error>
</result>
<executionTime>0.021459817886353</executionTime>
</xml>
不是GZIP值。