I posted this message on Dec. 14, and never got a reply. Has someone looked at the problem?
Thanks, Mike On Sun, Dec 14, 2008 at 6:25 PM, Micheal Hewett <m...@hewettresearch.com>wrote: > Hi, > > I have a test program that runs fine when I use the RMI > method for adding documents in KIM, but generates an > exception when calling addDocument via the KIM web > service interface. I have included code snippets and > the error below. > > The error is something about bad types during SOAP > serialization: (long -> int). This may be referring to the > return type from addDocument - or may not. The error > is inside KIM so I can't tell. > > My code creates a KIMDocument from a string of text, > calls {SemanticAnnotation}.execute to perform entity > identification (which works) and then calls > {DocumentRepository}.addDocument. > The error is generated during addDocument. > > I am using the following XML and SOAP libraries, which I > believe are the recommended ones: > > activation-1.1.jar > axis-1.4.jar > axis-jaxrpc-1.4.jar > axis-wsdl4j-1.5.1.jar > commons-discovery-0.2.jar > commons-logging-1.0.4.jar > commons-logging-api-1.1.jar > freemarker-2.3.8.jar > kim-2.3-RC1.jar* > kim-api.jar* > kim-ws.jar > mail.jar > ognl-2.6.11.jar > saaj-api-1.2.jar > xwork-2.0.5.jar > > --------------------------------------------------------------- > ERROR: > > AxisFault > faultCode: { > http://schemas.xmlsoap.org/soap/envelope/}Server.userException<http://schemas.xmlsoap.org/soap/envelope/%7DServer.userException> > faultSubcode: > faultString: org.xml.sax.SAXException: Bad types (long -> int) > faultActor: > faultNode: > faultDetail: > > {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException<http://xml.apache.org/axis/%7DstackTrace:org.xml.sax.SAXException>: > Bad types (long -> int) > at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:286) > at > org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035) > at > org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165) > at > org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) > at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236) > at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) > at org.apache.axis.client.Call.invoke(Call.java:2467) > at org.apache.axis.client.Call.invoke(Call.java:2366) > at org.apache.axis.client.Call.invoke(Call.java:1812) > at > com.ontotext.kim.ws.documentrepository.DocumentRepositoryAPI_BindingStub.addDocument(DocumentRepositoryAPI_BindingStub.java:349) > at > com.hewettresearch.web.carmel1.action.SemanticAnalysisAction.analyzeText(SemanticAnalysisAction.java:166) > at > com.hewettresearch.web.carmel1.action.SemanticAnalysisAction.main(SemanticAnalysisAction.java:367) > > ------------------------------------------------------------------- > CODE: > > public long analyzeText(String textContent) throws RemoteException > { > DocumentRepositoryAPI_BindingStub wsDocRepository = > getKIMDocumentRepositoryWebService(); > SemanticAnnotationAPI_BindingStub wsAnnotate = > getKIMSemanticAnnotationWebService(); > > com.ontotext.kim.ws.corpora.DocumentConstants dConst = > wsDocRepository.getConstants(); > > com.ontotext.kim.ws.corpora.KIMDocument newDocument = null; > newDocument = new com.ontotext.kim.ws.corpora.KIMDocument(); > newDocument.setContent(textContent); > > com.ontotext.kim.ws.corpora.Feature[] docFeatures = new > com.ontotext.kim.ws.corpora.Feature[3]; > docFeatures[0] = new > com.ontotext.kim.ws.corpora.Feature(dConst.getDOCUMENT_FEATURE_DATE(), > "20081213"); // (new Date()).toString()); // "20070301"); > docFeatures[1] = new > com.ontotext.kim.ws.corpora.Feature(dConst.getDOCUMENT_FEATURE_TITLE(), > getDocumentTitle()); //"Peter Pan Airlines"); > docFeatures[2] = new > com.ontotext.kim.ws.corpora.Feature(dConst.getDOCUMENT_FEATURE_URL(), > getDocumentURL()); > newDocument.setFeatures(docFeatures); > > // Annotate the document before adding it. > newDocument = wsAnnotate.execute(newDocument, 0, "<NULL>"); > KIMAnnotation[] annotations = newDocument.getAnnotations(); > f_message1 = getKIMAnnotationsAsString(annotations); > > return wsDocRepository.addDocument(newDocument, true); * // <-- > error is thrown here* > } > > > Thanks for your help. > ------------------------------- > Micheal Hewett, PhD > CEO, Hewett Research > m...@hewettresearch.com > Palo Alto, CA > ------------------------------ >
_______________________________________________ Kim-discussion mailing list Kim-discussion@ontotext.com http://ontotext.com/mailman/listinfo/kim-discussion