Author: jruzzi
Date: Mon Aug  1 18:56:11 2005
New Revision: 226924

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

Added:
    webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_service.xml
Modified:
    webservices/muse/trunk/src/site/content/xdocs/tutorial/index.xml
    webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_home.xml
    webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_resource.xml
    webservices/muse/trunk/src/site/content/xdocs/tutorial/test.xml
    webservices/muse/trunk/src/site/content/xdocs/tutorial/webapp.xml

Modified: webservices/muse/trunk/src/site/content/xdocs/tutorial/index.xml
URL: 
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/site/content/xdocs/tutorial/index.xml?rev=226924&r1=226923&r2=226924&view=diff
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/index.xml (original)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/index.xml Mon Aug  1 
18:56:11 2005
@@ -12,7 +12,7 @@
                        services represent a UNIX file system resource and a 
host resource. If you want to see a completed version of this example, see the 

                        <a href="site:quick">Quick Demonstration</a>.

                        </p>

-                       <note>To complete the tutorial, you must first <a 
href="site:installation">install</a> the distribution.</note> 

+                       <note>To complete the tutorial, you must first <a 
href="site:installation">install</a> the distribution.</note>

                        <p>The tutorial consists of the following steps:</p>

                        <ol>

                                <li>

@@ -29,6 +29,9 @@
                                </li>

                                <li>

                                        <a href="mod_resource.html">Modify the 
Resource Classes</a>

+                               </li>

+                               <li>

+                                       <a href="mod_service.html">Modify the 
Service Class</a>

                                </li>

                                <li>

                                        <a href="webapp.html">Compile and 
Deploy the Services</a>


Modified: webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_home.xml
URL: 
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_home.xml?rev=226924&r1=226923&r2=226924&view=diff
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_home.xml 
(original)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_home.xml Mon Aug 
 1 18:56:11 2005
@@ -14,7 +14,7 @@
                </section>

                <section>

                        <title>Modify the FilesytemHome Class</title>

-                       <p>Open 
<code>WORK_DIR/generated/Filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java</code>
 and

+                       <p>Open 
<code>WORK_DIR/generated/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java</code>
 and

                        replace the <code>public void init()</code> method with 
the following method. You will also need to copy the instance variables 
below.</p>

                        <source><![CDATA[

     private static final String LVOL1_ID = "/dev/vg00/lvol1";

@@ -34,7 +34,7 @@
                </section>

                <section>

                        <title>Modify the Host Home Class</title>

-                       <p>Open 
<code>WORK_DIR/generated/Host/src/java/org/apache/ws/resource/example/host/HostHome.java</code>
 and

+                       <p>Open 
<code>WORK_DIR/generated/host/src/java/org/apache/ws/resource/example/host/HostHome.java</code>
 and

                        replace the <code>init()</code> method with the 
following method:

                        </p>

                        <source><![CDATA[


Modified: 
webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_resource.xml
URL: 
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_resource.xml?rev=226924&r1=226923&r2=226924&view=diff
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_resource.xml 
(original)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_resource.xml Mon 
Aug  1 18:56:11 2005
@@ -25,7 +25,7 @@
                </section>

                <section>

                        <title>Modify the FileSystem Resource Class</title>

-                       <p>Open 
<code>WORK_DIR/generated/Filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemResource.java</code>
 and

+                       <p>Open 
<code>WORK_DIR/generated/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemResource.java</code>
 and

                        replace the <code>public void init()</code> method with 
the following methods. You will also need to copy the instance variables and 
custom operation 

                        methods below.</p>

                        <source><![CDATA[

@@ -135,8 +135,7 @@
              * MUWS-defined properties.

              */

             // init the 
{http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}ResourceId 
resource property

-            resourceProperty = resourcePropertySet.get( 
FilesystemPropertyQNames.RESOURCEID );

-            resourceProperty.setCallback( new 
org.apache.ws.muws.ResourceIdResourcePropertyCallback( this ) );

+            org.apache.ws.muws.MuwsUtils.initResourceIdProperty(this);

             // NOTE: it's not necessary to add a property change listener, 
since the ResourceId prop is immutable

 

             // init the 
{http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}ManageabilityCapability
 resource property

@@ -162,6 +161,9 @@
 

             // init the 
{http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}OperationalStatus
 resource property

             resourceProperty = resourcePropertySet.get( 
FilesystemPropertyQNames.OPERATIONALSTATUS );

+            
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.OperationalStatusDocument 
statusDoc = 
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.OperationalStatusDocument.Factory.newInstance();

+            statusDoc.setOperationalStatus( 
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.OperationalStatusDocument.OperationalStatus.AVAILABLE
 );

+            resourceProperty.add(statusDoc);

             resourceProperty.setCallback( new 
example.filesystem.callback.OperationalStatusCallback( m_filesystem ) );

             resourceProperty.addChangeListener( 
operationalStatusCapabilityTopic ); // add for property-value-changed 
management events

 

@@ -176,6 +178,7 @@
             
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipTypeType 
relationshipTypeType = relationshipType.addNewType();

             org.apache.ws.util.XmlBeanUtils.addChildElement( 
relationshipTypeType, new javax.xml.namespace.QName( "http://myns.com/";, 
"ContainedBy", "myns" ) );

 

+

             
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipParticipantType
 relationshipParticipantType = relationshipType.addNewParticipant();

             org.apache.ws.resource.properties.ResourceProperty resourceIdProp 
= resourcePropertySet.get( FilesystemPropertyQNames.RESOURCEID );

             org.apache.xmlbeans.XmlAnyURI resourceId = 
(org.apache.xmlbeans.XmlAnyURI) resourceIdProp.get( 0 );

@@ -245,7 +248,6 @@
         }

 

     }

-

     public void mount() throws Exception

     {

         m_filesystem.mount();

@@ -267,33 +269,35 @@
                        replace the <code>public void init()</code> method with 
the following method:

                        </p>

                        <source><![CDATA[

-   public void init()

-   {

-       super.init();

-       

-       /**

-        * The ResourcePropertySet which contains all the defined 
ResourceProperties

-        */

-         org.apache.ws.resource.properties.ResourcePropertySet 
resourcePropertySet = getResourcePropertySet();

-         org.apache.ws.resource.properties.ResourceProperty resourceProperty = 
null;

-         

-         try

-         {

-             // init the 
{http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}ResourceId 
resource property

-             resourceProperty = resourcePropertySet.get( 
HostPropertyQNames.RESOURCEID );

-             resourceProperty.setCallback( new 
org.apache.ws.muws.ResourceIdResourcePropertyCallback( this ) );

-             // NOTE: it's not necessary to add a property change listener, 
since the ResourceId prop is immutable

-         }

-         catch (Exception e)

-         {

-              throw new javax.xml.rpc.JAXRPCException("There was a problem in 
initializing your resource properties.  Please check your init() method. Cause: 
" + e.getLocalizedMessage());

-         }

+  public void init()

+       {

+           super.init();

+

+           /**

+                * The ResourcePropertySet which contains all the defined 
ResourceProperties

+                */

+               org.apache.ws.resource.properties.ResourcePropertySet 
resourcePropertySet = getResourcePropertySet();

+               org.apache.ws.resource.properties.ResourceProperty 
resourceProperty = null;

+

+

+       try{

+             // init the 
{http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}ResourceId 
resource property

+             MuwsUtils.initResourceIdProperty(this);

+             // NOTE: it's not necessary to add a property change listener, 
since the ResourceId prop is immutable

+

+               }

+       catch (Exception e)

+       {

+          throw new javax.xml.rpc.JAXRPCException("There was a problem in 
initializing your resource properties.  Please check your init() method. Cause: 
" + e.getLocalizedMessage());

+       }

+

+

    }]]></source>

                        <p>

                                <img src="images/back.gif" alt="go to the 
previous step"/>

                                <a href="site:modhome">Back</a>

                                <img src="images/next.gif" alt="go to the next 
step"/>

-                               <a href="site:webapp">Next</a>

+                               <a href="site:modservice">Next</a>

                        </p>

                </section>

        </body>


Added: webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_service.xml
URL: 
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_service.xml?rev=226924&view=auto
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_service.xml 
(added)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_service.xml Mon 
Aug  1 18:56:11 2005
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>

+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"

+          "http://forrest.apache.org/dtd/document-v20.dtd";>

+<document>

+       <header>

+               <title>Modify the Service Class</title>

+       </header>

+       <body>

+               <section>

+                       <title>Introduction</title>

+                       <p>In this step of the tutorial, the generated Service 
class (<code>FilesystemService</code>) is modified to include an 
<code>updateOperationalStatus</code> method. 

+                       This method updates the <code>OperationalStatus</code> 
property whenever a <code>Mount</code> or <code>Unmount</code> operation is 
performed and publishes 

+                       a <code>ResourcePropertyValueChangeEvent</code> to the 
<code>OperationalStatus</code> notification topic. A client that subscribes to 
the 

+                       <code>OperationalStatus</code> notification topic 
receives a notification when this property changes.

+                       </p>

+               </section>

+               <section>

+                       <title>Modify the Service Class</title>

+                       <p>Open 
<code>WORK_DIR/generated/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemService.java</code>
 and

+                       add the following method:</p>

+                       <source><![CDATA[

+   public void 
updateOperationalStatus(OperationalStatusDocument.OperationalStatus.Enum 
newStatus)

+    {

+        NotificationProducerResource resource = 
(NotificationProducerResource)getResource();

+        org.apache.ws.resource.properties.ResourceProperty statusProp = 
resource.getResourcePropertySet().get(FilesystemPropertyQNames.OPERATIONALSTATUS);

+        
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.OperationalStatusDocument.OperationalStatus
 currentStatus = 
(org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.OperationalStatusDocument.OperationalStatus)
 statusProp.get(0);

+        if (!currentStatus.enumValue().equals(newStatus))

+        {

+            XmlObject oldStatus = 
org.apache.ws.util.XmlBeanUtils.copyXmlBean(currentStatus);

+            currentStatus.set(newStatus);

+            org.apache.ws.notification.topics.TopicSpace muwsTopicSpace = 
resource.getTopicSpaceSet().getTopicSpace(org.apache.ws.muws.v1_0.MuwsConstants.NSURI_MUWS_PART2_TOPICS);

+            
org.apache.ws.muws.v1_0.topics.impl.XmlBeansManagementEventTopicImpl 
statusTopic = 
(org.apache.ws.muws.v1_0.topics.impl.XmlBeansManagementEventTopicImpl) 
muwsTopicSpace.getTopic(org.apache.ws.muws.v1_0.capability.OperationalStatusCapability.TOPIC_NAME);

+            org.apache.ws.resource.properties.ResourcePropertyValueChangeEvent 
statusChangeEvent = new 
org.apache.ws.resource.properties.v2004_06.impl.XmlBeansResourcePropertyValueChangeEvent(new
 Object[]{oldStatus}, new Object[]{currentStatus});

+            statusTopic.propertyChanged(statusChangeEvent);  // publish the 
event

+        }

+        return;

+    }]]></source>

+                       <p>

+                               <img src="images/back.gif" alt="go to the 
previous step"/>

+                               <a href="site:modresource">Back</a>

+                               <img src="images/next.gif" alt="go to the next 
step"/>

+                               <a href="site:webapp">Next</a>

+                       </p>

+               </section>

+       </body>

+</document>


Modified: webservices/muse/trunk/src/site/content/xdocs/tutorial/test.xml
URL: 
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/site/content/xdocs/tutorial/test.xml?rev=226924&r1=226923&r2=226924&view=diff
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/test.xml (original)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/test.xml Mon Aug  1 
18:56:11 2005
@@ -22,12 +22,12 @@
                                <li>From a command prompt, change directories 
to <code>WORK_DIR</code>.</li>

                                <li>Run:

                                <source><![CDATA[

- ant -f soapclient.xml -Durl=http://localhost:8080/muse/services/filesystem 
-Dxml=INSTALL_DIR/examples/filesystem/requests/Subscribe_updateMountPointProp.soap]]></source>

+ ant -f soapclient.xml -Durl=http://localhost:8080/muse/services/filesystem 
-Dxml=INSTALL_DIR/examples/filesystem/requests/GetMultipleResourceProperties.soap]]></source>

                                Replace <code>INSTALL_DIR</code> in the 
<code>xml</code> property.</li>

                        </ol>

                        <p>You may also try other request messages in the 

                                <code>requests</code> directory.</p>

-                       <p>

+                       <p>

                                <img src="images/back.gif" alt="go to the 
previous step"/>

                                <a href="site:webapp">Back</a>

                        </p>


Modified: webservices/muse/trunk/src/site/content/xdocs/tutorial/webapp.xml
URL: 
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/site/content/xdocs/tutorial/webapp.xml?rev=226924&r1=226923&r2=226924&view=diff
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/webapp.xml (original)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/webapp.xml Mon Aug  
1 18:56:11 2005
@@ -21,17 +21,17 @@
                                <p>To compile and deploy the FileSystem 
service:</p>

                                <ol>

                                        <li>Copy 
<code>INSTALL_DIR/examples/filesystem/src/java/example</code> to 

-                                       
<code>WORK_DIR/generated/Filesystem/src/java</code>.</li>

-                                       <li>Using a text editor, open 
<code>WORK_DIR/generated/Filesystem/build.properties</code>.</li>

+                                       
<code>WORK_DIR/generated/filesystem/src/java</code>.</li>

+                                       <li>Using a text editor, open 
<code>WORK_DIR/generated/filesystem/build.properties</code>.</li>

                                        <li>Uncomment the 
<code>muse.webapp.dir</code> property and set it to the location where the MUSE 
Web application is installed. If you are using 

                                        Tomcat and have 
<code>CATALINA_HOME</code> set, you do not need to modify this property.</li>

                                        <li>Uncomment and modify the proxy 
settings if you require a proxy to connect to external Web sites.</li>

                                        <li>Save and close 
build.properties.</li>

-                                       <li>From a command prompt, change 
directories to <code>WORK_DIR/generated/Filesystem</code>.</li>

+                                       <li>From a command prompt, change 
directories to <code>WORK_DIR/generated/filesystem</code>.</li>

                                        <li>Run <code>ant compile 
deploy</code>. The service is compiled and deployed to the MUSE Web 
application.</li>

                                        <li>Start Tomcat if it is not already 
started.</li>

-                                       <li>Using a browser, go to <a 
href="http://doc-lab.americas.hpqcorp.net:8080/muse/services";>

-                                       
http://doc-lab.americas.hpqcorp.net:8080/muse/services</a> and verify that the 
filesystem service is deployed.

+                                       <li>Using a browser, go to <a 
href="http://localhost:8080/muse/services";>

+                                       http://localhost:8080/muse/services</a> 
and verify that the filesystem service is deployed.

                                        </li>

                                </ol>

                        </section>

@@ -39,12 +39,12 @@
                                <title>Compile and Deploy Host</title>

                                <p>To compile and deploy the Host service:</p>

                                <ol>

-                                       <li>Using a text editor, open 
<code>WORK_DIR/generated/Host/build.properties</code>.</li>

+                                       <li>Using a text editor, open 
<code>WORK_DIR/generated/host/build.properties</code>.</li>

                                        <li>Uncomment the 
<code>muse.webapp.dir</code> property and set it to the location where the MUSE 
Web application is installed. If you are using 

                                        Tomcat and have 
<code>CATALINA_HOME</code> set, you do not need to modify this property.</li>

                                        <li>Uncomment and modify the proxy 
settings if you require a proxy to connect to external Web sites.</li>

                                        <li>Save and close 
build.properties.</li>

-                                       <li>From a command prompt, change 
directories to <code>WORK_DIR/generated/Host</code>.</li>

+                                       <li>From a command prompt, change 
directories to <code>WORK_DIR/generated/host</code>.</li>

                                        <li>Run <code>ant compile 
deploy</code>. The service is compiled and deployed to the MUSE Web 
application.</li>

                                        <li>Using a text editor, open 
<code>TOMCAT_HOME/webapps/muse/WEB-INF/classes/jndi-config.xml</code>.</li>

                                        <li>From the <code><![CDATA[<service 
name="Host">]]></code> block, remove the 
<code>resourceIdentifierReferenceParameterName</code> 

@@ -52,14 +52,14 @@
                                        in the WS Address headers.</li>

                                        <li>Save and close jndi-config.xml.</li>

                                        <li>Restart Tomcat if it is already 
started.</li>

-                                       <li>Using a browser, go to <a 
href="http://localhost:8080/muse/servlet/AxisServlet";>

-                                       
http://localhost:8080/muse/servlet/AxisServlet</a> and verify that the host 
service is deployed.

+                                       <li>Using a browser, go to <a 
href="http://localhost:8080/muse/services";>

+                                       http://localhost:8080/muse/services</a> 
and verify that the host service is deployed.

                                        </li>

                                </ol>

                        </section>

                        <p>

                                <img src="images/back.gif" alt="go to the 
previous step"/>

-                               <a href="site:modresource">Back</a>

+                               <a href="site:modservice">Back</a>

                                <img src="images/next.gif" alt="go to the next 
step"/>

                                <a href="site:test">Next</a>

                        </p>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to