On Thu, May 7, 2009 at 12:12 AM, lookman sanni <[email protected]> wrote: > > The full Abdera parser uses apache http client which is already natively > supported on Android. This induces a conflict in the imported packages, and > i ended up with a null pointer exception when initiating an Abdera Client on > Android. >
Just a thought, wow about for now, we try to parse the atom as xml ? this could at least make you progress and get something working. > I tried then to import Abdera core sources to my workspace, and convert it > to an android application so that it'll include directly the native apache > httpclient, but that reveals that android's javax.xml is very classless > (missing the javax.xml.namespace.QNAME and may be some other classes). > I had a patch for that, but haven' t played with it for couple weeks and might need update. > I finally tried out something more generic: Initialize an httpClient, > perform an httppost of the xml section below using the > org.apache.http.client.methods package. >> >> "<entry xmlns='http://www.w3.org/2005/Atom'>" + >> "<title>item</title>" + >> "<content type='text/xml'>" + >> "<Item xmlns='http://services/'>" + >> "<name xmlns=''>" + item.getName()+ "</name>" + >> "<price xmlns=''>" +item.getPrice()+"</price>" + >> "</Item></content></entry>" > > httpResponse return Internal Server error, while the binding atom section at > the server side fire a null pointer exception. Can this be due to the xml > content > schema (atom supposed) i'm posting? > > Take a look at function addToCart() from [1], it should give you the proper atom payload to send when adding a new item to shoppingCart. [1] http://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/samples/store/src/main/resources/uiservices/store.html -- Luciano Resende Apache Tuscany, Apache PhotArk http://people.apache.org/~lresende http://lresende.blogspot.com/
