You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ve...@apache.org on 2009/06/11 20:51:36 UTC
svn commit: r783873 - in
/webservices/axis2/trunk/java/modules/samples/java_first_jaxws: README
pom.xml
Author: veithen
Date: Thu Jun 11 18:51:36 2009
New Revision: 783873
URL: http://svn.apache.org/viewvc?rev=783873&view=rev
Log:
java_first_jaxws sample:
* Changed package type to war -> required for Cargo plugin.
* Added an execution of the maven-jar-plugin so that both the JAR and the WAR are built during the package phase.
* Added cargo-maven2-plugin so that the sample can be run using an embedded servlet container (mvn cargo:start).
* Updated the README file to reflect these changes.
Modified:
webservices/axis2/trunk/java/modules/samples/java_first_jaxws/README
webservices/axis2/trunk/java/modules/samples/java_first_jaxws/pom.xml
Modified: webservices/axis2/trunk/java/modules/samples/java_first_jaxws/README
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/java_first_jaxws/README?rev=783873&r1=783872&r2=783873&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/java_first_jaxws/README (original)
+++ webservices/axis2/trunk/java/modules/samples/java_first_jaxws/README Thu Jun 11 18:51:36 2009
@@ -1,15 +1,23 @@
This example shows how to use Axis2 in a servlet container. You must
have Maven 2.x installed to build this example. To build type:
-$ mvn install war:war
+$ mvn package
-To run the sample using a Servlet Engine:
+To run the sample using a Servlet Engine there are two options.
-Please install a servlet engine say tomcat. Rename the resultant war as your_web_app.war and drop it into webapps directory under tomcat.
+The first is to install a servlet engine say tomcat. Rename the resultant war as your_web_app.war and drop it into webapps directory under tomcat.
The WSDL file for the service should be viewable at:
http://yourhost:port/your_web_app/services/HelloWorld.HelloWorldImplPort?wsdl
+Since the Maven project is configured for the Cargo plugin, it is also possible to launch an embedded servlet container (Jetty in this case) using the following command:
+
+$ mvn cargo:start
+
+In this case the WSDL file is viewable at:
+
+http://localhost:8080/java_first_jaxws-1.1/services/HelloWorld.HelloWorldImplPort?wsdl
+
To run the sample under axis2server:
Please copy the java_first_jaxws jar into <AXIS2_HOME>/repository/servicejars (Please create the directory if it does not exist). Then start the axis2 server.
Modified: webservices/axis2/trunk/java/modules/samples/java_first_jaxws/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/java_first_jaxws/pom.xml?rev=783873&r1=783872&r2=783873&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/java_first_jaxws/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/samples/java_first_jaxws/pom.xml Thu Jun 11 18:51:36 2009
@@ -25,6 +25,7 @@
<artifactId>java_first_jaxws</artifactId>
<name>JAXWS - Starting from Java Example</name>
<version>1.1</version>
+ <packaging>war</packaging>
<inceptionYear>2004</inceptionYear>
<dependencies>
@@ -215,6 +216,26 @@
<warSourceDirectory>${basedir}/src/webapp</warSourceDirectory>
</configuration>
</plugin>
+ <plugin>
+ <!-- Also build the JAR during the package phase. The JAR is required
+ when deploying on axis2server. -->
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <phase>package</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <!-- This allows to run the sample on an embedded servlet container
+ using the following command: mvn cargo:start -->
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>1.0</version>
+ </plugin>
</plugins>
<sourceDirectory>src/main</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>