Hello Minh Hoang,

You can look at the KIM documentation provided at Ontotext's site in  
ManageDocumentsExamples.html .

The code you pasted worked for me. Please check the package of the KIMDocument 
object, returned by the createDocument invocation and the KIMDocument you have 
imported (you are trying to cast it to) . My guess is they are different.

Hope this helps.
Philip Alexiev
Software Engineer, KIM team


On 13 Apr 2012, at 9:47 AM, Minh Hoang wrote:

> hi all,
> 
> i want to create KIMDocument from an URl (example : 
> file:///C:/KIM/corpus/Wayne_Rooney.htm), but in webservice API seem have no 
> function name as createDocument() ???
> 
> i has try KIM JAVA RMI API but i got some error : INFO: 
> java.lang.ClassCastException: $Proxy185 cannot be cast to 
> SemanticAnnotationAPI.KIMDocument
> 
> my RMI code example:
> 
>                 KIMService service1 = null;
>                 DocumentRepositoryAPI repository = null;
>                 CorporaAPI corpora = null;
> 
>                 service1 = GetService.from("localhost", 1099);
>                 repository = service1.getDocumentRepositoryAPI();
>                 corpora = service1.getCorporaAPI();
> 
>                 URL url = new 
> URL("http://en.wikipedia.org/wiki/Wayne_Rooney";);
>                 KIMDocument kdocFromUrl = (KIMDocument) 
> corpora.createDocument(url, "UTF-8");//erro this line
> 
> help me please :(
> 
> thank you!
> _______________________________________________
> Kim-discussion mailing list
> Kim-discussion@ontotext.com
> http://ontomail.semdata.org/cgi-bin/mailman/listinfo/kim-discussion

_______________________________________________
Kim-discussion mailing list
Kim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/kim-discussion

Reply via email to