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 di...@apache.org on 2008/04/04 23:34:45 UTC

svn commit: r644942 - in /webservices/axis2/trunk/java/modules/samples/jaxws-version: ./ resources/ resources/META-INF/ src/ src/sample/ src/sample/jaxws/

Author: dims
Date: Fri Apr  4 14:34:43 2008
New Revision: 644942

URL: http://svn.apache.org/viewvc?rev=644942&view=rev
Log:
add a JAXWS version sample that can be shipped by default just like the base Version service

Added:
    webservices/axis2/trunk/java/modules/samples/jaxws-version/
    webservices/axis2/trunk/java/modules/samples/jaxws-version/README.txt
    webservices/axis2/trunk/java/modules/samples/jaxws-version/build.xml
    webservices/axis2/trunk/java/modules/samples/jaxws-version/pom.xml
    webservices/axis2/trunk/java/modules/samples/jaxws-version/resources/
    webservices/axis2/trunk/java/modules/samples/jaxws-version/resources/META-INF/
    webservices/axis2/trunk/java/modules/samples/jaxws-version/resources/META-INF/version.wsdl
    webservices/axis2/trunk/java/modules/samples/jaxws-version/resources/META-INF/version.xsd
    webservices/axis2/trunk/java/modules/samples/jaxws-version/src/
    webservices/axis2/trunk/java/modules/samples/jaxws-version/src/sample/
    webservices/axis2/trunk/java/modules/samples/jaxws-version/src/sample/jaxws/
    webservices/axis2/trunk/java/modules/samples/jaxws-version/src/sample/jaxws/Version.java

Added: webservices/axis2/trunk/java/modules/samples/jaxws-version/README.txt
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-version/README.txt?rev=644942&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-version/README.txt (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-version/README.txt Fri Apr  4 14:34:43 2008
@@ -0,0 +1,28 @@
+Sample: JAXWS Version
+===============
+
+Introduction
+============
+
+A simple JAXWS service that returns a text which contains the version number and the built 
+date of the Axis2 Distribution used.
+
+In other words, this is a simple JAXWS/JSR 181 service used by many to test whether the distribution they got is setup 
+and working properly. It contains a single method that simply returns version and build 
+date of the Axis2 distribution used.
+
+
+Pre-Requisites
+==============
+
+Apache Ant 1.6.2 or later
+
+Running the Sample
+==================
+
+Type $ant from Axis2_HOME/samples/version
+
+
+Help
+====
+Please contact axis-user list (axis-user@ws.apache.org) if you have any trouble running the sample.
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/samples/jaxws-version/build.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-version/build.xml?rev=644942&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-version/build.xml (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-version/build.xml Fri Apr  4 14:34:43 2008
@@ -0,0 +1,63 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you 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 name="version" basedir="." default="generate.service">
+	
+	<property name="dest.dir" value="build" />
+	
+	<property name="dest.dir.classes" value="${dest.dir}/classes" />
+	
+	<property name="axis2.home" value="../../" />
+	
+	<property name="repository.path" value="${axis2.home}/repository/servicejars" />
+	
+	<path id="build.class.path">
+		<fileset dir="${axis2.home}/lib">
+			<include name="*.jar" />
+		</fileset>
+	</path>
+	
+	<target name="clean">
+		<delete dir="${dest.dir}" />
+	</target>
+	
+	<target name="prepare">
+		
+		<mkdir dir="${dest.dir}" />
+		
+		<mkdir dir="${dest.dir.classes}" />
+
+		<copy todir="${dest.dir.classes}">
+            <fileset dir="resources"/>
+        </copy>
+	</target>
+	
+	<target name="generate.service" depends="clean,prepare">
+		
+		<javac srcdir="src" destdir="${dest.dir.classes}" includes="sample/jaxws/**">
+			<classpath refid="build.class.path" />
+		</javac>
+		
+		<jar basedir="${dest.dir.classes}" destfile="${dest.dir}/version.jar" />
+		
+		<copy file="${dest.dir}/version.jar" tofile="${repository.path}/version.jar" overwrite="true" />
+	
+	</target>
+	
+</project>

Added: webservices/axis2/trunk/java/modules/samples/jaxws-version/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-version/pom.xml?rev=644942&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-version/pom.xml (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-version/pom.xml Fri Apr  4 14:34:43 2008
@@ -0,0 +1,61 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you 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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.axis2</groupId>
+        <artifactId>axis2-parent</artifactId>
+        <version>SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
+    </parent>
+    <artifactId>version</artifactId>
+    <name>Apache Axis2 - JAXWS Version Service</name>
+    <build>
+        <sourceDirectory>src</sourceDirectory>
+        <resources>
+          <resource>
+            <directory>resources</directory>
+          </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-jws-api</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-kernel</artifactId>
+            <version>${version}</version>
+        </dependency>
+    </dependencies>
+</project>

Added: webservices/axis2/trunk/java/modules/samples/jaxws-version/resources/META-INF/version.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-version/resources/META-INF/version.wsdl?rev=644942&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-version/resources/META-INF/version.wsdl (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-version/resources/META-INF/version.wsdl Fri Apr  4 14:34:43 2008
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://jaxws.sample/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://jaxws.sample/" name="JAXWSVersion">
+	<types>
+		<xsd:schema>
+			<xsd:import namespace="http://jaxws.sample/" schemaLocation="version.xsd"/>
+		</xsd:schema>
+	</types>
+	<message name="getVersionResponse">
+		<part name="parameters" element="tns:getVersionResponse">
+    </part>
+	</message>
+	<message name="Exception">
+		<part name="fault" element="tns:Exception">
+    </part>
+	</message>
+	<message name="getVersion">
+		<part name="parameters" element="tns:getVersion">
+    </part>
+	</message>
+	<portType name="Version">
+		<operation name="getVersion">
+			<input message="tns:getVersion">
+    </input>
+			<output message="tns:getVersionResponse">
+    </output>
+			<fault name="Exception" message="tns:Exception">
+    </fault>
+		</operation>
+	</portType>
+	<binding name="VersionPortBinding" type="tns:Version">
+		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+		<operation name="getVersion">
+			<soap:operation/>
+			<input>
+				<soap:body use="literal"/>
+			</input>
+			<output>
+				<soap:body use="literal"/>
+			</output>
+			<fault name="Exception">
+				<soap:fault name="Exception" use="literal"/>
+			</fault>
+		</operation>
+	</binding>
+	<service name="JAXWSVersion">
+		<port name="VersionPort" binding="tns:VersionPortBinding">
+			<soap:address location="http://192.168.2.102:8080/axis2/services/JAXWSVersion.VersionPort"/>
+		</port>
+	</service>
+</definitions>

Added: webservices/axis2/trunk/java/modules/samples/jaxws-version/resources/META-INF/version.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-version/resources/META-INF/version.xsd?rev=644942&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-version/resources/META-INF/version.xsd (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-version/resources/META-INF/version.xsd Fri Apr  4 14:34:43 2008
@@ -0,0 +1,18 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://jaxws.sample/" targetNamespace="http://jaxws.sample/" elementFormDefault="unqualified" attributeFormDefault="unqualified">
+	<xs:element name="Exception" type="tns:Exception"/>
+	<xs:element name="getVersion" type="tns:getVersion"/>
+	<xs:element name="getVersionResponse" type="tns:getVersionResponse"/>
+	<xs:complexType name="getVersion">
+		<xs:sequence/>
+	</xs:complexType>
+	<xs:complexType name="getVersionResponse">
+		<xs:sequence>
+			<xs:element name="return" type="xs:string" minOccurs="0"/>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:complexType name="Exception">
+		<xs:sequence>
+			<xs:element name="message" type="xs:string" minOccurs="0"/>
+		</xs:sequence>
+	</xs:complexType>
+</xs:schema>

Added: webservices/axis2/trunk/java/modules/samples/jaxws-version/src/sample/jaxws/Version.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/samples/jaxws-version/src/sample/jaxws/Version.java?rev=644942&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/jaxws-version/src/sample/jaxws/Version.java (added)
+++ webservices/axis2/trunk/java/modules/samples/jaxws-version/src/sample/jaxws/Version.java Fri Apr  4 14:34:43 2008
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 sample.jaxws;
+
+import javax.jws.WebService;
+
+@WebService(serviceName = "JAXWSVersion",
+            portName="VersionPort",
+            wsdlLocation="META-INF/version.wsdl")
+public class Version {
+    public String getVersion() throws Exception {
+        return "Hello I am Axis2 version service ," +
+                " My version is " + org.apache.axis2.Version.getVersionText();
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org