Axis2 war file contains a subset of Axis2 full distribution, just the Axis2 engine ready to deploy in a Servlet container. You do not need the full distribution for using the war file. The WAR file cannot be used standalone. You need a Servlet container.
Axis2 full distribution contains a standalone server which can be used for testing etc. which can be run from the bin scripts. This way you are not using a separate Tomcat distribution. When you run new AxisServer().deployService(SimplePojo.class.getName()); you are creating a new Axis2 server instance and deploying the class as a service. This is separate from the above scenarios. You are programmatically creating an Axis2 server. You don't need the above two servers running in that case. Add Axis2 lib directory jars to your classpath to compile and run your class. They are available inside the war file also. You can check out this guide. http://ws.apache.org/axis2/1_3/pojoguide.html. Upul On Fri, Mar 14, 2008 at 12:16 PM, learn_n_share < [EMAIL PROTECTED]> wrote: > > hi > i m new to axis. I ve downloaded .war axis2, pasted in my tomcat home > folder, and found that axis dir got generated automatically. > > 1) > while going through the axis installation tut, i felt as if it is > necassary > to have the binary distribution of the same as well. > --> am i correct? > > 2) > i have created the AXIS2_HOME variable to point to the directory of axis2 > binary distribution which i placed in "C:\axis2" and not to the one > contained in the "webapps" directory of "tomcat" as i thought that there > is > no "bin" named folder inside the latter directory. > --> is this correct? > > 3) have also created the following environment variables: > > path = %path%;c:\axis2\bin > > AXIS2_HOME = C:\axis2 > AXIS2_LIB = %AXIS2_HOME%\lib > AXIS2CLASSPATH = > %AXIS2_LIB%\axis2.jar;%AXIS2_LIB%\commons-discovery.jar > ;%AXIS2_LIB%\commons-logging-1.1.jar > ;%AXIS2_LIB%\jaxrpc.jar;%AXIS2_LIB%\saaj.jar;%AXIS2_LIB%\log4j-1.2.14.jar > ;%AXIS2_LIB%\xml-apis-1.3.03.jar;%AXIS2_LIB%\xercesImpl-2.8.1.jar > > i created a folder named pojo inside the "C:\Program Files\Apache Software > Foundation\Tomcat 6.0\webapps\axis2\WEB-INF" , i.e., the container dir for > tomcat webapps > inside pojo, there is a simple java file named "SimplePojo.java" as simple > as: > > "import org.apache.axis2.AxisFault; > import org.apache.axis2.engine.AxisServer; > > public class SimplePojo { > > public int addnumbers(int x, int y){ > return x+y; > } > > public static void main(String[] args)throws AxisFault { > new AxisServer().deployService(SimplePojo.class.getName()); > } > }" > > on compiling i get the error: > SimplePojo.java:1: package org.apache.axis2 does not exist > (amongst three related errors) > > --> what could be the possible solution? > > > -- > View this message in context: > http://www.nabble.com/newbie%3A-is-Axis-binary-also-required-with-.war-tp16045279p16045279.html > Sent from the Axis - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
