Author: sumedha
Date: Wed Oct 29 22:20:32 2008
New Revision: 23084
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=23084

Log:
Adding Helloworld sample

Added:
   trunk/wsas/java/carbon/samples/HelloWorld/
   trunk/wsas/java/carbon/samples/HelloWorld/README
   trunk/wsas/java/carbon/samples/HelloWorld/build.xml
   trunk/wsas/java/carbon/samples/HelloWorld/conf/
   trunk/wsas/java/carbon/samples/HelloWorld/conf/services.xml
   trunk/wsas/java/carbon/samples/HelloWorld/pom.xml
   trunk/wsas/java/carbon/samples/HelloWorld/src/
   trunk/wsas/java/carbon/samples/HelloWorld/src/org/
   trunk/wsas/java/carbon/samples/HelloWorld/src/org/wso2/
   trunk/wsas/java/carbon/samples/HelloWorld/src/org/wso2/wsas/
   trunk/wsas/java/carbon/samples/HelloWorld/src/org/wso2/wsas/sample/
   
trunk/wsas/java/carbon/samples/HelloWorld/src/org/wso2/wsas/sample/helloworld/
   
trunk/wsas/java/carbon/samples/HelloWorld/src/org/wso2/wsas/sample/helloworld/HelloService.java

Added: trunk/wsas/java/carbon/samples/HelloWorld/README
URL: 
http://wso2.org/svn/browse/wso2/trunk/wsas/java/carbon/samples/HelloWorld/README?pathrev=23084
==============================================================================
--- (empty file)
+++ trunk/wsas/java/carbon/samples/HelloWorld/README    Wed Oct 29 22:20:32 2008
@@ -0,0 +1,7 @@
+WSO2 Web service Application Server
+===================================
+
+Sample : Helloworld
+===================
+
+Please refer sample-guide.html for detailed instructions on how to run the 
Helloworld sample.

Added: trunk/wsas/java/carbon/samples/HelloWorld/build.xml
URL: 
http://wso2.org/svn/browse/wso2/trunk/wsas/java/carbon/samples/HelloWorld/build.xml?pathrev=23084
==============================================================================
--- (empty file)
+++ trunk/wsas/java/carbon/samples/HelloWorld/build.xml Wed Oct 29 22:20:32 2008
@@ -0,0 +1,78 @@
+<!--
+  ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project default="build-all">
+
+    <property name="wso2wsas.home" value="../../"/>
+    <property name="lib" value="${wso2wsas.home}/lib"/>
+    <property name="repo.location" value="${wso2wsas.home}/repository"/>
+    <property name="temp.dir" value="temp"/>
+    <property name="classes" value="${temp.dir}/classes"/>
+    <property name="src" value="src"/>
+    <property name="services" value="services"/>
+
+    <path id="axis2.class.path">
+        <pathelement path="${java.class.path}"/>
+        <fileset dir="${wso2wsas.home}">
+            <include name="lib/*.jar"/>
+        </fileset>
+    </path>
+
+    <target name="init" depends="clean">
+        <mkdir dir="${temp.dir}"/>
+        <mkdir dir="${classes}"/>
+        <mkdir dir="${services}"/>
+    </target>
+
+    <target name="clean">
+        <delete dir="${temp.dir}"/>
+    </target>
+
+    <target name="compile-all" depends="init">
+        <javac debug="on" destdir="${classes}">
+            <src path="${src}"/>
+            <classpath refid="axis2.class.path"/>
+        </javac>
+    </target>
+
+    <target name="build-service" depends="compile-all">
+        <property name="aar.dir" value="${temp.dir}/HelloWorld"/>
+        <mkdir dir="${aar.dir}"/>
+
+        <mkdir dir="${aar.dir}/META-INF"/>
+        <copy file="conf/services.xml" 
tofile="${aar.dir}/META-INF/services.xml"/>
+        <copy toDir="${aar.dir}">
+            <fileset dir="${classes}">
+                <include name="**/*.class"/>
+            </fileset>
+        </copy>
+
+        <jar destfile="${services}/HelloWorld.aar">
+            <fileset dir="${aar.dir}"/>
+        </jar>
+    </target>
+
+
+    <target name="build-all"
+            depends="build-service">
+        <echo message="Copying the created aar files in to the repository"/>
+        <copy toDir="${repo.location}/services">
+            <fileset dir="${services}">
+                <include name="**/*.aar"/>
+            </fileset>
+        </copy>
+    </target>
+</project>

Added: trunk/wsas/java/carbon/samples/HelloWorld/conf/services.xml
URL: 
http://wso2.org/svn/browse/wso2/trunk/wsas/java/carbon/samples/HelloWorld/conf/services.xml?pathrev=23084
==============================================================================
--- (empty file)
+++ trunk/wsas/java/carbon/samples/HelloWorld/conf/services.xml Wed Oct 29 
22:20:32 2008
@@ -0,0 +1,25 @@
+<!--
+  ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<serviceGroup>
+    <service name="HelloService" targetNamespace="http://www.wso2.org/types";>
+        <schema schemaNamespace="http://www.wso2.org/types"; 
elementFormDefaultQualified="false"/>
+        <parameter
+                locked="true"
+                
name="ServiceClass">org.wso2.wsas.sample.helloworld.HelloService</parameter>
+        <!--All public methods of the service class are exposed by default-->
+    </service>
+</serviceGroup>

Added: trunk/wsas/java/carbon/samples/HelloWorld/pom.xml
URL: 
http://wso2.org/svn/browse/wso2/trunk/wsas/java/carbon/samples/HelloWorld/pom.xml?pathrev=23084
==============================================================================
--- (empty file)
+++ trunk/wsas/java/carbon/samples/HelloWorld/pom.xml   Wed Oct 29 22:20:32 2008
@@ -0,0 +1,139 @@
+<!--
+  ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
+    <parent>
+        <groupId>org.wso2.wsas</groupId>
+        <artifactId>wso2wsas-samples</artifactId>
+        <version>SNAPSHOT</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>wso2wsas-samples-helloworld</artifactId>
+    <packaging>jar</packaging>
+    <name>Sample/HelloWorld</name>
+    <description>This is Hello World sample</description>
+
+    <build>
+        <sourceDirectory>src</sourceDirectory>
+        <testSourceDirectory>test</testSourceDirectory>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.4</source>
+                    <target>1.4</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <enableRulesSummary>false</enableRulesSummary>
+                </configuration>
+            </plugin>
+            <!--<plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-clover-plugin</artifactId>
+                <configuration>
+                    <licenseLocation>${clover.license.file}</licenseLocation>
+                    <targetPercentage>60%</targetPercentage>
+                    <generateHtml>true</generateHtml>
+                    <generatePdf>false</generatePdf>
+                    <generateXml>false</generateXml>
+                    <excludes>
+                        <exclude>**/*TestSuite.java</exclude>
+                        <exclude>**/*Test.java</exclude>
+                    </excludes>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>aggregate</goal>
+                            <goal>instrument</goal>
+                            <goal>clover</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>-->
+        </plugins>
+    </build>
+
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-report-plugin</artifactId>
+                <configuration>
+                    
<outputDirectory>../../../target/site/wso2wsas-samples/${artifactId}
+                    </outputDirectory>
+                    
<reportsDirectory>target/surefire-reports</reportsDirectory>
+                    <outputName>${artifactId}-test-report</outputName>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jxr-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-site-plugin</artifactId>
+                <configuration>
+                    
<outputDirectory>../../../target/site/wso2wsas-samples/${artifactId}
+                    </outputDirectory>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>findbugs-maven-plugin</artifactId>
+                <version>1.1.1</version>
+                <configuration>
+                    <!--<xmlOutput>true|false</xmlOutput>
+                    <xmlOutputDirectory>
+                    directory location of xml findbugs report
+                    </xmlOutputDirectory>
+                    <threshold>Normal</threshold>
+                    <effort>Default</effort>
+                    <excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
+                    <includeFilterFile>findbugs-include.xml</includeFilterFile>
+                    <visitors>FindDeadLocalStores,UnreadFields</visitors>
+                    
<omitVisitors>FindDeadLocalStores,UnreadFields</omitVisitors>
+                    <onlyAnalyze>org.codehaus.mojo.findbugs.*</onlyAnalyze>
+                    
<pluginList>/libs/fb-contrib/fb-contrib-2.8.0.jar</pluginList>
+                    <debug>true|false</debug>
+                    <relaxed>true|false</relaxed>-->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+            </plugin>
+            <!--<plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-clover-plugin</artifactId>
+            </plugin>-->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-pmd-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </reporting>
+</project>

Added: 
trunk/wsas/java/carbon/samples/HelloWorld/src/org/wso2/wsas/sample/helloworld/HelloService.java
URL: 
http://wso2.org/svn/browse/wso2/trunk/wsas/java/carbon/samples/HelloWorld/src/org/wso2/wsas/sample/helloworld/HelloService.java?pathrev=23084
==============================================================================
--- (empty file)
+++ 
trunk/wsas/java/carbon/samples/HelloWorld/src/org/wso2/wsas/sample/helloworld/HelloService.java
     Wed Oct 29 22:20:32 2008
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.wso2.wsas.sample.helloworld;
+
+/**
+ * Helloworld service implementation
+ */
+public class HelloService {
+  public String greet(String name){
+     if(name != null){
+        return "Hello World, "+name+" !!!";
+     }else{
+        return "Hello World !!!";
+     }
+  }
+}

_______________________________________________
Wsas-java-dev mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev

Reply via email to