locked
problem with metaWeblog.newPost RRS feed

  • Question

  • always get a "Invalid Blog Content Parameter" error  when using metaWeblog.newPost.

    I tried the example xml in msdn library, It's not working too.
    but with the same xml , drupal works normally.


    here is my test xml and response:

    <?xml version='1.0'?><methodCall><methodName>metaWeblog.newPost</methodName>
    <params>
    <param><value><string>MyBlog</string></value></param>
    <param><value><string>#####</string></value></param>
    <param><value><string>*****</string></value></param>
    <param>
    <struct>
    <member><name>description</name><value><string><![CDATA[&lt;img src=&quot;http://www.dilbert.com/comics/dilbert/archive/images/dilbert20122186070320.gif&quot; border=&quot;0&quot; /&gt;]]></string></value></member>
    <member><name>title</name><value><string>Comic for 20 Mar 2007</string></value></member>
    <member><name>dateCreated</name><value><dateTime.iso8601>20070320T00:01:00</dateTime.iso8601></value></member>
    </struct>
    </param>
    <param><value><boolean>1</boolean></value></param>
    </params></methodCall>

    response: 200 OK
    <?xml version="1.0"?><methodResponse>
    <fault><value><struct><member><name>faultCode</name><value><int>2041</int></value></member>
    <member><name>faultString</name><value><string>Invalid Blog Content Parameter</string></value></member></struct></value></fault></methodResponse>


    AI have another question about metaWeblog.getRecentPosts, when I use a large number in "numberOfPosts" parameter, an error will return.
    Is there any way to get all posts from a blog?
    Sunday, April 29, 2007 3:14 PM

Answers

  • There should be a <value> tag around <struct> tag, but in msdn document, the <value> tag is missing, which caused the error.

    It's a small bug,

    Sunday, April 29, 2007 3:20 PM