Author: sam.griffith(a)jboss.com
Date: 2007-01-05 05:26:27 -0500 (Fri, 05 Jan 2007)
New Revision: 1801
Added:
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/build.xml
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/classes/
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/log4j.xml
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/resources/
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/resources/wstools-config.xml
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/java/
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/java/org/
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/java/org/jboss/
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/java/org/jboss/samples/
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/java/org/jboss/samples/helloworld/
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/java/org/jboss/samples/helloworld/EndpointInterface.java
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/java/org/jboss/samples/helloworld/HelloWorldWS.java
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/metadata/
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/metadata/web.xml
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/build.xml
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/log4j.xml
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/resources/
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/resources/wstools-config.xml
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/java/
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/java/org/
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/java/org/jboss/
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/java/org/jboss/samples/
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/java/org/jboss/samples/helloworld/
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/java/org/jboss/samples/helloworld/HelloWorldWS.java
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/java/org/jboss/samples/helloworld/HelloWorldWSEndpointInterface.java
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/metadata/
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/metadata/web.xml
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/src/java/org/jboss/samples/helloworld/HelloWorldWSEndpointInterface.java
Modified:
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/build.xml
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/resources/wstools-config.xml
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/src/java/org/jboss/samples/helloworld/HelloWorldWS.java
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/src/metadata/web.xml
Log:
Refactored to new JBossWS project layout for these files... More to come
Added: trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/build.xml
===================================================================
--- trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/build.xml 2007-01-05
10:00:42 UTC (rev 1800)
+++ trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/build.xml 2007-01-05
10:26:27 UTC (rev 1801)
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<!-- Build file for JSR 181 POJO Hello World Web Service Example using new WS Stack
-->
+<project name="JSR 181 POJO Hello World Web Service Buildfile"
default="main" basedir=".">
+<!-- Standard Properties -->
+ <property name="top.dir" value="${basedir}"/>
+ <property name="user.home.dir" value="/Users/sgriffith/"/>
+ <property name="server.config" value="default"/>
+ <property name="src.dir" value="${top.dir}/src"/>
+ <property name="build.classes" value="${top.dir}/classes"/>
+ <property name="java.dir" value="${top.dir}/src/java"/>
+ <property name="resources.dir" value="${top.dir}/resources"/>
+ <property name="jboss.dir"
value="${user.home.dir}/jboss-5.0.0.Beta2"/>
+ <property name="jboss.client" value="${jboss.dir}/client"/>
+ <property name="jboss.lib" value="${jboss.dir}/lib"/>
+ <property name="jboss.server"
value="${jboss.dir}/server/${server.config}"/>
+ <property name="jboss.server.lib"
value="${jboss.server}/lib"/>
+ <property name="jboss.server.deploy"
value="${jboss.server}/deploy"/>
+
+<!-- JDK Detection -->
+ <available classname="java.lang.Enum"
property="HAVE_JDK_1.5"/>
+
+<!-- Check for new WS jar file -->
+ <available file="${jboss.client}/jbossws-client.jar"
value="jbossws-client.jar" property="jbossws.client.jar"/>
+
+<!-- Mapper definitions -->
+<!-- <mapper id="deployedFileMapper" type="regexp"
from="*hello*.war"/> -->
+ <available property="jbossws.client.jar"
value="jbossws-client.jar"
file="${jboss.client}/jbossws-client.jar"/>
+
+<!-- Path Definitions -->
+ <path id="client.classpath">
+ <fileset dir="${jboss.client}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+ <path id="compile.classpath">
+ <path refid="client.classpath"/>
+ <pathelement location="${jboss.server.lib}/jboss.jar"/>
+ </path>
+
+<!-- Targets -->
+ <target name="generate-sources" depends=""
description="Generate the deployment resources and WSDL."
if="HAVE_JDK_1.5">
+<!-- Define a taskdef for the wstools ant task -->
+ <echo message="Inside generate-sources"/>
+ <taskdef name="wstools"
classname="org.jboss.ws.tools.ant.wstools">
+ <classpath refid="client.classpath"/>
+ <classpath path="${top.dir}/classes"/>
+ <classpath path="${top.dir}"/>
+ </taskdef>
+ <echo message="wstools about to run"/>
+ <wstools dest="${top.dir}/META-INF"
config="${resources.dir}/wstools-config.xml"/>
+ </target>
+
+ <target name="clean">
+ <echo message="In clean"/>
+ <delete file="${top.dir}/helloworldws.war"/>
+ <delete dir="${build.classes}"/>
+ <delete dir="${top.dir}/META-INF"/>
+ <mkdir dir="${build.classes}"/>
+ </target>
+<!--
+ Compile the java sources
+ -->
+<!--
+ Compile the java sources with jdk-1.5
+ -->
+ <target name="compile15" depends="" description="compile the
sources" if="HAVE_JDK_1.5">
+ <javac destdir="${build.classes}"
classpathref="compile.classpath" debug="on">
+ <src path="${java.dir}"/>
+ </javac>
+ </target>
+
+
+ <target name="main" depends="compile15, generate-sources"
if="jbossws.client.jar">
+ <echo message="In main"/>
+ <war warfile="helloworldws.war"
webxml="${src.dir}/metadata/web.xml">
+ <webinf dir="${src.dir}/metadata" />
+ <classes dir="${top.dir}/classes">
+ <include name="org/jboss/samples/HelloWorldWS.class"/>
+ </classes>
+ </war>
+ <antcall target="deploy"/>
+ </target>
+
+ <target name="deploy">
+ <echo message="In deploy"/>
+ <copy file="${top.dir}/helloworldws.war"
todir="${jboss.server.deploy}"/>
+ <delete file="${top.dir}/helloworldws.war"/>
+ </target>
+
+ <target name="undeploy">
+ <echo message="In undeploy"/>
+ <delete>
+ <fileset id="web_service_wars" dir="${jboss.server.deploy}"
includes="*hello*.war"/>
+ </delete>
+ </target>
+</project>
Added: trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/log4j.xml
===================================================================
--- trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/log4j.xml 2007-01-05
10:00:42 UTC (rev 1800)
+++ trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/log4j.xml 2007-01-05
10:26:27 UTC (rev 1801)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
+
+<appender name="CONSOLE"
class="org.apache.log4j.ConsoleAppender">
+<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+<param name="Target" value="System.out"/>
+<param name="Threshold" value="INFO"/>
+
+<layout class="org.apache.log4j.PatternLayout">
+<!-- The default pattern: Date Priority [Category] Message\n -->
+<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}]
%m%n"/>
+</layout>
+</appender>
+
+
+<root>
+<appender-ref ref="CONSOLE"/>
+</root>
+
+
+</log4j:configuration>
Added:
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/resources/wstools-config.xml
===================================================================
---
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/resources/wstools-config.xml 2007-01-05
10:00:42 UTC (rev 1800)
+++
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/resources/wstools-config.xml 2007-01-05
10:26:27 UTC (rev 1801)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ wstools -config wstools-config.xml
+-->
+<configuration
xmlns="http://www.jboss.org/jbossws-tools"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/jbossws-tools
http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+ <global>
+ <package-namespace package="org.jboss.samples.helloworld"
namespace="http://org.jboss.ws/samples/helloworld"/>
+ </global>
+ <java-wsdl>
+ <service name="HelloWorldWS"
endpoint="org.jboss.samples.helloworld.HelloWorldEndpointInterface"
style="rpc"/>
+ <namespaces target-namespace="http://org.jboss.ws/samples/helloworld"
type-namespace="http://org.jboss.ws/samples/helloworld/types"/>
+ </java-wsdl>
+</configuration>
Added:
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/java/org/jboss/samples/helloworld/EndpointInterface.java
===================================================================
---
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/java/org/jboss/samples/helloworld/EndpointInterface.java 2007-01-05
10:00:42 UTC (rev 1800)
+++
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/java/org/jboss/samples/helloworld/EndpointInterface.java 2007-01-05
10:26:27 UTC (rev 1801)
@@ -0,0 +1,9 @@
+package org.jboss.samples.helloworld;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public interface HelloWorldEndpointInterface extends Remote
+{
+ String sayHello(String toWhom) throws RemoteException;
+}
\ No newline at end of file
Added:
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/java/org/jboss/samples/helloworld/HelloWorldWS.java
===================================================================
---
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/java/org/jboss/samples/helloworld/HelloWorldWS.java 2007-01-05
10:00:42 UTC (rev 1800)
+++
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/java/org/jboss/samples/helloworld/HelloWorldWS.java 2007-01-05
10:26:27 UTC (rev 1801)
@@ -0,0 +1,15 @@
+package org.jboss.samples.helloworld;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService()
+public class HelloWorldWS
+{
+ @WebMethod
+ public String sayHello(String toWhom)
+ {
+ // System.out.println("I'm Hit! " + toWhom);
+ return "Hello " + toWhom + "!" + " The date and time is:
" + new java.util.Date();
+ }
+}
Added: trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/metadata/web.xml
===================================================================
---
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/metadata/web.xml 2007-01-05
10:00:42 UTC (rev 1800)
+++
trunk/jbossws-docs/online/tutorial-src/bu-jax-ws-hello-world/src/metadata/web.xml 2007-01-05
10:26:27 UTC (rev 1801)
@@ -0,0 +1,23 @@
+<?xml version="1.0" ?>
+
+<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+ <display-name>HelloWorldWS</display-name>
+ <servlet>
+ <display-name>HelloWorldWS</display-name>
+ <servlet-name>HelloWorldWS</servlet-name>
+ <servlet-class>org.jboss.samples.HelloWorldWS</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>HelloWorldWS</servlet-name>
+ <url-pattern>/hello</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+</web-app>
+
Modified: trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/build.xml
===================================================================
--- trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/build.xml 2007-01-05
10:00:42 UTC (rev 1800)
+++ trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/build.xml 2007-01-05
10:26:27 UTC (rev 1801)
@@ -5,12 +5,12 @@
<property name="top.dir" value="${basedir}"/>
<property name="user.home.dir" value="/Users/sgriffith/"/>
<property name="server.config" value="default"/>
- <property name="top.dir" value="."/>
<property name="src.dir" value="${top.dir}/src"/>
<property name="build.classes" value="${top.dir}/classes"/>
<property name="java.dir" value="${top.dir}/src/java"/>
<property name="resources.dir" value="${top.dir}/resources"/>
- <property name="jboss.dir"
value="${user.home.dir}/jboss-4.0.4.GA-ejb3"/>
+ <!-- <property name="jboss.dir"
value="${user.home.dir}/jboss-5.0.0.Beta2"/> -->
+ <property name="jboss.dir"
value="${user.home.dir}/jboss-4.0.5.GA"/>
<property name="jboss.client" value="${jboss.dir}/client"/>
<property name="jboss.lib" value="${jboss.dir}/lib"/>
<property name="jboss.server"
value="${jboss.dir}/server/${server.config}"/>
@@ -39,7 +39,7 @@
</path>
<!-- Targets -->
- <target name="generate-sources" depends=""
description="Generate the deployment resources."
if="HAVE_JDK_1.5">
+ <target name="generate-sources" depends=""
description="Generate the deployment resources and WSDL."
if="HAVE_JDK_1.5">
<!-- Define a taskdef for the wstools ant task -->
<echo message="Inside generate-sources"/>
<taskdef name="wstools"
classname="org.jboss.ws.tools.ant.wstools">
@@ -74,15 +74,15 @@
<target name="main" depends="compile15, generate-sources"
if="jbossws.client.jar">
<echo message="In main"/>
<war warfile="helloworldws.war"
webxml="${src.dir}/metadata/web.xml">
-<!-- <webinf dir="${src.dir}/metadata" />
- -->
+ <!-- <webinf dir="${src.dir}/metadata" /> -->
<classes dir="${top.dir}/classes">
- <include name="org/jboss/samples/HelloWorldWS.class"/>
+ <include name="**/*.class"/>
</classes>
</war>
- <antcall target="deploy"/>
+ <!-- <antcall target="deploy"/> -->
</target>
+<!--
<target name="deploy">
<echo message="In deploy"/>
<copy file="${top.dir}/helloworldws.war"
todir="${jboss.server.deploy}"/>
@@ -95,4 +95,5 @@
<fileset id="web_service_wars" dir="${jboss.server.deploy}"
includes="*hello*.war"/>
</delete>
</target>
+-->
</project>
Modified:
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/resources/wstools-config.xml
===================================================================
---
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/resources/wstools-config.xml 2007-01-05
10:00:42 UTC (rev 1800)
+++
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/resources/wstools-config.xml 2007-01-05
10:26:27 UTC (rev 1801)
@@ -7,7 +7,7 @@
<package-namespace package="org.jboss.samples.helloworld"
namespace="http://org.jboss.ws/samples/helloworld"/>
</global>
<java-wsdl>
- <service name="HelloWorldWS"
endpoint="org.jboss.samples.helloworld.EndpointInterface"
style="rpc"/>
+ <service name="HelloWorldWS"
endpoint="org.jboss.samples.helloworld.HelloWorldWSEndpointInterface"
style="rpc"/>
<namespaces target-namespace="http://org.jboss.ws/samples/helloworld"
type-namespace="http://org.jboss.ws/samples/helloworld/types"/>
</java-wsdl>
</configuration>
Modified:
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/src/java/org/jboss/samples/helloworld/HelloWorldWS.java
===================================================================
---
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/src/java/org/jboss/samples/helloworld/HelloWorldWS.java 2007-01-05
10:00:42 UTC (rev 1800)
+++
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/src/java/org/jboss/samples/helloworld/HelloWorldWS.java 2007-01-05
10:26:27 UTC (rev 1801)
@@ -3,11 +3,6 @@
import javax.jws.WebService;
import javax.jws.WebMethod;
-/* @WebService(name = "HelloWorld",
- targetNamespace="http://org.jboss.ws/helloworld",
- serviceName = "HelloWorldWS")
-*/
-
@WebService()
public class HelloWorldWS
{
Added:
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/src/java/org/jboss/samples/helloworld/HelloWorldWSEndpointInterface.java
===================================================================
---
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/src/java/org/jboss/samples/helloworld/HelloWorldWSEndpointInterface.java 2007-01-05
10:00:42 UTC (rev 1800)
+++
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/src/java/org/jboss/samples/helloworld/HelloWorldWSEndpointInterface.java 2007-01-05
10:26:27 UTC (rev 1801)
@@ -0,0 +1,9 @@
+package org.jboss.samples.helloworld;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public interface HelloWorldWSEndpointInterface extends Remote
+{
+ String sayHello(String toWhom) throws RemoteException;
+}
Modified: trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/src/metadata/web.xml
===================================================================
---
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/src/metadata/web.xml 2007-01-05
10:00:42 UTC (rev 1800)
+++
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world/src/metadata/web.xml 2007-01-05
10:26:27 UTC (rev 1801)
@@ -1,18 +1,16 @@
-<?xml version="1.0" ?>
-
-<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
- <servlet>
- <servlet-name>HelloWorldWS</servlet-name>
-
<servlet-class>org.jboss.samples.HelloWorldWS</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>HelloWorldWS</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
+<?xml version="1.0"?>
+<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
+ <display-name>HelloWorldWS</display-name>
+ <servlet>
+ <display-name>HelloWorldWS</display-name>
+ <servlet-name>HelloWorldWS</servlet-name>
+ <servlet-class>org.jboss.samples.helloworld.HelloWorldWS</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>HelloWorldWS</servlet-name>
+ <url-pattern>/HelloWorldWS</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
</web-app>
-
Added:
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/build.xml
===================================================================
---
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/build.xml 2007-01-05
10:00:42 UTC (rev 1800)
+++
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/build.xml 2007-01-05
10:26:27 UTC (rev 1801)
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<!-- Build file for JSR 181 POJO Hello World Web Service Example using new WS Stack
-->
+<project name="JSR 181 POJO Hello World Web Service Buildfile"
default="main" basedir=".">
+<!-- Standard Properties -->
+ <property name="top.dir" value="${basedir}"/>
+ <property name="user.home.dir" value="/Users/sgriffith/"/>
+ <property name="server.config" value="default"/>
+ <property name="src.dir" value="${top.dir}/src"/>
+ <property name="build.classes" value="${top.dir}/classes"/>
+ <property name="java.dir" value="${top.dir}/src/java"/>
+ <property name="resources.dir" value="${top.dir}/resources"/>
+ <property name="jboss.dir"
value="${user.home.dir}/jboss-5.0.0.Beta2"/>
+ <property name="jboss.client" value="${jboss.dir}/client"/>
+ <property name="jboss.lib" value="${jboss.dir}/lib"/>
+ <property name="jboss.server"
value="${jboss.dir}/server/${server.config}"/>
+ <property name="jboss.server.lib"
value="${jboss.server}/lib"/>
+ <property name="jboss.server.deploy"
value="${jboss.server}/deploy"/>
+
+<!-- JDK Detection -->
+ <available classname="java.lang.Enum"
property="HAVE_JDK_1.5"/>
+
+<!-- Check for new WS jar file -->
+ <available file="${jboss.client}/jbossws-client.jar"
value="jbossws-client.jar" property="jbossws.client.jar"/>
+
+<!-- Mapper definitions -->
+<!-- <mapper id="deployedFileMapper" type="regexp"
from="*hello*.war"/> -->
+ <available property="jbossws.client.jar"
value="jbossws-client.jar"
file="${jboss.client}/jbossws-client.jar"/>
+
+<!-- Path Definitions -->
+ <path id="client.classpath">
+ <fileset dir="${jboss.client}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+ <path id="compile.classpath">
+ <path refid="client.classpath"/>
+ <pathelement location="${jboss.server.lib}/jboss.jar"/>
+ </path>
+
+<!-- Targets -->
+ <target name="generate-sources" depends=""
description="Generate the deployment resources and WSDL."
if="HAVE_JDK_1.5">
+<!-- Define a taskdef for the wstools ant task -->
+ <echo message="Inside generate-sources"/>
+ <taskdef name="wstools"
classname="org.jboss.ws.tools.ant.wstools">
+ <classpath refid="client.classpath"/>
+ <classpath path="${top.dir}/classes"/>
+ <classpath path="${top.dir}"/>
+ </taskdef>
+ <echo message="wstools about to run"/>
+ <wstools dest="${top.dir}/META-INF"
config="${resources.dir}/wstools-config.xml"/>
+ </target>
+
+ <target name="clean">
+ <echo message="In clean"/>
+ <delete file="${top.dir}/helloworldws.war"/>
+ <delete dir="${build.classes}"/>
+ <delete dir="${top.dir}/META-INF"/>
+ <mkdir dir="${build.classes}"/>
+ </target>
+<!--
+ Compile the java sources
+ -->
+<!--
+ Compile the java sources with jdk-1.5
+ -->
+ <target name="compile15" depends="" description="compile the
sources" if="HAVE_JDK_1.5">
+ <javac destdir="${build.classes}"
classpathref="compile.classpath" debug="on">
+ <src path="${java.dir}"/>
+ </javac>
+ </target>
+
+
+ <target name="main" depends="compile15, generate-sources"
if="jbossws.client.jar">
+ <echo message="In main"/>
+ <war warfile="helloworldws.war"
webxml="${src.dir}/metadata/web.xml">
+ <webinf dir="${src.dir}/metadata" />
+ <classes dir="${top.dir}/classes">
+ <include name="org/jboss/samples/HelloWorldWS.class"/>
+ </classes>
+ </war>
+ <antcall target="deploy"/>
+ </target>
+
+ <target name="deploy">
+ <echo message="In deploy"/>
+ <copy file="${top.dir}/helloworldws.war"
todir="${jboss.server.deploy}"/>
+ <delete file="${top.dir}/helloworldws.war"/>
+ </target>
+
+ <target name="undeploy">
+ <echo message="In undeploy"/>
+ <delete>
+ <fileset id="web_service_wars" dir="${jboss.server.deploy}"
includes="*hello*.war"/>
+ </delete>
+ </target>
+</project>
Added:
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/log4j.xml
===================================================================
---
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/log4j.xml 2007-01-05
10:00:42 UTC (rev 1800)
+++
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/log4j.xml 2007-01-05
10:26:27 UTC (rev 1801)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
+
+<appender name="CONSOLE"
class="org.apache.log4j.ConsoleAppender">
+<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+<param name="Target" value="System.out"/>
+<param name="Threshold" value="INFO"/>
+
+<layout class="org.apache.log4j.PatternLayout">
+<!-- The default pattern: Date Priority [Category] Message\n -->
+<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}]
%m%n"/>
+</layout>
+</appender>
+
+
+<root>
+<appender-ref ref="CONSOLE"/>
+</root>
+
+
+</log4j:configuration>
Added:
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/resources/wstools-config.xml
===================================================================
---
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/resources/wstools-config.xml 2007-01-05
10:00:42 UTC (rev 1800)
+++
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/resources/wstools-config.xml 2007-01-05
10:26:27 UTC (rev 1801)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ wstools -config wstools-config.xml
+-->
+<configuration
xmlns="http://www.jboss.org/jbossws-tools"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/jbossws-tools
http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
+ <global>
+ <package-namespace package="org.jboss.samples.helloworld"
namespace="http://org.jboss.ws/samples/helloworld"/>
+ </global>
+ <java-wsdl>
+ <service name="HelloWorldWS"
endpoint="org.jboss.samples.helloworld.HelloWorldWSEndpointInterface"
style="rpc"/>
+ <namespaces target-namespace="http://org.jboss.ws/samples/helloworld"
type-namespace="http://org.jboss.ws/samples/helloworld/types"/>
+ </java-wsdl>
+</configuration>
Added:
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/java/org/jboss/samples/helloworld/HelloWorldWS.java
===================================================================
---
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/java/org/jboss/samples/helloworld/HelloWorldWS.java 2007-01-05
10:00:42 UTC (rev 1800)
+++
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/java/org/jboss/samples/helloworld/HelloWorldWS.java 2007-01-05
10:26:27 UTC (rev 1801)
@@ -0,0 +1,15 @@
+package org.jboss.samples.helloworld;
+
+import javax.jws.WebService;
+import javax.jws.WebMethod;
+
+@WebService()
+public class HelloWorldWS
+{
+ @WebMethod
+ public String sayHello(String toWhom)
+ {
+ // System.out.println("I'm Hit! " + toWhom);
+ return "Hello " + toWhom + "!" + " The date and time is:
" + new java.util.Date();
+ }
+}
Added:
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/java/org/jboss/samples/helloworld/HelloWorldWSEndpointInterface.java
===================================================================
---
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/java/org/jboss/samples/helloworld/HelloWorldWSEndpointInterface.java 2007-01-05
10:00:42 UTC (rev 1800)
+++
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/java/org/jboss/samples/helloworld/HelloWorldWSEndpointInterface.java 2007-01-05
10:26:27 UTC (rev 1801)
@@ -0,0 +1,9 @@
+package org.jboss.samples.helloworld;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+public interface HelloWorldWSEndpointInterface extends Remote
+{
+ String sayHello(String toWhom) throws RemoteException;
+}
Added:
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/metadata/web.xml
===================================================================
---
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/metadata/web.xml 2007-01-05
10:00:42 UTC (rev 1800)
+++
trunk/jbossws-docs/online/tutorial-src/jax-ws-hello-world-with-endpoint-interface/src/metadata/web.xml 2007-01-05
10:26:27 UTC (rev 1801)
@@ -0,0 +1,23 @@
+<?xml version="1.0" ?>
+
+<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+ <display-name>HelloWorldWS</display-name>
+ <servlet>
+ <display-name>HelloWorldWS</display-name>
+ <servlet-name>HelloWorldWS</servlet-name>
+ <servlet-class>org.jboss.samples.HelloWorldWS</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>HelloWorldWS</servlet-name>
+ <url-pattern>/hello</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+</web-app>
+