I have added references to the axis2.war/WEB-INF/lib folder (which contains the jar files that include org.apache.axis2.client.Stub) as well as copy the Services.aar file (and changed it's name to Services.jar) and put it in the lib folder for portlet application.

I originally had the jar that contains org.tempuri.Services1Stub (which is actually the Services1.aar file but I changed the name to be Services1.jar) inside myPortlet.war/WEB-INF/lib, but that caused different problems (please see my original post for the packaging and the errors in the log). But thanks for the pointers.

First, I suggest you start with a simple servlet instead of portlet to get your WS consumer working.

Second, an archive containing classes has to be called something.jar - not .aar or anything else - these are java packaging basics. This .jar if deployed as part of a .war must be located in WEB-INF/lib and nowhere else.

Third, you need your org.tempuri.Services1Stub on your classpath otherwise you will get ClassNotFoundException, and your app won't work.

Fourth, NoClassDefFoundError means that while loading one class, another class that is a dependency of the first class could not be found. I've seen many situations when error reporting was misleading at this point - not really spelling out the real class that was missing. You're likely missing some axis2 dependency.

Put the following in your servlet / portlet:

Class.forName("org.apache.axis2.client.Stub");

Class.forName("org.tempuri.Service1Stub");

Make sure both of these classes are in some jar inside your myPortlet.war/WEB-INF/lib

If you get an exception it may contain a new lead on any missing dependency class.