Showing posts with label AIR tutorial. Show all posts
Showing posts with label AIR tutorial. Show all posts

Thursday, November 04, 2010

AIR for Android Tutorial (Part 2)

In the first AIR for Android tutorial, we showed just how to get started.  This tutorial is a complete video along with the source code.  This blog post includes the necessary instructions for building your first application and then adding a transform gesture.  With many smartphones using touch screens, the desired behavior is to allow an application to scale upwards but never scale below a certain minimum size.  This tutorial and the accompanying source code or Flash Builder 4.1 project explain how to accomplish this task.

Untitled from Technoracle on Vimeo.


Source Code: (download)

Tuesday, November 10, 2009

How to deploy Axis2.war to JBoss 5

In order to use LiveCycle Data Services 3, I decided to upgrade to JBoss 5. When I attempted to add in the axis2.war file to the {JBoss_Home}/server/default/deploy directory, I got a whack of errors when I started up the server. The main complaint was that the server barfed up the “Failed to create a new SAX parser” and several subsequent errors. The issue is that there are older versions of certain jars within the axis2.war file that won’t work and cause a java.lang.ClassCastException. In particular, the org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration

So how do you solve it? It is not too hard but a bit tricky. First, open up the axis2.war file. On Mac OS X, you can do this by using StuffIt.app. Just navigate in finder to the directory containing axis2.war, control-click, select “Open with…”, and then choose ~/Applications/StuffIt.app. This will expand the WAR file in the same directory.

Within the directory, there are two files you have to get rid of. I first tried to delete xml-apis-1.3.04.jar and xercesImpl-2.8.1.jar thinking that should work. This is shown below.



It actually did but lead to another problem (later). To get all the files back into a war, you have to do two things. The first is to use the command "jar -cvf ". Since I wanted to rename the output to axis2.war, I navigated to the directory holding the META-INF, WEB-INF, etc. files and rant the command "jar -cvf axis2.war *". This made the war file, which is essentially a *.jar file.



After this, on a Unix-based system, you have to change the permissions to ensure the file is usable by the app server. Use the chmod 775 command for that as shown below.


Figuring I had this problem licked, I started up the appserver. It started fine, however when I went to navigate to the http://localhost:8080/axis2/ URL, I got another error. This time is was a mismatch in impedance between the JSP servlet jars. The error comes out as "The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory". The problem is that the build of axis2 I downloaded had an older version that did not have the same method. Once again, to rectify this, open up the axis2.war file and remove another file called "servlet-api-2.3.jar". Repackage the war file and chmod it so that it is executable by the app server.


JBoss 5 should start up perfectly and you should now see the happy axis page when you navigate to http://localhost:8080/axis2/ as shown below. Problem Solved!!


Tuesday, August 04, 2009

Video Tutorial: Working with SOAP in Flex/AIR

This video shows how to connect to a simple SOAP based web service and display the results on some visual components. It is easy to follow along. You can download the server from http://www.web2open.org/courses.html.


Wednesday, July 22, 2009

Tutorial on Flex 3 Charting

ADC presents has just posted another one of the videos on how to make a chart using a multi-dimensional array[] in AS3. The data provider is as follows:


[Bindable]
private var medalsAC:ArrayCollection = new
ArrayCollection([
{Country: "Germany", Beer:12, Hockey: 2, Fun: 99},
{Country: "Canada", Beer:12, Hockey: 28, Fun: 99},
{Country: "England", Beer:49, Hockey: 12, Fun: 10}
]);


In this tutorial you will learn how to get this to render into a bar chart that looks like this:



Here is the video:




The link is http://tv.adobe.com/#vi+f1472v1124

Friday, May 08, 2009

Video: How to build chromeless AIR apps in 5 minutes (update)

I had previously posted a technical article on this topic however it is out of date due to changes to the Adobe AIR application descriptor file. This video is an updated tutorial on this topic. You can download the complete project files from http://www.web2open.org/codesamples/AIR-ApplePear.zip.