0
我在開發Android應用程序時遇到了一些問題。我有一個使用android-xmlrpc的客戶端(運行Android),它使用Apache XML-RPC調用服務器上的某些方法(標準Java應用程序)。一切運行良好,順利,只有一個例外。當我打電話,有一個長型參數的方法,服務器拋出該異常:Apache XML-RPC似乎無法解析由android-xmlrpc傳遞給它的長類型
21.12.2010 18:54:35 org.apache.xmlrpc.server.XmlRpcErrorLogger log
SEVERE: Failed to parse XML-RPC request: Unknown type: i8
org.apache.xmlrpc.XmlRpcException: Failed to parse XML-RPC request: Unknown type: i8
at org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:71)
at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
Caused by: org.xml.sax.SAXParseException: Unknown type: i8
at org.apache.xmlrpc.parser.RecursiveTypeParserImpl.startElement(RecursiveTypeParserImpl.java:122)
at org.apache.xmlrpc.parser.XmlRpcRequestParser.startElement(XmlRpcRequestParser.java:122)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
... 3 more
一切都應該是爲了,在Apache的側EnabledForExtensions標誌,如前所述here,設置這樣的:
serverConfig.setEnabledForExtensions(true);
我在做什麼錯?
你是什麼意思的C++服務器?還有你在Java中提供的代碼還是什麼?沒有足夠的上下文來理解你在代碼示例中做了什麼 – Joakim 2015-11-03 14:47:14