Author: jruzzi
Date: Fri Jul 22 16:02:33 2005
New Revision: 224416
URL: http://svn.apache.org/viewcvs?rev=224416&view=rev
Log:
updated tutorial for MUSE
Added:
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/setup.xml
Removed:
webservices/muse/trunk/src/site/content/xdocs/tutorial/callback.xml
webservices/muse/trunk/src/site/content/xdocs/tutorial/home.xml
webservices/muse/trunk/src/site/content/xdocs/tutorial/resource.xml
webservices/muse/trunk/src/site/content/xdocs/tutorial/service.xml
Modified:
webservices/muse/trunk/src/site/content/xdocs/tutorial/index.xml
webservices/muse/trunk/src/site/content/xdocs/tutorial/test.xml
webservices/muse/trunk/src/site/content/xdocs/tutorial/webapp.xml
webservices/muse/trunk/src/site/content/xdocs/tutorial/wsdl.xml
webservices/muse/trunk/src/site/content/xdocs/tutorial/wsdl2java.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=224416&r1=224415&r2=224416&view=diff
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/index.xml (original)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/index.xml Fri Jul 22
16:02:33 2005
@@ -8,39 +8,37 @@
<body>
<section>
<title>Creating and Deploying a MUWS Web Service</title>
- <p>This tutorial provides a step-by-step approach to
using Apache MUSE to create and deploy a MUWS-compliant Web service that
represents a UNIX file
- system. If you want to see a completed version of the
UNIX file system management Web service, see the
- <a href="site:quick">Quick Demonstration</a>.</p>
- <p>The process consists of the following steps:</p>
+ <p>This tutorial provides a step-by-step approach to
using Apache MUSE to create and deploy two MUWS-compliant Web services that
have a relationship. The Web
+ 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>
+ <p>The tutorial consists of the following steps:</p>
<ol>
<li>
- <a href="wsdl.html">Write the WSDL for
the service.</a>
+ <a href="setup.html">Create a Working
Directory</a>
</li>
<li>
- <a href="wsdl2java.html">Run the
Wsdl2Java tool on the WSDL.</a>
+ <a href="wsdl.html">Create MUWS
WSDLs</a>
</li>
<li>
- <a href="service.html">Create the
service class and add business logic to it.</a>
+ <a href="wsdl2java.html">Run the
Wsdl2Java Tool</a>
</li>
<li>
- <a href="resource.html">Create the
resource class which maintains state for a resource instance.</a>
+ <a href="mod_home.html">Modify the Home
Classes</a>
</li>
<li>
- <a href="callback.html">Create backend
callback objects for all non-static resource properties.</a>
+ <a href="mod_resource.html">Modify the
Resource Classes</a>
</li>
<li>
- <a href="home.html">Create the home
class and add instance lookup logic to it.</a>
+ <a href="webapp.html">Compile and
Deploy the Services</a>
</li>
<li>
- <a href="webapp.html">Deploy the
service to the web application.</a>
- </li>
- <li>
- <a href="test.html">Start Tomcat and
send some test requests to the service.</a>
+ <a href="test.html">Test the
Services</a>
</li>
</ol>
<p>
<img src="images/next.gif" alt="go to the next
step"/>
- <a href="site:wsdl">Next</a>
+ <a href="site:setup">Next</a>
</p>
</section>
</body>
Added: 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=224416&view=auto
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_home.xml (added)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_home.xml Fri Jul
22 16:02:33 2005
@@ -0,0 +1,73 @@
+<?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 Home Classes</title>
+ </header>
+ <body>
+ <section>
+ <title>Introduction</title>
+ <p>In this step of the tutorial, the generated Home
classes (<code>FilesystemHome</code> and <code>HostHome</code>) are modified to
include a
+ <code>getInstance</code> method. The Home 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>
+ </section>
+ <section>
+ <title>Modify the FileSytem Home Class</title>
+ <p>Open
<code>WORK_DIR/generated/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java</code>
and
+ replace the <code>public Resource getInstance(
ResourceContext resourceContext )</code> method with the following method:</p>
+ <source><![CDATA[ public Resource getInstance(
ResourceContext resourceContext )
+ throws ResourceException,
+ ResourceContextException,
+ ResourceUnknownException
+ {
+ ResourceKey key = resourceContext.getResourceKey();
+ FilesystemResource resource = null;
+ try
+ {
+ resource = (FilesystemResource)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 = (FilesystemResource)createInstance( key);
+ EndpointReference epr =
getEndpointReference(resourceContext.getBaseURL( ) + "/" +
getServiceName().getLocalPart() , key,
SPEC_NAMESPACE_SET.getAddressingNamespace());
+ resource.setEndpointReference(epr);
+ }
+ catch ( Exception e )
+ {
+ throw new ResourceException( e );
+ }
+ add( key, resource );
+ }
+ else
+ {
+ throw new ResourceUnknownException( id,
+ resourceContext.getServiceName() );
+ }
+ }
+ return resource;
+ }]]></source>
+ </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
+ replace the <code>public Resource getInstance(
ResourceContext resourceContext )</code> method with the following method:
+ </p>
+ <p>
+ <img src="images/back.gif" alt="go to the
previous step"/>
+ <a href="site:wsdl2java">Back</a>
+ <img src="images/next.gif" alt="go to the next
step"/>
+ <a href="site:modresource">Next</a>
+ </p>
+ </section>
+ </body>
+</document>
Added: 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=224416&view=auto
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_resource.xml
(added)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/mod_resource.xml Fri
Jul 22 16:02:33 2005
@@ -0,0 +1,170 @@
+<?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 Resource Classes</title>
+ </header>
+ <body>
+ <section>
+ <title>Introduction</title>
+ <p>In this step of the tutorial, the generated Resource
classes (<code>FilesystemResource</code> and <code>HostResource</code>) are
modified to include an
+ <code>init</code> method. The Resource class is the
stateful instance-representation of a Web service.The resource maintains the
resource
+ <code>id</code> and the
<code>ResourcePropertySet</code>. The resource <code>id</code> is the unique
identifier for an instance of your Web
+ service. It allows you to have multiple resource
instances, each with their own state, fronted by the same Web service. The
stateful properties are
+ represented by 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>If the resource supports notifications, this class
is also used to expose resource properties as notification topics and register
the exposed topics.
+ </p>
+ </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
+ 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;
+
+
+
+ /*
+ * This is where you should associate the backend instance with
+ * the resource instance for a given id.
+ */
+ example.filesystem.backend.FileSystem m_fileSystem = new
example.filesystem.backend.UnixFileSystem( m_id );
+
+ try{
+ /*
+ * Initialize each of our properties by calling
resourceProperty.add(propElem) and/or resourceProperty.setCallback(callback)...
+ */
+ resourceProperty = resourcePropertySet.get(
FilesystemPropertyQNames.DEVICESPECIALFILE );
+ DeviceSpecialFileDocument deviceDocXBean =
DeviceSpecialFileDocument.Factory.newInstance();
+ deviceDocXBean.setDeviceSpecialFile(
m_fileSystem.getDeviceSpecialFile() );
+ resourceProperty.add( deviceDocXBean );
+
+ resourceProperty = resourcePropertySet.get(
FilesystemPropertyQNames.TYPE );
+ TypeDocument typeDocXBean = TypeDocument.Factory.newInstance();
+ typeDocXBean.setType( m_fileSystem.getType() );
+ resourceProperty.add( typeDocXBean );
+
+ BackupFrequencyDocument backupDocXBean =
BackupFrequencyDocument.Factory.newInstance();
+ backupDocXBean.setBackupFrequency( m_fileSystem.getBackupFrequency() );
+ resourceProperty = resourcePropertySet.get(
FilesystemPropertyQNames.BACKUPFREQUENCY );
+ resourceProperty.add( backupDocXBean );
+ resourceProperty.setCallback( new
example.filesystem.callback.BackupFrequencyCallback( m_fileSystem ) );
+
+ CommentDocument commentDocXBean =
CommentDocument.Factory.newInstance();
+ commentDocXBean.setComment( m_fileSystem.getComment() );
+ resourceProperty = resourcePropertySet.get(
FilesystemPropertyQNames.COMMENT );
+ resourceProperty.add( commentDocXBean );
+ resourceProperty.setCallback( new
example.filesystem.callback.CommentCallback( m_fileSystem ) );
+
+ FsckPassNumberDocument fsckDocXBean =
FsckPassNumberDocument.Factory.newInstance();
+ fsckDocXBean.setFsckPassNumber( m_fileSystem.getFsckPassNumber() );
+ resourceProperty = resourcePropertySet.get(
FilesystemPropertyQNames.FSCKPASSNUMBER );
+ resourceProperty.add( fsckDocXBean );
+ resourceProperty.setCallback( new
example.filesystem.callback.FsckPassNumberCallback( m_fileSystem ) );
+
+ MountPointDirectoryDocument mountPointDocXBean =
MountPointDirectoryDocument.Factory.newInstance();
+ mountPointDocXBean.setMountPointDirectory(
m_fileSystem.getMountPoint() );
+ resourceProperty = resourcePropertySet.get(
FilesystemPropertyQNames.MOUNTPOINTDIRECTORY );
+ resourceProperty.add( mountPointDocXBean );
+ resourceProperty.setCallback( new
example.filesystem.callback.MountPointCallback( m_fileSystem ) );
+
+ OptionsDocument optionsDocXBean =
+ OptionsDocument.Factory.newInstance();
+ org.apache.ws.resource.example.filesystem.OptionsDocument.Options
options =
+ optionsDocXBean.addNewOptions();
+ java.util.List backendOptions =
+ m_fileSystem.getOptions();
+ for ( int i = 0; i < backendOptions.size(); i++ )
+ {
+ options.addOption( (String) backendOptions.get( i ) );
+ }
+
+ resourceProperty = resourcePropertySet.get(
FilesystemPropertyQNames.OPTIONS );
+ resourceProperty.add( optionsDocXBean );
+ resourceProperty.setCallback( new
example.filesystem.callback.OptionsCallback( m_fileSystem ) );
+ }
+ 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());
+ }
+ // Resource Property
{http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd}TerminationTime
is implemented by the framework.
+ // Resource Property
{http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd}CurrentTime
is implemented by the framework.
+ // Resource Property
{http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd}FixedTopicSet
is implemented by the framework.
+ // Resource Property
{http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd}Topic
is implemented by the framework.
+ // Resource Property
{http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd}TopicExpressionDialects
is implemented by the framework.
+
+
+
+ /**
+ * This method enables the ResourceTermination Topic for notifications
+ * about this resource's termination. If you would not like this
+ * behaviour either comment or remove the line of code.
+ */
+ try
+ {
+
org.apache.ws.notification.topics.util.TopicUtils.addResourceTerminationTopic(
getTopicSpaceSet(), this, SPEC_NAMESPACE_SET );
+ }
+ catch (Exception e)
+ {
+ throw new javax.xml.rpc.JAXRPCException("Unable to init the
ResourceTermination topic. Cause: " + e.getLocalizedMessage(), e);
+ }
+ /**
+ * This method call will make all resource properties be exposed
+ * as Topics. If you would like to change that behaviour you can
+ * call TopicUtils.addResourcePropertyValueChangeTopic for each
+ * Topic you'd like to expose property change notifications for.
+ */
+ try
+ {
+
org.apache.ws.notification.topics.util.TopicUtils.addResourcePropertyValueChangeTopics(
getResourcePropertySet(), getTopicSpaceSet() );
+ }
+ catch (Exception e)
+ {
+ throw new javax.xml.rpc.JAXRPCException("Unable to init the
ResourceProperty Changed topics. Cause: " + e.getLocalizedMessage(), e);
+ }
+
+ /**
+ * Initializes the Topic, TopicExpressionDialects and FixedTopicSet
resource properties
+ *
+ * </br>
+ * <strong>NOTE this MUST be called last in the Resource.init() method to
ensure all topics get registered</strong>
+ * </br>
+ * FixedTopicSet will be set based on the value returned from the [EMAIL
PROTECTED] TopicSpaceSet#isFixed()} method.
+ * </br>
+ * Topic will have all root topics in the TopicSpaceSet, set to Simple
dialect AND all child topics set ot
+ * Concrete dialect.
+ * </br>
+ *
+ * TopicExpressionDialects will be set to the engine's known Topic
Dialects acquired from the TopicExpressionEngine
+ *
+ * @param topicSpaceSet
+ * @param propSet
+ */
+
org.apache.ws.notification.topics.util.TopicUtils.initNotificationProducerProperties(getTopicSpaceSet()
, getResourcePropertySet());
+ }]]></source>
+ </section>
+ <section>
+ <title>Modify the Host Resource Class</title>
+ <p>Open
<code>WORK_DIR/generated/host/src/java/org/apache/ws/resource/example/host/HostResource.java</code>
and
+ replace the <code>public void init()</code> method with
the following method:
+ </p>
+ <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>
+ </p>
+ </section>
+ </body>
+</document>
Added: webservices/muse/trunk/src/site/content/xdocs/tutorial/setup.xml
URL:
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/site/content/xdocs/tutorial/setup.xml?rev=224416&view=auto
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/setup.xml (added)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/setup.xml Fri Jul 22
16:02:33 2005
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+ "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+ <header>
+ <title>Create a Working Directory</title>
+ </header>
+ <body>
+ <section>
+ <title>Introduction</title>
+ <p>In this step of the tutorial, a development working
directory is created and populated with several template files.
+ The template files help facilitate the development
process. There is a MUWS-based WSDL template, an ANT build script, and a SOAP
client. The templates
+ are discussed in further detail throughout the
tutorial. It is a good idea to start a MUWS development project by creating a
working directory and using the
+ templates.
+ </p>
+ </section>
+ <section>
+ <title>Create and Populate a Working Directory</title>
+ <p>To create a working directory for the filesystem
example:
+ </p>
+ <ol>
+ <li>Create a directory on your computer
(e.g.,<code> /filesystem</code>). This directory will be referred to as
<code>WORK_DIR</code>.</li>
+ <li>Copy all the files in
<code>INSTALL_DIR/template</code> to <code>WORK_DIR</code>.</li>
+ <li>Using a text editor, open
<code>WORK_DIR/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>
+ </ol>
+ <p>
+ <img src="images/back.gif" alt="go to the
previous step"/>
+ <a href="site:tut">Back</a>
+ <img src="images/next.gif" alt="go to the next
step"/>
+ <a href="site:wsdl">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=224416&r1=224415&r2=224416&view=diff
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/test.xml (original)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/test.xml Fri Jul 22
16:02:33 2005
@@ -3,11 +3,29 @@
"http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
- <title>Testing Your Service</title>
+ <title>Test the Services</title>
</header>
<body>
<section id="intro">
- <title>TODO</title>
+ <title>Introduction</title>
+ <p>In this final step of the tutorial, a SOAP client is
used to send requests to the filesystem service deployed in Tomcat. The
requests are located in
+ <code>INSTALL_DIR/examples/filesystem/requests</code>.
The client is used from an Ant script to send the requests. The scripts can be
+ leveraged in order to test your own services as well.
Detailed instructions for using the SOAP client is provided in the
+ <a href="site:client">Developer Guide</a>.
+ </p>
+ </section>
+ <section id="testing">
+ <title>Sending SOAP Requests</title>
+ <p>To send a request to the filesystem service:
+ </p>
+ <ol>
+ <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>
+ Replace <code>INSTALL_DIR</code> in the
<code>xml</code> property. You should also try other request messages in the
+ <code>requests</code> directory.</li>
+ </ol>
<p>
<img src="images/back.gif" alt="go to the
previous step"/>
<a href="site:webapp">Back</a>
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=224416&r1=224415&r2=224416&view=diff
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/webapp.xml (original)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/webapp.xml Fri Jul
22 16:02:33 2005
@@ -3,14 +3,61 @@
"http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
- <title>Deploy the service to the Web Application</title>
+ <title>Compile and Deploy the Services</title>
</header>
<body>
<section id="intro">
- <title>TODO</title>
+ <title>Introduction</title>
+ <p>In this step of the tutorial, the example code and
the generated classes are compiled and deployed
+ to the MUSE Web application. An Ant script is provided
for compiling and deploying. Detailed instructions for
+ using the Ant script are provided in the <a
href="site:developer">Developer Guide</a>.
+ </p>
+ </section>
+ <section>
+ <title>Run the Compile/Deploy Ant Script</title>
+ <p>Ant scripts are automatically generated for both the
filesystem example and the host example. Each Ant script must be run
separately.</p>
+ <section>
+ <title>Compile and Deploy FileSystem</title>
+ <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>
+ <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>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/servlet/AxisServlet">
+
http://doc-lab.americas.hpqcorp.net:8080/muse/servlet/AxisServlet</a> and
verify that the filesystem service is deployed.
+ </li>
+ </ol>
+ </section>
+ <section>
+ <title>Compile and Deploy Host</title>
+ <p>To compile and deploy the Host service:</p>
+ <ol>
+ <li>Copy
<code>INSTALL_DIR/examples/host/src/java/example</code> to
+
<code>WORK_DIR/generated/host/src/java</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>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://localhost:8080/muse/servlet/AxisServlet">
+
http://localhost:8080/muse/servlet/AxisServlet</a> and verify that the host
service is deployed.
+ </li>
+ </ol>
+ </section>
+ <note>Please refer to the Tomcat and Axis documentation
if you do not know how to start Tomcat.</note>
<p>
<img src="images/back.gif" alt="go to the
previous step"/>
- <a href="site:home">Back</a>
+ <a href="site:modresource">Back</a>
<img src="images/next.gif" alt="go to the next
step"/>
<a href="site:test">Next</a>
</p>
Modified: webservices/muse/trunk/src/site/content/xdocs/tutorial/wsdl.xml
URL:
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/site/content/xdocs/tutorial/wsdl.xml?rev=224416&r1=224415&r2=224416&view=diff
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/wsdl.xml (original)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/wsdl.xml Fri Jul 22
16:02:33 2005
@@ -3,17 +3,36 @@
"http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
- <title>Viewing the WSDL</title>
+ <title>Create MUWS WSDLs</title>
</header>
<body>
<section>
- <title>TODO</title>
- <p>
- <img src="images/back.gif" alt="go to the previous
step"/>
- <a href="site:tut">Back</a>
- <img src="images/next.gif" alt="go to the next step"/>
- <a href="site:wsdl2java">Next</a>
- </p>
+ <title>Introduction</title>
+ <p>In this step of the tutorial, MUWS-compliant WSDLs
are created for the filesystem resource and the host resource. In the interest
of time, the
+ <code>FileSystem.wsdl</code>, and
<code>host.wsdl</code> have already been created for use in this tutorial.
+ </p>
+ <p> The WSDLs were created using the MUWS WSDL
template (<code>WORK_DIR/_TEMPLATE_.wsdl</code>). Use the template to
+ expedite the WSDL creation process for a resource. It
contains detailed instructions and the default operations that
+ are required by a MUWS-compliant WSDL. In addition, the
template contains sections for adding custom operations. It is
+ good practice to use the template if you are not
familiar with the WSDM, WSRF, or WSN family of specifications. Detailed
instructions for
+ composing the WSDLs using the template are provided in
the <a href="site:compose">Developer Guide</a>.
+ </p>
+ <p>Both the FileSystem WSDL and Host WSDL are an
example of a MUWS WSDL that contains a single portType
+ (<code>FileSystemPortType</code> and
<code>HostPortType</code> respectively). The FileSystem WSDL exposes optional
portTypes defined by the WSRF-RP,
+ WSRF-RL, WSN-BN, and MUWS. The WSDL also defines two
custom operations, <code>Mount</code> and <code>Unmount</code>, as well as
corresponding custom
+ resource properties. The Host WSDL is very basic and
only contains a single operation from WSRF-RP (getResourceProperty). The host
resource is a simple way
+ to show how different resources can be related. Most of
the interaction with these WS Resources is done through FileSystem.
+ </p>
+ </section>
+ <section>
+ <title>Copy the WSDLs</title>
+ <p>Copy
<code>INSTALL_DIR/examples/filesystem/src/wsdl/FileSystem.wsdl</code> and
<code>Host.wsdl</code> to <code>WORK_DIR</code>.</p>
+ <p>
+ <img src="images/back.gif" alt="go to the
previous step"/>
+ <a href="site:setup">Back</a>
+ <img src="images/next.gif" alt="go to the next
step"/>
+ <a href="site:wsdl2java">Next</a>
+ </p>
</section>
</body>
</document>
Modified: webservices/muse/trunk/src/site/content/xdocs/tutorial/wsdl2java.xml
URL:
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/site/content/xdocs/tutorial/wsdl2java.xml?rev=224416&r1=224415&r2=224416&view=diff
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/wsdl2java.xml
(original)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/wsdl2java.xml Fri
Jul 22 16:02:33 2005
@@ -3,16 +3,46 @@
"http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
- <title>Running the WsnWsdl2Java Tool</title>
+ <title>Run the Wsdl2Java Tool</title>
</header>
<body>
<section>
- <title>TODO</title>
+ <title>Introduction</title>
+ <p>In this step of the tutorial, the MUWS Wsdl2Java
tool is used to generate a set of artifacts for the filesystem and host
example. The tool takes any number of WSDL files
+ as its input and outputs the following artificats for
each WSDL:
+ </p>
+ <ul>
+ <li>
+ <a href="ext:xmlbeans.apache.org">XMLBeans</a>
for all XML Schema types and elements defined in the types section of the
WSDL</li>
+ <li>an abstract base Resource class</li>
+ <li>an abstract base Service class</li>
+ <li>an abstract base Home class</li>
+ <li>a Resource class</li>
+ <li>a Service class</li>
+ <li>a Home class</li>
+ <li>a CustomOperationsPortType interface</li>
+ <li>a PropertyQNames interface</li>
+ <li>an Axis deploy.wsdd file</li>
+ <li>a jndi-config.xml file</li>
+ </ul>
+ <note>The abstract classes and interfaces should NEVER
be modified.</note>
+ </section>
+ <section>
+ <title>Generating the Artifacts</title>
+ <p>The Ant script (<code>WORK_DIR/build.xml</code>)
contains a target for the Wsdl2Java tool. To generate the artifacts for the
+ filesystem and host example:</p>
+ <ol>
+ <li>From a command prompt, change directories
to <code>WORK_DIR</code>.</li>
+ <li>Enter the following command: <code>ant
generate</code>
+ </li>
+ </ol>
+ <p>The artifacts are generated and placed in
<code>WORK_DIR/generated</code>. For more information about the
+ WSDL2Java tool and the generated artificats, see <a
href="site:tool">Using the WSDL2Java Tool</a> in the Developer's Guide.</p>
<p>
<img src="images/back.gif" alt="go to the
previous step"/>
<a href="site:wsdl">Back</a>
<img src="images/next.gif" alt="go to the next
step"/>
- <a href="site:service">Next</a>
+ <a href="site:modhome">Next</a>
</p>
</section>
</body>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]