You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pubscribe-commits@ws.apache.org by jr...@apache.org on 2005/07/28 18:58:10 UTC

svn commit: r225820 - in /webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide: deploy.xml home.xml producer.xml wsdl.xml

Author: jruzzi
Date: Thu Jul 28 09:58:07 2005
New Revision: 225820

URL: http://svn.apache.org/viewcvs?rev=225820&view=rev
Log:
updated content

Modified:
    webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/deploy.xml
    webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/home.xml
    webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/producer.xml
    webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/wsdl.xml

Modified: webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/deploy.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/deploy.xml?rev=225820&r1=225819&r2=225820&view=diff
==============================================================================
--- webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/deploy.xml (original)
+++ webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/deploy.xml Thu Jul 28 09:58:07 2005
@@ -62,6 +62,10 @@
       <resource name="home" type="example.filesystem.FileSystemHome">
          <resourceParams>
             <parameter>
+               <name>baseWebappUrl</name>
+               <value>http://$IP_ADDRESS$:8080/pubscribe</value>
+            </parameter>
+            <parameter>
                <name>serviceClassName</name>
                <value>example.filesystem.FileSystemService</value>
             </parameter>
@@ -84,10 +88,21 @@
 					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> 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>{target namespace}qualified name of a reference parameter</code></em>. 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 
+					reference parameter name in the format <em>
+							<code>{target namespace}qualified name of a reference parameter</code>
+						</em>. 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>

Modified: webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/home.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/home.xml?rev=225820&r1=225819&r2=225820&view=diff
==============================================================================
--- webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/home.xml (original)
+++ webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/home.xml Thu Jul 28 09:58:07 2005
@@ -8,13 +8,14 @@
 	<body>
 		<section id="intro">
 			<title>Introduction</title>
-			<p>The home class is used to lookup the resource instance. It can act as a factory
-         		for creating instances upon request, or build all instances. It is meant
+			<p>The home class is used to lookup the resource instance. It can act as a factory for creating instances upon request, or build all instances. It is meant
          		 to be the entry point for locating a resource instance.
          		</p>
-         		<p>If you use the Wsdl2Java tool, the resource class is automatically generated, but will need to modified to create instances of your resource. This section will 
-         		describe how to write a home class for your resource class. Initially, you should model your resource off of the included <code>FilesystemHome</code> example 
-         		to ensure that you write a valid home class for your resource class.</p>
+         		<note>If your service is a singleton and only requires a single resource instance, see the <a href="ext:single">Creating a Singleton Service</a> in the Apache WSRF 
+         		documentation.</note>
+			<p>If you use the Wsdl2Java tool, the home class is automatically generated, but will need to modified to create instances of your resource. This section will 
+         		describe how to write a home class for your resource. Initially, you should model your resource off of the included <code>FilesystemHome</code> example 
+         		to ensure that you write a valid home class for your resource.</p>
 		</section>
 		<section id="class-declaration">
 			<title>Class Declaration</title>
@@ -30,51 +31,16 @@
 		<section id="ops">
 			<title>Operations</title>
 			<p>If you extend <code>AbstractResourceHome</code>, the only required operation you will need to implement is:</p>
-			<source>public Resource getInstance( ResourceContext resourceContext )</source>
-			<p>The <code>getInstance(...)</code> operation provides the ability for you to intercept the request for
-        		 retrieving an instance. In the FileSystem example, we use the operation to determine
-        		 if the requested resource instance is a valid filesystems (i.e. one that is being managed
-         		via WSRF); if it is not, we throw an exception.</p>
-			<source>public Resource getInstance( ResourceContext resourceContext )
-            throws ResourceException,
-            ResourceContextException,
-            ResourceUnknownException
+			<source>public void init()</source>
+			<p>The <code>init()</code> operation can be used to initialize any instances at startup. In the FileSystem example, the <code>init()</code> method is used:</p>
+			<source>public void init() throws Exception
     {
-        ResourceKey key = resourceContext.getResourceKey();
-        Resource resource = null;
-        try
-        {
-            resource = find( key );
-        }
-        catch ( ResourceException re )
-        {
-            Object id = key.getValue();
-            /**
-             * Determine if the passed-in key is, in fact, something we expect.
-             */
-            if ( id.equals( "/dev/vg00/lvol1" ) || id.equals( "/dev/vg00/lvol2" ) )
-            {
-                try
-                {
-                    resource = createInstance( key);
-                }
-                catch ( Exception e )
-                {
-                    throw new ResourceException( e );
-                }
-                add( key, resource );
-            }
-            else
-            {
-                throw new ResourceUnknownException( id,
-                        resourceContext.getServiceName() );
-            }
-        }
-        return resource;
+        super.init();
+        FilesystemResource lvol1Resource = (FilesystemResource) createInstance( LVOL1_ID );
+        add( lvol1Resource );
+        FilesystemResource lvol2Resource = (FilesystemResource) createInstance( LVOL1_ID );
+        add( lvol2Resource );
     }</source>
-			<p>Notice the method makes calls to <code>find(...) </code>and <code>createInstance(...)</code>. These operations are
-         		provided by the <code>AbstractResourceHome</code> superclass. They provide functions like caching and
-         		instantiating instances.</p>
 			<note>Many of the operations in the <code>AbstractResourceHome</code> may be overridden in your Home
             		class, if you have a need to extend its functionality.</note>
 		</section>

Modified: webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/producer.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/producer.xml?rev=225820&r1=225819&r2=225820&view=diff
==============================================================================
--- webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/producer.xml (original)
+++ webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/producer.xml Thu Jul 28 09:58:07 2005
@@ -17,11 +17,15 @@
 		<section>
 			<title>Adding Topics</title>
 			<p>Notification topics must be added to the <code>init()</code> method of your service's resource class. If you used the Wsdl2Java tool, the resource class 
-			(<em><code>service_name</code></em><code>Resource.java</code>) is automatically generated, but will need to modified. The resource class is the stateful 
+			(<em>
+					<code>service_name</code>
+				</em>
+				<code>Resource.java</code>) is automatically generated, but will need to modified. The resource class is the stateful 
 			instance-representation of your Web service. In addition to notification topics, the resource class maintains the resource <code>id</code> and the <code>
 			ResourcePropertySet</code>. The <code>ResourcePropertySet</code> is the Java representation of the Resource Properties document defined in the schema section of 
 			your WSDL file.
-			</p> 
+			</p>
+			<note>The notification producer portType resource properties (Topic, FixedTopicSet, TopicExpressionDialects) are initialized by default and do not have to be initalized here.</note>
 			<p>This section discuss how to add topics to a resource class. Initially, you should model your resource off of the included FileSystemResource example to ensure 
 			that you write a valid resource class. When adding topics to the resource class, you can select to add topics for all resource properties or you can add topics for 
 			specific resource properties. Each style is discussed below.
@@ -32,42 +36,37 @@
 				<title>Topics for All Resource Properties</title>
 				<p>The easiest way to add notification topics is to add topics for all resource properties that a WS resource exposes. In this case, the following method is added to the 
 				resource class:
-				</p><source>
+				</p>
+				<source>
 try
   {
   org.apache.ws.notification.topics.util.TopicUtils.addResourcePropertyValueChangeTopics( getResourcePropertySet(), getTopicSpaceSet() );
   }
 </source>
-  			<p>In the above example, a notification topic is added for all resource properties that have been added to <code>ResourcePropertySet</code>.
+				<p>In the above example, a notification topic is added for all resource properties that have been added to <code>ResourcePropertySet</code>.
   			</p>
 			</section>
 			<section>
 				<title>Topics for Specific Resource Properties</title>
 				<p>Notification topics can be added for specific resource properties. This allows you to control which topics will be available to a notification consumer. In this case, 
 				the following method can be used for each resource property for which you want to add a topic:
-				</p><source>
+				</p>
+				<source>
 try
    {
    org.apache.ws.notification.topics.util.TopicUtils.addResourcePropertyValueChangeTopic( getResourcePropertySet().get( FilesystemPropertyQNames.FSCKPASSNUMBER ), getTopicSpaceSet() );
    }</source>
-			<p>In the above example a topic is created specifically for the <code>FSCKPASSNUMBER</code> resource property.
+				<p>In the above example a topic is created specifically for the <code>FSCKPASSNUMBER</code> resource property.
 			</p>
-			</section> 
+			</section>
 			<section>
 				<title>Resource Termination Topic</title>
 				<p>The resource termination topic is used for notifications when a resource is terminated. The use of this topic is optional. To add this topic to the resource class, use 
 				the following method:
-				</p><source>
+				</p>
+				<source>
 org.apache.ws.notification.topics.util.TopicUtils.addResourceTerminationTopic( getTopicSpaceSet(), this, SPEC_NAMESPACE_SET );</source>
 			</section>
-		</section>
-		<section>
-			<title>Initializing NotificationProducer Resource Properties</title>
-			<p>The notification producer portType contains several default resource properties (Topic, FixedTopicSet, TopicExpressionDialects). when these properties are initialized, 
-			All topics will be registered. To initialize these properties, the following method is used:
-			</p><source>
-org.apache.ws.notification.topics.util.TopicUtils.initNotificationProducerProperties(getTopicSpaceSet() , getResourcePropertySet());</source>
-			<note>This method MUST be called last in the <code>init()</code> method to ensure all topics get registered.</note>
 		</section>
 	</body>
 </document>

Modified: webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/wsdl.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/wsdl.xml?rev=225820&r1=225819&r2=225820&view=diff
==============================================================================
--- webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/wsdl.xml (original)
+++ webservices/pubscribe/trunk/src/site/content/xdocs/dev_guide/wsdl.xml Thu Jul 28 09:58:07 2005
@@ -71,6 +71,14 @@
 				attribute whose value is the <code>QName</code> of the resource properties document element defined in the types/schema section of the WSDL file.
 				</p>
 			</section>
+			<section>
+				<title>Metadata Operations</title>
+				<p>The template contains two operations that are not defined by the WSRF or WSN specification that can be used in your service to retrieve metadata 
+				about your services. The operations and messages are defined in the 
+				<a href="http://msdn.microsoft.com/library/en-us/dnglobspec/html/ws-metadataexchange.pdf">WS-Metadata Exchange</a> specification defined by Microsoft and other industry 
+				contributors. For instructions on providing metadata about your service, see the <a href="ext:metadata">Adding Service Metadata</a> section of the Apache 
+				WSRF documentation.</p>
+			</section>
 		</section>
 	</body>
 </document>