On Fri, May 8, 2009 at 12:18 AM, lookman sanni <[email protected]> wrote:
> > > 2009/5/7 Oscar Castañeda <[email protected]> > >> Hi Lookman, >> >> Congrats, you're doing really good! I'm happy you decided to follow my >> recommendation of jumping into the community bonding period with regular >> updates on your progress and posting of any questions you have along the >> way. I have followed all your threads until now and have a few suggestions >> which you will find below. >> >> On Thu, May 7, 2009 at 6:14 PM, Luciano Resende <[email protected]>wrote: >> >>> 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. >> >> >> While it is a good idea to simplify and try to get things running, also >> consider what might need to be done to get SCA running on Android. This is >> also part of your project, namely the part about Android SCA Runtime, or >> host-android, but of course you know that already. One idea is to try this >> part of the project in parallel to other efforts. >> >> >>> >>> > 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 also found out an open source implementation of the QNAME class, i'm > going to add to my project, and see what it gives. > Glad to see you again oscar!! I'm going to have a look on how felix got > running on android, and start digesting the host-android part. In my last > mail , i told you that i'm focusing this week on how to consume the cart and > total services. Tha's what i've been then working on mainly. > >> >>> > >>> >>> I had a patch for that, but haven' t played with it for couple weeks >>> and might need update. >>> >> >> If I'm not mistaken, Luciano's reference here is about the host-android >> part of the project. You might want to look into the thread: "Android >> progress update" on markmail. The last I tested on that can be found in [1]. >> Afterwards I found out about a similar effort of getting an Apache project >> running on Android...This year at ApacheCon Europe there was a presentation >> by Marcel Offermans and Christian van Spaandonk, about getting Apache Felix >> running on Android. Here's an excerpt of what they said about getting Felix >> to run on Android: >> >> - "When Android was first released, the first problem was getting >> Felix to run ... even without any bundles, just the plain framework. The >> framework is pretty portable by itself, so that wasn't too hard to do. The >> hard part started when we wanted to actually dynamically deploy bundles. >> That didn't work at first, because these bundles only contain OSGi Java >> code, and we somehow had to dex'ify these bundles and then try and load >> these dex'ified classes. And there wasn't and still isn't an API to >> officially do that." >> >> >> - "...but, well, specifically I remember on a Friday evening was a >> little after 10 o'clock - found a way of doing that. So when we did that >> we >> immediately started to write a blog about that and it spread like >> wildfire, >> and in no time everybody was running this out. And actually we figured out >> the fix was pretty easy, so we even embedded that as part of Felix. So >> if you download Felix right now, you can just deploy it on Android, >> and it will run." >> >> I believe the blog Marcel was talking about is found in [2]. Hopefully >> it'll be helpful to get SCA running on Android. We can also try to contact >> him on the Felix mailing list to get more help if needed. >> >> [1] http://www.mail-archive.com/[email protected]/msg05685.html >> [2] http://felix.apache.org/site/apache-felix-and-google-android.html >> > It may be crazy but i already tried the steps quoted in [2], for abdera-core before given up as classes and packages that are recquired already had a light version on android!! I guess, it'll end up by a rebuilt of android.jar, option i'd like to choose at last. > >> >> >>> > 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. >> >> > I'm using the same!! I guess, the problem may be about the way i'm posting > it (using a list of NameValuePair to hold the xml content and httpost. > setEntity(new UrlEncodedFormEntity(myList cf[a] > Well that was a quick thing, and i'll need to look deeper in it! > [a]: http://www.anddev.org/http_post_connection_in_sdk-10-t2970.html > > >>> >>> >>> >>> [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://people.apache.org/%7Elresende> >>> http://lresende.blogspot.com/ >>> >> >> >> >> -- >> best, >> -oscar >> >> Oscar Castañeda >> http://people.apache.org/~ocastaneda<http://people.apache.org/%7Eocastaneda> >> > > > > -- > Best Regards > > Lookman SANNI > http://blog.lookouster.org > MSBI Intern at Umanis Tours Services; > -- Best Regards Lookman SANNI http://blog.lookouster.org MSBI Intern at Umanis Tours Services;
