Android上xmlrpc的使用

By admin, 8 四月, 2016

Java Example:http://drupal.org/node/632844

会抛出错误:05-28 10:49:08.370: D/BabyLearningGallery(845): java.lang.Exception: cannot connect to http://wa.eguidedog.net/hgneng/xmlrpc-test: Unable to create XML parser: org.xml.sax.SAXNotRecognizedException: http://xml.org/sax/features/external-parameter-entities

 

原因是Android内部Java实现问题:

http://code.google.com/p/android/issues/detail?id=9493

 

解决方案是重新编译apache-xmlrpc,把相关调用去掉。参考:http://code.google.com/p/android/issues/detail?id=9493#c23

 

但是apache-xmlrpc很难编译,可能需要学习使用http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html

 

也可以试试其它库:

http://code.google.com/p/android-xmlrpc/

http://code.google.com/p/android-json-rpc/

评论

Restricted HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。
验证码
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
请输入"Drupal10"

最新评论