Justin (rly) wrote in lj_clients,
Justin
rly
lj_clients

trapped in livejournal factory; send help

XML-RPC is pretty much the one thing I don't really know about XML and now here I am trying to use it to post to LJ with Coldfusion and it's not working.

<cfxml variable="LJxml"><methodCall>

<methodName>LJ.XMLRPC.postevent</methodName>

<params>
<param>
<value>
<struct>

<member><name>username</name>	<value><string>1justin_test</string></value></member>
<member><name>hpassword</name>	<value><string>lol no</string></value></member>

<member><name>subject</name>	<value><string>Test</string></value></member>
<member><name>event</name>	<value><string><![CDATA[This is a test post.]]></string></value></member>

<member><name>lineendings</name>	<value><string>pc</string></value></member>

<member><name>year</name>	<value><int>2002</int></value></member>
<member><name>mon</name>	<value><int>7</int></value></member>
<member><name>day</name>	<value><int>13</int></value></member>
<member><name>hour</name>	<value><int>20</int></value></member>
<member><name>min</name>	<value><int>35</int></value></member>

</struct>
</value>
</param>
</params>

</methodCall></cfxml>





<cfhttp 
  url = "http://www.livejournal.com/interface/xmlrpc"
  method = "POST"
>

<cfhttpparam 
  type = "XML"
  value = "#LJxml#"
>

</cfhttp>

Note that ColdFusion adds the <xml> tag by itself.

I ripped the XML straight from the documentation, and yet it says "failed during request deserialization: not well-formed (invalid token) at line 1, column 26, byte 26 at /usr/lib/perl5/XML/Parser.pm line 187" and that it's my own damned fault.

wtf

edit: FUCK IT NEVER MIND I'LL JUST USE flat INSTEAD BECAUSE IT WORKS

Subscribe
  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 6 comments