Return-Path: Delivered-To: apmail-roller-user-archive@www.apache.org Received: (qmail 72155 invoked from network); 28 Apr 2009 01:12:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Apr 2009 01:12:01 -0000 Received: (qmail 49532 invoked by uid 500); 28 Apr 2009 01:12:00 -0000 Delivered-To: apmail-roller-user-archive@roller.apache.org Received: (qmail 49481 invoked by uid 500); 28 Apr 2009 01:12:00 -0000 Mailing-List: contact user-help@roller.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@roller.apache.org Delivered-To: mailing list user@roller.apache.org Delivered-To: moderator for user@roller.apache.org Received: (qmail 15379 invoked by uid 99); 28 Apr 2009 00:26:54 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1240878383; bh=xoMys3D2Wo66beuxS6Sw8/nQ3xxzxkEJ1xTXG0Tk5K8=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=wKCgzJ4wfP2xnQ3rBmyHgc6MrNckmgcRMh3XHrvqM7ReoH/JxFOTNST3CF5V12ApgS/YNzXI8AiN8Dr5R1M86vEj2JL8J6AgnKSQVFm7GfgZxJDOWGLMefrfqyZZq15pex2hFANP/2OyM1I+i5/BWDGHD4DhUi5DpkNruRYMXVc= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=6i+Mx8N18iFto7isAcWekJLY/y0t6NxKfKlR7IgQTwbN4qiVf7U0CKxsXSBgeJlYFwuBDbaDO5QEfV9EcK6PmbNUXzIre8eNl0+KcQsholgL6ks2gSh6seSsRx/61CDIzwIMFcSkinok8SmKtI0KyPLVAQ7pjdd7Y/bKKT2foF4=; Message-ID: <968415.29588.qm@web56503.mail.re3.yahoo.com> X-YMail-OSG: 3H8ZY80VM1nTVQh_BJmEzyrLTvA9T1g2rubuEcW2IF_YZBfDl71NtBMkfNvUCTQNFuhDvYEo8MDAws8mStAjArrJdaA3B5EIFeELDIDtu3xVYOWiT581E5OCFAK2dV7WaJiNfX29Gz3Tm7s_AQvFkRzq8KbDKJCNVaBwBdDA2EdebEDlYWcMHJ4_c2vm00MrJxIbFV2S0nWjiM6oUfFMnfPy7yTYjS2R_llSVTWv4WxQBWjhDEQhpQMlVP8Q81TjZLtAxmeShf76xd7IqJOy5Gzu5oleUnK8r0ouHQ_s9PvLCnxre7S5ZvA- X-Mailer: YahooMailWebService/0.7.289.1 Date: Mon, 27 Apr 2009 17:26:23 -0700 (PDT) From: April Pu Reply-To: ypu01720@yahoo.com Subject: Re: Help on roller MetaWeblog API To: user@roller.apache.org, henning.brune@uni-bielefeld.de In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org With all the help, following is my code, wish it would be helpful to new ha= nds on Roller: public class rpcxml { =09public static void main(String [] args) =09{ =09=09try =09=09{ =09=09=09XmlRpcClientConfigImpl config =3D new XmlRpcClientConfigImpl(); config.setServerURL(new URL("http://.../roller/roller-services/= xmlrpc")); XmlRpcClient client =3D new XmlRpcClient(); client.setConfig(config); Hashtable h =3D new Hashtable(); h.put("description","
test String
"); h.put("title","test post from xml-rpc"); Object[] params =3D new Object[]{"b6", "elwin", "1", h, true}; String result =3D (String)client.execute("metaWeblog.newPost", = params); System.out.println(result);=20 =09=09} =09=09catch(Exception e) =09=09{ =09=09=09System.out.println(e.toString()); =09=09} =09} } --- On Sun, 4/26/09, Henning Brune wrote: > From: Henning Brune > Subject: Re: Help on roller MetaWeblog API > To: user@roller.apache.org, ypu01720@yahoo.com > Date: Sunday, April 26, 2009, 2:58 AM > Just take a look at Rome Propono: >=20 > http://wiki.java.net/bin/view/Javawsxml/RomePropono >=20 > I used this to migrate several thousands of messages from a > legacy > system to roller blog. Java code is quite simple, I used > something > like this: >=20 >=20 > String BLOG_URL =3D > "/roller-services/xmlrpc"; > String BLOG_USER =3D ""; > String BLOG_PWD =3D ""; > String BLOG_HANDLE =3D ""; >=20 > BlogConnection con =3D > BlogConnectionFactory.getBlogConnection( > =09=09=09=09"metaweblog", BLOG_URL, BLOG_USER, BLOG_PWD); >=20 > Blog blog =3D con.getBlog(BLOG_HANDLE); > if (blog =3D=3D null) > =09throw new Exception("blog not found"); >=20 > Blog.Collection entries =3D > blog.getCollection("entries"); >=20 > if (entries =3D=3D null) > =09throw new Exception("no entries found in blog"); >=20 > .... >=20 > -Henning >=20 > On Fri, Apr 24, 2009 at 7:41 AM, April Pu > wrote: > > > > Hi, > > > > I need to write code to test Metaweblog API. Does > someone has smaple java code? > > > > Thanks! > > > > April > > > > > > > > >=20 >=20 >=20 > --=20 > Dipl.-Inform. Henning Brune >=20 > http://ekvv.uni-bielefeld.de/pers_publ/publ/PersonDetail.jsp?personId=3D1= 0185 >=20 > Universit=E4t Bielefeld > Projekt BIS > Postfach 10 01 31 > D-33501 Bielefeld >=20 > Die neue Homepage des BIS Projektes: > http://www.uni-bielefeld.de/bis/=0A=0A=0A