XML-RPC sends back strange characters in addition to XML
Posted: Mon Feb 19, 2007 3:01 pm
Hi,
I'm trying to use the metaWeblog.newPost RPC call, which works, but the response that comes back includes invalid characters and also error messages that make my XML parser fail on the other end. Any guess what's going wrong there?
Here is the conversation. I send:
and I receive:
Observe the "2dc" string in the response -- that one shouldn't be there, and I have no idea where it comes from...
any clues?
Thanks,
Ulli[/code]
I'm trying to use the metaWeblog.newPost RPC call, which works, but the response that comes back includes invalid characters and also error messages that make my XML parser fail on the other end. Any guess what's going wrong there?
Here is the conversation. I send:
Code: Select all
POST /serendipity_xmlrpc.php HTTP/1.1
Content-Type: text/xml
Content-Length: 662
User-Agent: Java/1.5.0_07
Host: blog.myhost.tld
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
<?xml version="1.0" encoding="ISO-8859-1"?><methodCall><methodName>metaWeblog.newPost</methodName>
<params>
<param><value><string>1</string></value></param>
<param><value><string>myusername</string></value></param>
<param><value><string>mypassword</string></value></param>
<param><value><struct>
<member><name>dateCreated</name><value><dateTime.iso8601>20070219T14:49:00</dateTime.iso8601></value></member><member><name>description</name><value><string>Super! es klappt</string></value></member>
<member><name>title</name><value><string>Test Post</string></value></member></struct></value></param>
<param><value><boolean>1</boolean></value></param></params></methodCall>
Code: Select all
HTTP/1.1 200 OK
Date: Mon, 19 Feb 2007 13:43:03 GMT
Server: Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-18
X-Powered-By: PHP/4.3.10-18
Set-Cookie: PHPSESSID=a5008e33bbbd3bf69ae406ca4ed25220; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
X-Serendipity-InterfaceLangSource: Content-Negotiation
X-Serendipity-InterfaceLang: de
Set-Cookie: serendipity[old_session]=a5008e33bbbd3bf69ae406ca4ed25220; expires=Wed, 21 Mar 2007 13:43:04 GMT; path=/; domain=blog.kortenkamps.net
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/xml
2dc
<br />
<b>Warning</b>: Cannot modify header information - headers
already sent in <b>/var/www/serendipity/plugins/serendipity_event_xmlrpc/PEAR/XML/RPC/Server.php</b> on
line <b>399</b><br />
<br />
<b>Warning</b>: Cannot modify header information - headers
already sent in <b>/var/www/serendipity/plugins/serendipity_event_xmlrpc/PEAR/XML/RPC/Server.php</b> on line <b>399</b><br />
<?xml version="1.0" encoding="ISO-8859-1"?>
<methodResponse>
<params>
<param>
<value><string>45</string></value>
</param>
</params>
</methodResponse><br />
<b>Warning</b>: Cannot modify header information - headers
already sent in <b>/var/www/serendipity/plugins/serendipity_event_xmlrpc/serendipity_event_xmlrpc.php</b> on
line <b>60</b><br />
0
any clues?
Thanks,
Ulli[/code]