Bad XMLRPC (?)
I am a Mac-User blogging with the software ecto ( ecto.kung-foo.tv ) via metaWeblog-API on blogger.de (antville-based). While testing the new version of ecto (Beta-Status), I got in touch with the programmer as I had difficulties connecting to blogger.de using the
In responce, that's what he wrote and I hope this is the right place to let you know:
---start---quote---
Yeah, I see what's wrong. Here's what your server is returning:
<?xml version="1.0" encoding="ISO-8859-1"?> <methodResponse> <params> <param> <value> <array> <data> <value><struct> <member> <name>url <value>/ </member> <member> <name>blogid <value>powerbook </member> <member> <name>blogName <value>powerbook _ blog </member> </struct></value> </data> </array> </value> </param> </params> </methodResponse>
It's bad xml for XMLRPC. It should be:
<?xml version="1.0" encoding="ISO-8859-1"?> <methodResponse> <params> <param> <value> <array> <data> <value><struct> <member> <name>url</name> <value><string>/</string></value> </member> <member> <name>blogid</name> <value><string>powerbook</string></value> </member> <member> <name>blogName</name> <value><string>powerbook _ blog</string></value> </member> </struct></value> </data> </array> </value> </param> </params> </methodResponse>
It would also be nicer if the encoding was set as: <?xml version="1.0" encoding="UTF-8"?>
ISO-8859-1 is out of date.
---end---quote---
powerbook
I downloaded Antclick 1.1, there are indeed some improvements on the MetaWeblog-Api (compared to the version that blogger.de runs).
But in both versions I run into problems with uploading images (other file are fine - except that I think that ascii-files like txt are uploaded as binary files).
While trying to upload an image with
Request with URL:jojo
http://10.1.33.125:8081
and data:
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>metaWeblog.newMediaObject
<params>
<param>
<value>
</param>
<param>
<value><string>powerbook</string></value>
</param>
<param>
<value><string>******</string></value>
</param>
<param>
<value><struct>
<member>
<name>bits</name>
<value>REMOVED</value>
</member>
<member>
<name>name</name>
<value><string>images/adressbuchgross.jpg</string></value>
</member>
<member>
<name>type</name>
<value><string>image/jpeg</string></value>
</member>
</struct></value>
</param>
</params>
</methodCall>
I get the following response:
<?xml version="1.0" encoding="ISO-8859-1"?>
<methodResponse><fault><value><struct><member><name>faultString<value>
helma.scripting.ScriptingException: Error while creating new Media Object: InternalError: Java class "helma.image.ImageGenerator" has no public instance field or method named "getInstance". (HelmaLib-1.0.zip/Global/Helma.Image.js#13)
</value></member><member><name>faultCode</name><value><int>0</int></value></member></struct></value></fault></methodResponse>
In the version, running on blogger.de I get a responce saying:
FESI.Exceptions.EcmaScriptException: Error creating image: Bad parameters or setup problem.
detected at line 16 of function 'saveImg' in file: 'image/objectFunctions.js'
called at line 44 of function 'evalImg' in file: 'imagemgr/objectFunctions.js'
called at line 270 of function 'newMediaObject' in file: 'api.zip/metaWeblog/metaWeblogAPI.js'
By the way, is there any better place, to tell you about these 'bugs'?
kinomu Verwaltung
By the way, is there any better place to tell you about these 'bugs'?
Yes, the Antville User Mailing List.
benko
I'm testing Ecto 2.0.b11 and have the same problems. I fixed the encoding to UTF-8 directly in Helma source code. I can't post images as well. And when I post anything I get incorrect TEXT_DAY in AV_TEXT - the created time somehow cannot be converted to YYYYMMDD.
I changed the catch block so that I get exact exception, but I have no idea what's wrong ... here it is:
Error while creating new Media Object: JavaException: java.lang.RuntimeException: Error loading imagejava.lang.RuntimeException: Error loading image
at helma.image.ImageGenerator$ImageLoader.getDimensions(ImageGenerator.java:242)
at helma.image.ImageGenerator.createImage(ImageGenerator.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:174)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:202)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1442)
at org.mozilla.javascript.gen.c201._c2(HelmaLib-1.0.zip/Global/Helma.Image.js:13)
at org.mozilla.javascript.gen.c201.call(HelmaLib-1.0.zip/Global/Helma.Image.js)
at org.mozilla.javascript.BaseFunction.construct(BaseFunction.java:255)
at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:1458)
at org.mozilla.javascript.gen.c90._c2(Image/objectFunctions.js:26)
at org.mozilla.javascript.gen.c90.call(Image/objectFunctions.js)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1442)
at org.mozilla.javascript.gen.c85._c1(ImageMgr/objectFunctions.js:52)
at org.mozilla.javascript.gen.c85.call(ImageMgr/objectFunctions.js)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1442)
at org.mozilla.javascript.gen.c235._c6(MetaWeblogApi/metaWeblogAPI.js:284)
at org.mozilla.javascript.gen.c235.call(MetaWeblogApi/metaWeblogAPI.js)
at helma.scripting.rhino.RhinoEngine.invoke(RhinoEngine.java:267)
at helma.framework.core.RequestEvaluator.run(RequestEvaluator.java:486)
at java.lang.Thread.run(Thread.java:534)