ws-wsrf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject svn commit: r326719 - in /webservices/wsrf/trunk/src: examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/ java/org/apache/ws/addressing/ java/org/apache/ws/addressing/handler/ java/org/apache/ws/resource/handler/ java/org/apache/ws/...
Date Wed, 19 Oct 2005 21:48:51 GMT
Author: ips
Date: Wed Oct 19 14:48:42 2005
New Revision: 326719

URL: http://svn.apache.org/viewcvs?rev=326719&view=rev
Log:
various

Added:
    webservices/wsrf/trunk/src/java/org/apache/ws/addressing/handler/
    webservices/wsrf/trunk/src/java/org/apache/ws/addressing/handler/WSAddressingHandler.java
      - copied, changed from r326585, webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/addressing/WSAddressingHandler.java
    webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/config.xml
Removed:
    webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/addressing/
Modified:
    webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/Filesystem_wsrf-config.xml
    webservices/wsrf/trunk/src/java/org/apache/ws/addressing/AddressingUtils.java
    webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java
    webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/ResourceContextImpl.java
    webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/client.xml
    webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/deploy.xml
    webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/metadata.xml
    webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/singleton.xml
    webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/validate.xml
    webservices/wsrf/trunk/src/templates/wsrf-config.xml.vm

Modified: webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/Filesystem_wsrf-config.xml
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/Filesystem_wsrf-config.xml?rev=326719&r1=326718&r2=326719&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/Filesystem_wsrf-config.xml (original)
+++ webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/Filesystem_wsrf-config.xml Wed Oct 19 14:48:42 2005
@@ -6,7 +6,7 @@
 
 <beans>
 
-  <bean name="resource/filesystem" class="org.apache.ws.resource.example.filesystem.FilesystemHome" init-method="init">
+  <bean id="resource/filesystem" class="org.apache.ws.resource.example.filesystem.FilesystemHome" init-method="init">
     <property name="portComponentName"><value>filesystem</value></property>
     <property name="serviceClass"><value>org.apache.ws.resource.example.filesystem.FilesystemService</value></property>
     <property name="resourceClass"><value>org.apache.ws.resource.example.filesystem.FilesystemResource</value></property>

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/addressing/AddressingUtils.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/addressing/AddressingUtils.java?rev=326719&r1=326718&r2=326719&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/addressing/AddressingUtils.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/addressing/AddressingUtils.java Wed Oct 19 14:48:42 2005
@@ -44,7 +44,7 @@
      * @param soapHeader
      * @param headerElemName
      *
-     * @return
+     * @return the header element with the name that was specified
      */
     public static SOAPHeaderElement getHeaderElement( SOAPHeader soapHeader, QName headerElemName )
     {
@@ -75,7 +75,7 @@
      *
      * @param soapHeader a SOAP header
      *
-     * @return
+     * @return the WS-Addressing namespace URI for the specified SOAP header
      */
     public static String getAddressingNamespaceURI( SOAPHeader soapHeader )
     {

Copied: webservices/wsrf/trunk/src/java/org/apache/ws/addressing/handler/WSAddressingHandler.java (from r326585, webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/addressing/WSAddressingHandler.java)
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/addressing/handler/WSAddressingHandler.java?p2=webservices/wsrf/trunk/src/java/org/apache/ws/addressing/handler/WSAddressingHandler.java&p1=webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/addressing/WSAddressingHandler.java&r1=326585&r2=326719&rev=326719&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/addressing/WSAddressingHandler.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/addressing/handler/WSAddressingHandler.java Wed Oct 19 14:48:42 2005
@@ -1,4 +1,19 @@
-package org.apache.ws.resource.handler.addressing;
+/*=============================================================================*
+ *  Copyright 2005 The Apache Software Foundation
+ *
+ *  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.apache.ws.addressing.handler;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -22,7 +37,7 @@
 
 
 /**
- * WS-Addressing JAX-RPC Handler
+ * A JAX-RPC {@link javax.xml.rpc.handler.Handler} that provides minimal support for WS-Addressing.
  *
  * @author Sal Campana
  */

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java?rev=326719&r1=326718&r2=326719&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java Wed Oct 19 14:48:42 2005
@@ -19,9 +19,9 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ws.Soap1_1Constants;
+import org.apache.ws.addressing.handler.WSAddressingHandler;
 import org.apache.ws.resource.ResourceContext;
 import org.apache.ws.resource.ResourceContextException;
-import org.apache.ws.resource.handler.addressing.WSAddressingHandler;
 import org.apache.ws.resource.faults.FaultException;
 import org.apache.ws.resource.i18n.Keys;
 import org.apache.ws.resource.i18n.MessagesImpl;

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/ResourceContextImpl.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/ResourceContextImpl.java?rev=326719&r1=326718&r2=326719&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/ResourceContextImpl.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/ResourceContextImpl.java Wed Oct 19 14:48:42 2005
@@ -18,13 +18,13 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ws.Soap1_1Constants;
+import org.apache.ws.addressing.handler.WSAddressingHandler;
 import org.apache.ws.resource.Resource;
 import org.apache.ws.resource.ResourceContext;
 import org.apache.ws.resource.ResourceException;
 import org.apache.ws.resource.ResourceHome;
 import org.apache.ws.resource.WsrfRuntime;
 import org.apache.ws.resource.faults.FaultException;
-import org.apache.ws.resource.handler.addressing.WSAddressingHandler;
 import org.apache.ws.resource.i18n.Keys;
 import org.apache.ws.resource.i18n.MessagesImpl;
 import org.apache.ws.util.i18n.Messages;

Modified: webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/client.xml
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/client.xml?rev=326719&r1=326718&r2=326719&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/client.xml (original)
+++ webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/client.xml Wed Oct 19 14:48:42 2005
@@ -1,38 +1,39 @@
-<?xml version="1.0"?>
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
-          "http://forrest.apache.org/dtd/document-v20.dtd">
-<document>
-	<header>
-		<title>SOAP Client</title>
-	</header>
-	<body>
-		<section id="intro">
-			<title>Introduction</title>
-			<p>Apache WSRF includes a lightweight SOAP client that can be used to test your services. The client is invoked using an Ant script, which is located in 
-			<code>INSTALL_DIR/template/soapclient.xml</code>. Request and response messages are viewed in the Ant output. This section explains how to use the client and 
-			how to build request SOAP messages for the client.</p>
-		</section>
-		<section>
-			<title>SOAP Files</title>
-			<p>The client reads a <code>.soap</code> file which contains the SOAP envelope to be sent. Examples of SOAP files are located in 
-			<code>INSTALL_DIR/examples/filesystem/requests/</code>. Each file is named appropriately based on the operation it contains. Use these files as models when 
-			creating your own .soap files. Make sure you modify the WS-Addressing header for the resource id to match the entry that is in the JNDI 
-			configuration file and the resource id for the instance you would like to invoke. The id is used by the invocation framework to lookup a particular resource instance.</p>
-		</section>
-		<section>
-			<title>Running the Client</title>
-			<p>To invoke the script:</p>
-			<ol>
-				<li>Make sure your WS Resource is deployed.</li>
-				<li>open a command prompt and change directories to <code>INSTALL_DIR/template/soapclient.xml</code>.</li>
-				<li>Run:
-      				<source>ant -f soapclient.xml sendRequest -Durl=http://localhost:8080/wsrf/services/<em>your_service</em> -Dxml=./requests/QueryResourceProperties_allProps.soap</source>
-					<p>Where <em>your_service</em> represents your WS Resource endpoint name, and the script name should be the name (including the path) of your .soap file. 
-      				</p>
-				</li>
-			</ol>
-			<note>You can add an entry to <code>build.properties</code> for the <code>url</code> property, which alleviates the need
-            		to specify it on the command line.</note>
-		</section>
-	</body>
-</document>
+<?xml version="1.0"?>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+          "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+	<header>
+		<title>SOAP Client</title>
+	</header>
+	<body>
+		<section id="intro">
+			<title>Introduction</title>
+			<p>Apache WSRF includes a lightweight SOAP client that can be used to test your services. The client is invoked using an Ant script, which is located in 
+			<code>INSTALL_DIR/template/soapclient.xml</code>. Request and response messages are viewed in the Ant output. This section explains how to use the client and 
+			how to build request SOAP messages for the client.</p>
+		</section>
+		<section>
+			<title>SOAP Files</title>
+			<p>The client reads a <code>.soap</code> file which contains the SOAP envelope to be sent. Examples of SOAP files are located in 
+			<code>INSTALL_DIR/examples/filesystem/requests/</code>. Each file is named appropriately based on the operation it contains. Use these files as models when 
+			creating your own .soap files. Make sure you modify the SOAP header element that represents the resource id WS-Addressing reference parameter. The name of the header element should match the entry that is in the JNDI 
+			configuration file, and the text value of the element should contain the resource id of the instance you would like to invoke. The id is used by the WSRF resource invocation framework to lookup a particular resource instance.</p>
+		</section>
+		
+		<section>
+			<title>Running the Client</title>
+			<p>To invoke the script:</p>
+			<ol>
+				<li>Make sure your WSRF service is deployed.</li>
+				<li>Open a command prompt and change directories to <code>INSTALL_DIR/template</code>.</li>
+				<li>Run:
+      				<source>ant -f soapclient.xml sendRequest -Durl=http://localhost:8080/wsrf/services/<em>your_service</em> -Dxml=./requests/QueryResourceProperties_allProps.soap</source>
+					<p>Where <em>your_service</em> represents your WSRF service endpoint name. 
+      				</p>
+				</li>
+			</ol>
+			<note>You can add an entry to <code>build.properties</code> for the <code>url</code> property, which alleviates the need
+            		to specify it on the command line.</note>
+		</section>
+	</body>
+</document>

Added: webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/config.xml
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/config.xml?rev=326719&view=auto
==============================================================================
--- webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/config.xml (added)
+++ webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/config.xml Wed Oct 19 14:48:42 2005
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+          "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+	<header>
+		<title>The Apache WSRF Configuration File</title>
+	</header>
+	<body>
+	
+		<section id="intro">
+			<title>Introduction</title>
+			<p>Apache WSRF loads its configuration from a single XML file. WSRF looks for a file named wsrf-config.xml 
+			   in the root package of the WSRF webapp's classloader, so the file should live in the WEB-INF/classes
+			   subdirectory of the WSRF webapp. The wsrf-config.xml file is expected to be in the Spring Framework's 
+			   spring-beans.xml format,
+			   which basically defines a set of Java beans and the information necessary for the Spring bean factory 
+			   to instantiate
+			   those beans. Interdependencies between the beans may also be defined, and Spring will make sure the 
+			   beans are instantiated in the right order. For more information on the spring-beans.xml and the
+			   Spring bean factory, please see the <a href="http://www.springframework.org/docs/reference/beans.html">
+			   Chapter 3 of the Spring Reference Documentation</a>. The following sections will explain each of the
+			   different types of beans that are configured in wsrf-config.xml.
+			</p>
+		</section>
+		
+		<section>
+			<title>WsrfRuntime</title>
+			<p>There must always be a bean defined for the WsrfRuntime. This is a singleton bean
+			   that is used to set any global configuration properties. Its bean definition should
+			   look as follows:</p>
+			<source><![CDATA[  <bean id="WsrfRuntime" class="org.apache.ws.resource.WsrfRuntime" factory-method="getRuntime">
+    <property name="baseWebappUrl">
+      <value>http://$IP_ADDRESS$:8080/wsrf</value>
+    </property>
+  </bean>]]></source>
+					<p>The <code>baseWebappUrl</code> property is mandatory. 
+					It defines the base URL of the WSRF Web application. The WSRF runtime uses the base URL
+					to fill in the Address field of WS-Addressing EndpointReferences it constructs for WS-Resource instances.
+					</p>
+					<p>Within the base webapp URL, you can use a hard-coded host name or IP address, or,  
+					alternatively, you can use the following markers which are replaced at runtime by Apache WSRF:
+					</p>
+					<ul>
+						<li>
+							<code>$IP_ADDRESS$</code> - An attempt is made to determine the IP address at runtime. (Do not use on multi-homed systems).</li>
+						<li>
+							<code>$HOST_NAME$</code> - An attempt is made to determine the host name at runtime.</li>
+					</ul>
+					<p>Whenever possible, we recommend using a host name as opposed to an IP adddress, since IP
+					addresses are usually more volatile.</p>
+					<p>Make sure that the port in the URL corresponds to the port that your HTTP server (e.g. Tomcat or Jetty) is listening on.</p>
+					
+		</section>
+
+		<section>
+			<title>resource homes</title>
+			<p>For each deployed WSRF service, there must be a bean defined for the corresponding resource home. This is a singleton bean
+			   that has a number of properties. Its bean definition should
+			   resemble the following:</p>
+			<source><![CDATA[  <bean name="resource/filesystem" class="org.apache.ws.resource.example.filesystem.FilesystemHome" init-method="init">
+    <property name="portComponentName"><value>filesystem</value></property>
+    <property name="serviceClass"><value>org.apache.ws.resource.example.filesystem.FilesystemService</value></property>
+    <property name="resourceClass"><value>org.apache.ws.resource.example.filesystem.FilesystemResource</value></property>
+    <property name="resourceIdentifierReferenceParameterName"><value>{http://ws.apache.org/resource/example/filesystem}ResourceIdentifier</value></property>
+  </bean>]]></source>
+					<p>The <code>id</code> attribute of the bean element is an identifier that uniquely identifies the bean definition in the config file. 
+					It must be a valid XML ID and unique among the other bean defintions in the configuration file, but otherwise, its value is arbitrary. The <code>class</code> attribute specifies the full classname of the resource home class for this WSRF service. The "portComponentName" property indicates the unique deployment name for the WSRF service (i.e. the service name from Axis' server-config.wsdd or the last portion of the service's endpoint URL). The <code>serviceClass</code> property points to the 
+					full classname for the service class. The <code>resourceClassName</code> property points to the 
+					full classname for the resource class.
+					</p>
+					
+					<p>The <code>resourceIdentifierReferenceParameterName</code> property represents the name of the WS-Addressing reference parameter SOAP header that is used to 
+					extract a unique resource identifier to lookup a specific WS-Resource instance. This value should be a QName that includes the local 
+					reference parameter name in the format <em><code>{namespaceURI}localPart</code></em>, where namespaceURI and localPart are the namespace and URI and local 
+					part of the qualified name of the reference paramater that should contain the resource identifier. If you omit this entry, it is assumed that the service exposes a 
+					<strong><code>SINGLETON</code></strong> WS-Resource and hence no resource id WS-Addressing reference parameter is expected in the SOAP header.
+          				</p>
+
+					<p>The optional <code>metadataConfig</code> property can be used to associate one or more metadata XML documents with this WSRF service. See the metadata section of the developer's guide.</p>
+          									
+		</section>
+				
+	</body>
+</document>

Modified: webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/deploy.xml
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/deploy.xml?rev=326719&r1=326718&r2=326719&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/deploy.xml (original)
+++ webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/deploy.xml Wed Oct 19 14:48:42 2005
@@ -1,140 +1,111 @@
-<?xml version="1.0"?>
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
-          "http://forrest.apache.org/dtd/document-v20.dtd">
-<document>
-	<header>
-		<title>Deploy the service to the Apache WSRF Web Application</title>
-	</header>
-	<body>
-		<section id="intro">
-			<title>Introduction</title>
-			<p>The quickest way to deploy your WS-Resource is to use the generated build script. The script compiles and delploys your WS-Resource 
-			 to the Apache WSRF Web application, which is an Apache-Axis Web application. This section describes how to use the 
-			generated build script and also how the script works so you can build your own script.</p>
-		</section>
-		<section>
-			<title>Using the generated build scripts</title>
-			<p>The Wsdl2Java tool generates an Ant build script that is used to compile and deploy your WS-Resource. The script is located in the 
-			output directory under the subdirectory for your WS-Resource (e.g., <code>generated/</code>
-				<em>
-					<code>service_name</code>
-				</em>).</p>
-			<p>To compile and deploy using the Ant script</p>
-			<ol>
-				<li>In your output directory, edit build.properties and modify the <code>wsrf.webapp.dir</code>. If you are using 
-				Tomcat and have <code>CATALINA_HOME</code> set, you do not need to modify this property.</li>
-				<li>From a command prompt, change directories to <code>generated/</code>
-					<em>
-						<code>service_name</code>
-					</em>
-				</li>
-				<li>Run:</li>
-			</ol>
-			<source><![CDATA[
-	ant compile deploy ]]></source>
-			<p>Start Tomcat and verify that the service is deployed by going to 
-			<a href="http://localhost:8080/wsrf/services">http://localhost:8080/wsrf/services</a>
-			</p>
-		</section>
-		<section id="steps">
-			<title>Manually Deploying your Service</title>
-			<p>In this section we will describe how to manually deploy your service.  We will describe each step in the process.</p>
-			<ol>
-				<li>
-					<strong>Copy your WSDL file.</strong>
-					<p>Your WSDL file needs to be copied to an appropriate location in the webapp.  We recommend you put it in the 
-					<code>wsrf/WEB-INF/classes/wsdl</code> directory. This allows Axis to reference it from the classpath and avoids the need to 
-					hard-code a location on your file system. This location is used when registering the service in the 
-					<code>server-config.wsdd</code> file.
-					</p>
-				</li>
-				<li>
-					<strong>Copy your classes.</strong>
-					<p>You will need to copy any .class files, generated by Wsdl2Java or hand written, to the <code>wsrf/WEB-INF/classes/</code> 					directory so that your service can be created by Axis and Apache WSRF.</p>
-				</li>
-				<li>
-					<strong>Update the jndi-config.xml file.</strong>
-					<p>The jndi-config.xml contains information about your service, resource, and home class.  This information is necessary for 
-					Apache WSRF to create your home and handle requests for your service.  It will setup the in-memory JNDI context for your classes. 
-					Here is the entry for the FileSystem example:</p>
-					<source><![CDATA[   <service name="filesystem">
-      <resource name="home" type="example.filesystem.FileSystemHome">
-         <resourceParams>
-            <parameter>
-               <name>baseWebappUrl</name>
-               <value>http://$IP_ADDRESS$:8080/wsrf</value>
-            </parameter> 
-            <parameter>
-               <name>serviceClassName</name>
-               <value>example.filesystem.FileSystemService</value>
-            </parameter>
-            <parameter>
-               <name>resourceClassName</name>
-               <value>example.filesystem.FileSystemResource</value>
-            </parameter>
-            <parameter>
-               <name>wsdlTargetNamespace</name>
-               <value>http://ws.apache.org/resource/example/filesystem</value>
-            </parameter>
-            <parameter>
-               <name>resourceIdentifierReferenceParameterName</name>
-               <value>{http://ws.apache.org/resource/example/filesystem}ResourceIdentifier</value>
-            </parameter>
-         </resourceParams>
-      </resource>
-   </service>]]></source>
-					<p>The<code> name</code> attribute is a unique name in the config file to denote your service in JNDI.  The resource "name" attribute is 
-					used for locating your home instance, and is named <code>home</code>.  Notice <code>serviceClassName</code> points to the 
-					clasname for the service class. The same is said for the <code>resourceClassName</code>.  The <code>wsdlTargetNamespace  
-					</code> is the target namespace from your WSDL.
-					</p>
-					<p>The <code>baseWebappUrl</code> parameter is used to define the URL of your Web application. You can include a static host, or as an 
-					alternative, you can use the following markers which are replaced at runtime:
-					</p>
-					<ul>
-						<li>
-							<code>$IP_ADDRESS$</code> - An attempt is made to determine the IP address at runtime. (Do not use on multi-homed systems).</li>
-						<li>
-							<code>$HOST_NAME$</code> - An attempt is made to determine the host name at runtime.</li>
-					</ul>
-					<p>The <code>resourceIdentifierReferenceParameterName</code> parameter represents the name of the WS-Addressing-header that is used to 
-					extract a unique resource identifier to lookup a specific WS-Resource instance. This value should be a QName that includes the local 
-					reference parameter name in the format <em><code>{namespaceURI}localPart</code></em>, where namesapaceURI and localPart are the namespace and URI and local 
-					part of the qualified name of the reference paramater that should contain the resource identifier. If you omit this entry, it is assumed that the service is a 
-					<strong><code>SINGLETON</code></strong> service and no resource id is expected in the 
-					WS-Addressing headers.
-          				</p>
-				</li>
-				<li>
-					<strong>Update the server-config.wsdd file</strong>
-					<p>The <code>server-config.wsdd</code> file is the configuration file for the Axis SOAP engine,
-             				which is bundled with Apache WSRF. This file is located in the <code>wsrf/WEB-INF/</code> directory. 
-             				See the <a href="ext:ws.apache.org/axis">Axis</a> documentation for complete instructions about <code>server-config.wsdd</code>
-					</p>
-					<p>The file contains a deployment entry for each Web service. For example, the FileSystem service example is:
-             				</p>
-					<source><![CDATA[    <service name="filesystem" provider="java:WSRF" style="document" use="literal">
-      <wsdlFile>/wsdl/FileSystem.wsdl</wsdlFile>      
-      <requestFlow>
-         <handler type="java:org.apache.axis.handlers.JAXRPCHandler">
-            <parameter name="className" value="org.apache.axis.message.addressing.handler.AxisServerSideAddressingHandler"/>
-            <parameter name="referencePropertyNames" value="*"/>
-         </handler>
-      </requestFlow>      
-   </service>]]></source>
-					<p>The service <code>name</code> attribute is the endpoint name and should be the same as the port's <code>name</code> attribute 
-					from your WSDL file. This will ensure people consuming your WSDL will be able to invoke your service.
-             				</p>
-					<p>Notice the entry for <code>wsdlFile</code> which points to the <code>/wsdl/FileSystem.wsdl</code>.
-             				This translates to the wsdl directory under the <code>WEB-INF/classes</code> directory.
-             				</p>
-					<p>The last part is the <code>requestFlow</code>. This xml fragment is necessary to ensure the
-             				requests are routed through the WS-Addressing handler. This is static and should
-             				always be present.  We did not define it globally in case there were other services
-             				defined which will not use WS-Addressing.
-             				</p>
-				</li>
-			</ol>
-		</section>
-	</body>
-</document>
+<?xml version="1.0"?>
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+          "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+	<header>
+		<title>Deploy the service to the Apache WSRF Web Application</title>
+	</header>
+	<body>
+		<section id="intro">
+			<title>Introduction</title>
+			<p>The quickest way to deploy your WSRF service is to use the generated build script. The script compiles and deploys your WSRF service 
+			 to the Apache WSRF Web application, which is an extension of the Apache-Axis Web application. This section describes how to use the 
+			generated build script and also how the script works, so you can build your own script.</p>
+		</section>
+		<section>
+			<title>Using the generated build scripts</title>
+			<p>The Wsdl2Java tool generates an Ant build script that is used to compile and deploy your WS-Resource. The script is located in the 
+			output directory under the subdirectory for your WS-Resource (e.g., <code>generated/</code><em><code>service_name</code></em>).</p>
+			<p>To compile and deploy using the Ant script</p>
+			<ol>
+				<li>In your output directory, edit build.properties and modify the <code>wsrf.webapp.dir</code>. If you are using 
+				Tomcat and have <code>CATALINA_HOME</code> set, you do not need to modify this property.</li>
+				<li>From a command prompt, change directories to <code>generated/</code><em><code>service_name</code></em>
+				</li>
+				<li>Run:</li>
+			</ol>
+			<source><![CDATA[
+	ant compile deploy ]]></source>
+			<p>Start Tomcat and verify that the service is deployed by going to 
+			<a href="http://localhost:8080/wsrf/services">http://localhost:8080/wsrf/services</a>
+			</p>
+		</section>
+		
+		<section id="steps">
+			<title>Manually Deploying your Service</title>
+			<p>In this section we will describe how to manually deploy your service. We will describe each step in the process.</p>
+			<ol>
+				<li>
+					<strong>Copy your WSDL file.</strong>
+					<p>Your WSDL file needs to be copied to an appropriate location in the webapp. We recommend you put it in the 
+					<code>wsrf/WEB-INF/classes/wsdl</code> directory. This allows Axis to reference it from the classpath and avoids the need to 
+					hard-code a location on your file system. This location is used when registering the service in the 
+					<code>server-config.wsdd</code> file.
+					</p>
+				</li>
+
+				<li>
+					<strong>Copy your classes.</strong>
+					<p>You will need to copy any .class files, generated by Wsdl2Java or hand written, to the <code>wsrf/WEB-INF/classes/</code> 					directory so that your service classes can be found by Apache WSRF.</p>
+				</li>
+				
+				<li>
+					<strong>Update the wsrf-config.xml file.</strong>
+					<p>The wsrf-config.xml contains configuration information for each deployed WSRF service as well as global configuration for the WSRF runtime. This information is necessary for 
+					Apache WSRF to create your home and handle requests for your service. The resource homes for each WSRF service will be bound in JNDI at <code>wsrf/resource/<em>service_name</em></code>. 
+					Here is the configuration entry for the FileSystem example WSRF service:</p>
+					<source><![CDATA[  <bean name="resource/filesystem" class="org.apache.ws.resource.example.filesystem.FilesystemHome" init-method="init">
+    <property name="portComponentName"><value>filesystem</value></property>
+    <property name="serviceClass"><value>org.apache.ws.resource.example.filesystem.FilesystemService</value></property>
+    <property name="resourceClass"><value>org.apache.ws.resource.example.filesystem.FilesystemResource</value></property>
+    <property name="resourceIdentifierReferenceParameterName"><value>{http://ws.apache.org/resource/example/filesystem}ResourceIdentifier</value></property>
+  </bean>
+]]></source>
+					<p>The <code>id</code> attribute of the bean element is an identifier that uniquely identifies the bean definition in the config file. 
+					It must be a valid XML ID and unique among the other bean defintions in the configuration file, but otherwise, its value is arbitrary. The <code>class</code> attribute specifies the full classname of the resource home class for this WSRF service. The "portComponentName" property indicates the unique deployment name for the WSRF service (i.e. the service name from Axis' server-config.wsdd or the last portion of the service's endpoint URL). The <code>serviceClass</code> property points to the 
+					full classname for the service class. The <code>resourceClassName</code> property points to the 
+					full classname for the resource class.
+					</p>
+					
+					<p>The <code>resourceIdentifierReferenceParameterName</code> property represents the name of the WS-Addressing reference parameter SOAP header that is used to 
+					extract a unique resource identifier to lookup a specific WS-Resource instance. This value should be a QName that includes the local 
+					reference parameter name in the format <em><code>{namespaceURI}localPart</code></em>, where namespaceURI and localPart are the namespace and URI and local 
+					part of the qualified name of the reference paramater that should contain the resource identifier. If you omit this entry, it is assumed that the service exposes a 
+					<strong><code>SINGLETON</code></strong> WS-Resource and hence no resource id WS-Addressing reference parameter is expected in the SOAP header.
+          				</p>
+				</li>
+
+				<li>
+					<strong>Update the server-config.wsdd file</strong>
+					<p>The <code>server-config.wsdd</code> file is the configuration file for the Axis SOAP engine,
+             				which is bundled with Apache WSRF. This file is located in the <code>wsrf/WEB-INF/</code> directory. 
+             				See the <a href="ext:ws.apache.org/axis">Axis</a> documentation for complete instructions about <code>server-config.wsdd</code>
+					</p>
+					<p>The file contains a deployment entry for each Web service. For example, the entry for the FileSystem example service is:
+             				</p>
+					<source><![CDATA[    <service name="filesystem" provider="java:WSRF" style="document" use="literal">
+      <wsdlFile>/wsdl/FileSystem.wsdl</wsdlFile>      
+      <requestFlow>
+         <handler type="java:org.apache.axis.handlers.JAXRPCHandler">
+            <parameter name="className" value="org.apache.ws.addressing.handler.WSAddressingHandler"/>
+         </handler>
+      </requestFlow>      
+   </service>]]></source>
+					<p>The service <code>name</code> attribute is the endpoint name and should be the same as the port's <code>name</code> attribute 
+					from your WSDL file. This will ensure people consuming your WSDL will be able to invoke your service.
+             				</p>
+					<p>Notice the entry for <code>wsdlFile</code> which points to the <code>/wsdl/FileSystem.wsdl</code>.
+             				This translates to the wsdl directory under the <code>WEB-INF/classes</code> directory.
+             				</p>
+					<p>The last part is the <code>requestFlow</code>. This xml fragment is necessary to ensure the
+             				requests are routed through Apache WSRF's WS-Addressing handler. This is static and should
+             				always be present.  We do not define it globally in case there are other services
+             				deployed which do not use WS-Addressing.
+             				</p>
+				</li>
+			</ol>
+		</section>
+	</body>
+</document>

Modified: webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/metadata.xml
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/metadata.xml?rev=326719&r1=326718&r2=326719&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/metadata.xml (original)
+++ webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/metadata.xml Wed Oct 19 14:48:42 2005
@@ -63,10 +63,10 @@
 			<p>To update the WSRF configuration file to include metadata information:</p>
 			<ol>
 				<li>Using a text editor, open <code>wsrf-config.xml</code> in the <code>WEB-INF/classes</code> directory.</li>
-				<li>Add the following property to the ResourceHome bean , for which you would like to associate metadata:
+				<li>Add the following property to the ResourceHome bean, with which you would like to associate metadata:
 				<source><![CDATA[
     <property name="metadataConfig">
-    <bean class="org.apache.ws.util.jndi.tools.MetadataConfigImpl" singleton="true">
+    <bean class="org.apache.ws.util.jndi.tools.MetadataConfigImpl">
 	  <constructor-arg>
 	    <list>		  
 		<bean class="org.apache.ws.util.jndi.tools.MetadataEntry">     

Modified: webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/singleton.xml
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/singleton.xml?rev=326719&r1=326718&r2=326719&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/singleton.xml (original)
+++ webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/singleton.xml Wed Oct 19 14:48:42 2005
@@ -1,43 +1,43 @@
-<?xml version="1.0"?>
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
-          "http://forrest.apache.org/dtd/document-v20.dtd">
-<document>
-	<header>
-		<title>Creating a Singleton Service</title>
-	</header>
-	<body>
-		<section>
-			<title>Introduction</title>
-			<p>You can create a singleton service if only a single instance of a resource is required. If a service is a singleton, no resource ID parameter is expected in the 
-			header of requests sent to the service. To create a singleton service, you must create a single instance of the resource in the generated home class and modify the deployed 
-			jndi-config.xml file.
-			</p>
-		</section>
-		<section>
-			<title>Create a Single Instance</title>
-			<p>Resource instances are created in the service's home class. For a singleton, specify an identifier of <code>null</code> when you call <code>createInstance()</code>. This 
-			ensures that only a single instance of the resource is created. For example:</p>
-			<source><![CDATA[public void init() throws Exception
-    {
-        super.init();
-        
-        HostResource host = (HostResource) createInstance( null );
-        add( host );
-    }			]]></source>
-		</section>
-		<section>
-			<title>Modify the JNDI Configuration File</title>
-			<p>To update the JNDII configuration file for a singleton service:</p>
-			<ol>
-				<li>Using a text editor, open <code>jndi-config.xml</code> in the <code>WEB-INF/classes</code> directory.</li>
-				<li>From the <code><![CDATA[<service name="your_service">]]></code> block, remove the <code>resourceIdentifierReferenceParameterName</code> parameter. 
-				This parameter is not required for a singleton. Removing this entry ensures that Apache WSRF does not look for a resource id in the 
-				WS Addressing header.</li>
-				<li>Save and close jndi-config.xml.</li>
-				<li>Restart Tomcat if it is already started.
-				<note>The service entry in jndi-config is only present if the service has been deployed.</note>
-				</li>
-			</ol>
-		</section>
-	</body>
-</document>
+<?xml version="1.0"?>
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+          "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+	<header>
+		<title>Creating a Singleton Resource</title>
+	</header>
+	<body>
+		<section>
+			<title>Introduction</title>
+			<p>You can create a singleton service if only a single instance of a resource is required. If a service is a singleton, no resource ID parameter is expected in the 
+			header of requests sent to the service. To create a singleton service, you must create a single instance of the resource in the generated home class and modify the deployed 
+			jndi-config.xml file.
+			</p>
+		</section>
+		<section>
+			<title>Create a Single Instance</title>
+			<p>Resource instances are created in the service's home class. For a singleton, specify an identifier of <code>null</code> when you call <code>createInstance()</code>. This 
+			ensures that only a single instance of the resource is created. For example:</p>
+			<source><![CDATA[public void init() throws Exception
+    {
+        super.init();        
+        HostResource host = (HostResource) createInstance( null );
+        add( host );
+    }			]]></source>
+		</section>
+		<section>
+			<title>Modify the JNDI Configuration File</title>
+			<p>To update the JNDI configuration file for a singleton service:</p>
+			<ol>
+				<li>Using a text editor, open <code>jndi-config.xml</code> in the <code>WEB-INF/classes</code> directory.</li>
+				<li>From the <code><![CDATA[<service name="your_service">]]></code> block, remove the <code>resourceIdentifierReferenceParameterName</code> parameter. 
+				This parameter is not required for a singleton. Removing this entry ensures that Apache WSRF does not look for a resource id WS-Addressing reference parameter in the SOAP header.</li>
+				<li>Save and close jndi-config.xml.</li>
+				<li>Restart Tomcat if it is already started.
+				<note>The service entry in jndi-config is only present if the service has been deployed.</note>
+				</li>
+			</ol>
+		</section>
+	</body>
+</document>

Modified: webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/validate.xml
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/validate.xml?rev=326719&r1=326718&r2=326719&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/validate.xml (original)
+++ webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/validate.xml Wed Oct 19 14:48:42 2005
@@ -1,29 +1,34 @@
-<?xml version="1.0"?>
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
-          "http://forrest.apache.org/dtd/document-v20.dtd">
-<document>
-	<header>
-		<title>Schema Validation</title>
-	</header>
-	<body>
-		<section id="intro">
-			<title>Introduction</title>
-			<p>All requests sent to the resource invocation framework are validated against any defined schemas types which have corresponding XMLBean classes located on the 
-			classpath. When validation fails, a fault that contains a detailed description of exactly what is wrong with the XM is returned to the client. Request validation is performed using 
-			XMLBeans, which uses an in-memory binary schema store. If the utmost performance is required, request validation can be disabled.
-			</p>
-		</section>
-		<section>
-			<title>Disabling Schema Validation</title>
-			<p>Schema validation is enabled by default. This means that all requests are validated. If you would like to disable this feature, you must set the 
-			<code>validateRequestXml</code> system property to <code>false</code>. The property must be set as a Java property before starting the container that is hosting 
-			Apache WSRF. For example:</p>
-			<source>
-	-DvalidateRequestXml=false</source>
-			<p>If you are using Tomcat, you can set this property in the <code>JAVA_OPTS</code> variable before starting Tomcat. For example:</p>
-			<source>
-	set JAVA_OPTS=-DvalidateRequestXml=false
-	catalina.bat run</source>
-		</section>
-	</body>
-</document>
+<?xml version="1.0"?>
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+          "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+	<header>
+		<title>Schema Validation</title>
+	</header>
+	<body>
+
+		<section id="intro">
+			<title>Introduction</title>
+			<p>By default, all requests sent to the resource invocation framework are validated against any defined schemas types which have corresponding XMLBean classes located on the 
+			classpath. When validation fails, a fault that contains a detailed description of exactly what is wrong with the XML is returned to the client. Request validation is performed using 
+			XMLBeans, which utilizes an in-memory binary schema store. If the utmost performance is required, request validation can be disabled.
+			</p>
+		</section>
+		
+		<section>
+			<title>Disabling Schema Validation</title>
+			<p>Schema validation is enabled by default. This means that all requests are validated. If you would like to disable this feature, you must set the 
+			<code>validateRequestXml</code> Java system property to <code>false</code>. The system property can be set by specifying a command-line option upon launching the JVM that is hosting 
+			Apache WSRF. For example:</p>
+			<source>
+	-DvalidateRequestXml=false</source>
+			<p>If you are using Tomcat, you can set this property in the <code>JAVA_OPTS</code> variable before starting Tomcat. For example:</p>
+			<source>
+	set JAVA_OPTS=-DvalidateRequestXml=false
+	catalina.bat run</source>
+		</section>
+
+	</body>
+</document>

Modified: webservices/wsrf/trunk/src/templates/wsrf-config.xml.vm
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/templates/wsrf-config.xml.vm?rev=326719&r1=326718&r2=326719&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/templates/wsrf-config.xml.vm (original)
+++ webservices/wsrf/trunk/src/templates/wsrf-config.xml.vm Wed Oct 19 14:48:42 2005
@@ -13,6 +13,25 @@
     <property name="serviceClass"><value>${package}.${serviceName}Service</value></property>
     <property name="resourceClass"><value>${package}.${serviceName}Resource</value></property>
     <property name="resourceIdentifierReferenceParameterName"><value>{${resourcekey.NamespaceURI}}${resourcekey.LocalPart}</value></property>
+    <property name="metadataConfig">
+      <bean class="org.apache.ws.util.jndi.tools.MetadataConfigImpl">
+	    <constructor-arg>
+	      <list>
+		    <bean class="org.apache.ws.util.jndi.tools.MetadataEntry">
+		      <property name="dialect">
+		        <value>http://schemas.xmlsoap.org/wsdl/</value>
+		      </property>
+		      <property name="identifier">
+		        <value>$generated.namespace</value>
+		      </property>
+		      <property name="location">
+		        <value>wsdl/$generated.wsdlName</value>
+		      </property>
+		    </bean>
+	      </list>
+	    </constructor-arg>
+	  </bean>
+    </property>
   </bean>
 
 #foreach( $includeFile in $generated.springBeanDefIncludeLocations )



Mime
View raw message