Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 41251 invoked from network); 11 Sep 2006 10:10:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Sep 2006 10:10:24 -0000 Received: (qmail 88866 invoked by uid 500); 11 Sep 2006 10:10:21 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 88646 invoked by uid 500); 11 Sep 2006 10:10:19 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Delivered-To: moderator for java-dev@lucene.apache.org Received: (qmail 20404 invoked by uid 99); 10 Sep 2006 15:56:30 -0000 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of thegallier@gmail.com designates 66.249.82.228 as permitted sender) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=e0j/JIxATCMMwCFAwCCO1fg2umscpW05QdOCvKclCmhDW8cE6WMXu/1SWpw9Uev2ZGP5vAStKnMpye4RNeW883/V6ouOPNGL7NoNe+6M1N26taIROwTjHnxgXltFpz+rU1WQbrzEGZx6bo+eTUDYnGGFhuh9lzAm9J2l9Xf2Wzs= Message-ID: <12bc875c0609100856i5dd69738le53aa84e0f74ff7e@mail.gmail.com> Date: Sun, 10 Sep 2006 11:56:08 -0400 From: "Peter Decrem" To: java-dev@lucene.apache.org Subject: gdata-server newbie installation/code question MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_224971_7039699.1157903768478" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_224971_7039699.1157903768478 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I was able to create the war gdata-server file with simon's documentation. The documentation now states I should create user accounts. Does the section below (authenticate an existing account) also need to be included (in the section Create/update/delete an account) ? Is the yourAuthenticationstring the same as authToken in the code directly below this? Should I assume that GoogleLogin really means gdata-server login ? Thanks ___ Authenticate an existing account Requiered jars: - gdata-client.jar ____ /* * The protocol can either be http or https, depends on your server configuration. * The name of the application is just a meta data field an can be ommited. */ GoogleService service = new GoogleService("feedId","yourapplicationname", "http", "localdomain:port/gdata-server"); /* * ServiceType should be configured in the gdata-config.xml * Username and password for the admin account are the default values * and should be changed */ String authToken = service.getAuthToken("administrator","password", null,null,"servicetype","yourapplicationname"); ____ Create/update/delete an account ____ String accountAdminEndpoint = "http://www.yourdomain.com/gdata-server/admin/account"; /* * XML Account format to send in the http request body */ String account = "" + "" + "administrator" + "yourpassword" + "15" + "" + "your name" + "admin@apache.org" + "http://www.apache.org" + "" + ""; RequestEntity feedReqeustEnt = new StringRequestEntity(account); /* * Put method to update the account */ PutMethod httpMethod = new PutMethod(accountAdminEndpoint); /* * you need to authenticate before adding a new feed. Authentication * will return an authentication token. */ httpMethod.addRequestHeader(new Header("Authorization", "GoogleLogin auth=yourAuthenticationstring")); httpMethod.setRequestEntity(feedReqeustEnt); ------=_Part_224971_7039699.1157903768478--