I am using redstone xmlrpc library to access my drupal based website with the Services module (http://drupal.org/handbook/modules/services). However, I got the "org.xml.sax.SAXParseException: Content is not allowed in prolog" error
After some searching, I found this: http://www.openrdf.org/forum/mvnforum/viewthread?thread=86
"Java doesn't handle BOMs on UTF-8 files properly, making the three header bytes appear as being part of the document. ..."
Is this the reason? Anyone can help? Thanks!
Hmm.. might very well be. The default encoding for the library is UTF-8 (as set in a properties file included in the library) so that part should be fine.
I will investigate further. Have you been able to verify that you're not receving an error from the service and that the response is actually XML-RPC (and not a redirect or something like that)?
I'll see if I can whip together a test case for the Drupal service.
Thanks for the reply. I tried with Python and it seems there's no problem.
url = "http://speakingx.com/services/xmlrpc"
drupal = xmlrpclib.ServerProxy(url)
res = drupal.system.connect()
node = drupal.node.load(res['sessid'],37,)
With Java, it fails at system.connect. You can use my site as shown in the above snippet to test Drupal service which may save you some time to set it up. Thanks!
Log in to post a comment.