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/13 01:17:30 UTC
svn commit: r216046 - in
/webservices/pubscribe/trunk/src/site/content/xdocs/tutorial: callback.xml
home.xml index.xml mod_home.xml mod_resource.xml resource.xml service.xml
setup.xml test.xml webapp.xml wsdl.xml wsdl2java.xml
Author: jruzzi
Date: Tue Jul 12 16:17:29 2005
New Revision: 216046
URL: http://svn.apache.org/viewcvs?rev=216046&view=rev
Log:
updated tutorial to match WSRF
Added:
webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/mod_home.xml
webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/mod_resource.xml
webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/setup.xml
Removed:
webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/callback.xml
webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/home.xml
webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/resource.xml
webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/service.xml
Modified:
webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/index.xml
webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/test.xml
webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/webapp.xml
webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/wsdl.xml
webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/wsdl2java.xml
Modified: webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/index.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/index.xml?rev=216046&r1=216045&r2=216046&view=diff
==============================================================================
--- webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/index.xml (original)
+++ webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/index.xml Tue Jul 12 16:17:29 2005
@@ -3,44 +3,42 @@
"http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
- <title>Apache WSRF Tutorial</title>
+ <title>Pubscribe Tutorial</title>
</header>
<body>
<section>
- <title>Creating and Deploying a WSRF Web Service that Includes Notifications</title>
+ <title>Creating and Deploying a WSRF/WSN Web Service</title>
<p>This tutorial provides a step-by-step approach to using Apache Pubscribe to create and deploy a WSRF-compliant Web service that includes
- notifications. The Web service represents a UNIX file system. If you want to see a completed version of the UNIX file system Web service, see the
+ notifications based on WSN. The Web service represents a UNIX file system. If you want to see a completed version of the UNIX file system Web service, see the
<a href="site:quick">Quick Demonstration</a>.</p>
+ <note>To complete the tutorial, you must <a href="site:installation">install</a> the distribution.</note>
<p>The process 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 a WSRF/WSN WSDL</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 Class</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 Class</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 Service</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 Service</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/pubscribe/trunk/src/site/content/xdocs/tutorial/mod_home.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/mod_home.xml?rev=216046&view=auto
==============================================================================
--- webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/mod_home.xml (added)
+++ webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/mod_home.xml Tue Jul 12 16:17:29 2005
@@ -0,0 +1,67 @@
+<?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 Class</title>
+ </header>
+ <body>
+ <section>
+ <title>Introduction</title>
+ <p>In this step of the tutorial, the generated Home class (<code>FilesystemHome</code>) is 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 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>
+ <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/pubscribe/trunk/src/site/content/xdocs/tutorial/mod_resource.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/mod_resource.xml?rev=216046&view=auto
==============================================================================
--- webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/mod_resource.xml (added)
+++ webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/mod_resource.xml Tue Jul 12 16:17:29 2005
@@ -0,0 +1,164 @@
+<?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 Class</title>
+ </header>
+ <body>
+ <section>
+ <title>Introduction</title>
+ <p>In this step of the tutorial, the generated Resource class (<code>FilesystemResource</code>) is modified to include an <code>init</code>
+ method. The Resource class is the stateful instance-representation of your of your 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>In addition, this class is used to expose resource properties as notification topics and register the exposed topics.
+ </p>
+ </section>
+ <section>
+ <title>Modify the 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 {@see 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>
+ <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/pubscribe/trunk/src/site/content/xdocs/tutorial/setup.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/setup.xml?rev=216046&view=auto
==============================================================================
--- webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/setup.xml (added)
+++ webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/setup.xml Tue Jul 12 16:17:29 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 WSRF/WSN-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 Pubscribe 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>wsrf.webapp.dir</code> property and set it to the location where the WSRF 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/pubscribe/trunk/src/site/content/xdocs/tutorial/test.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/test.xml?rev=216046&r1=216045&r2=216046&view=diff
==============================================================================
--- webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/test.xml (original)
+++ webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/test.xml Tue Jul 12 16:17:29 2005
@@ -3,11 +3,29 @@
"http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
- <title>Testing Your Service</title>
+ <title>Test the Service</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/pubscribe/services/filesystem -Dxml=INSTALL_DIR/examples/filesystem/requests/GetCurrentMessage.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/pubscribe/trunk/src/site/content/xdocs/tutorial/webapp.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/webapp.xml?rev=216046&r1=216045&r2=216046&view=diff
==============================================================================
--- webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/webapp.xml (original)
+++ webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/webapp.xml Tue Jul 12 16:17:29 2005
@@ -3,14 +3,38 @@
"http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
- <title>Deploy the service to the Web Application</title>
+ <title>Compile and Deploy the Service</title>
</header>
<body>
<section id="intro">
- <title>TODO</title>
+ <title>Introduction</title>
+ <p>In this step of the tutorial, the filesystem example code and the generated classes are compiled and deployed
+ to the Pubscribe 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:deploy">Developer Guide</a>.
+ </p>
+ </section>
+ <section>
+ <title>Run the Compile/Deploy Ant Script</title>
+ <p>To compile and deploy the 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>pubscribe.webapp.dir</code> property and set it to the location where the Pubscribe 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 Pubscribe 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/pubscribe/servlet/AxisServlet">
+ http://doc-lab.americas.hpqcorp.net:8080/pubscribe/servlet/AxisServlet</a> and verify that the filesystem service is deployed.
+ </li>
+ </ol>
+ <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/pubscribe/trunk/src/site/content/xdocs/tutorial/wsdl.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/wsdl.xml?rev=216046&r1=216045&r2=216046&view=diff
==============================================================================
--- webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/wsdl.xml (original)
+++ webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/wsdl.xml Tue Jul 12 16:17:29 2005
@@ -3,17 +3,35 @@
"http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
- <title>Viewing the WSDL</title>
+ <title>Create a WSRF/WSN WSDL</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, a WSRF/WSN-compliant WSDL is created for the filesystem resource. In the interest of time, the
+ <code>FileSystem.wsdl</code> has already been created for use in this tutorial.
+ </p>
+ <p> The WSDL was created using the WSRF/WSN 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 WSRF/WSN-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 WSRF or WSN family of specifications. Detailed instructions for
+ composing a WSRF/WSN-compliant WSDL using the template are provided in the <a href="site:compose">Developer Guide</a>.
+ </p>
+ <p>The FileSystem WSDL is an example of a WSRF/WSN WSDL that contains a single portType
+ (<code>FileSystemPortType</code>), which exposes all of the optional portTypes defined by the WSRF-RP, WSRF-RL, and WSN-BN
+ specifications. It also defines two custom operations, <code>Mount</code> and <code>Unmount</code>, and a group of
+ custom resource properties.
+ </p>
+ </section>
+ <section>
+ <title>Copy the FileSystem WSDL</title>
+ <p>Copy <code>INSTALL_DIR/examples/filesystem/src/wsdl/FileSystem.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/pubscribe/trunk/src/site/content/xdocs/tutorial/wsdl2java.xml
URL: http://svn.apache.org/viewcvs/webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/wsdl2java.xml?rev=216046&r1=216045&r2=216046&view=diff
==============================================================================
--- webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/wsdl2java.xml (original)
+++ webservices/pubscribe/trunk/src/site/content/xdocs/tutorial/wsdl2java.xml Tue Jul 12 16:17:29 2005
@@ -3,16 +3,45 @@
"http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
- <title>Running the Wsdl2Java 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 Pubscribe Wsdl2Java tool is used to generate a set of artifacts for the filesystem example. The tool takes a WSDL
+ as its input and outputs the following artificats:
+ </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>a Resource class</li>
+ <li>an abstract base Service 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 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>