You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by jr...@apache.org on 2005/07/28 19:01:07 UTC
svn commit: r225823 - in
/webservices/muse/trunk/src/site/content/xdocs/tutorial: mod_home.xml
mod_resource.xml webapp.xml
Author: jruzzi
Date: Thu Jul 28 10:01:05 2005
New Revision: 225823
URL: http://svn.apache.org/viewcvs?rev=225823&view=rev
Log:
updated content
Modified:
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/webapp.xml
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=225823&r1=225822&r2=225823&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 Thu Jul 28 10:01:05 2005
@@ -14,9 +14,10 @@
</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
+ <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";
+ <source><![CDATA[
+ private static final String LVOL1_ID = "/dev/vg00/lvol1";
private static final String LVOL2_ID = "/dev/vg00/lvol2";
/**
@@ -29,16 +30,16 @@
super.init();
FilesystemResource lvol1Resource = (FilesystemResource) createInstance( LVOL1_ID );
add( lvol1Resource );
- FilesystemResource lvol2Resource = (FilesystemResource) createInstance( LVOL1_ID );
+ FilesystemResource lvol2Resource = (FilesystemResource) createInstance( LVOL2_ID );
add( lvol2Resource );
}]]></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
+ <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[ public void init() throws Exception
+ <source><![CDATA[public void init() throws Exception
{
super.init();
// You may create and add any known resource instances here.
@@ -48,8 +49,7 @@
HostResource host = (HostResource) createInstance( null );
add( host );
- }
- ]]></source>
+ } ]]></source>
<p>
<img src="images/back.gif" alt="go to the previous step"/>
<a href="site:wsdl2java">Back</a>
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=225823&r1=225822&r2=225823&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 Thu Jul 28 10:01:05 2005
@@ -25,9 +25,18 @@
</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 methods:</p>
- <source><![CDATA[ public void init()
+ <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 below.</p>
+ <source><![CDATA[
+ private static final String HOST_HOME_LOCATION =
+ org.apache.ws.resource.JndiConstants.CONTEXT_NAME_SERVICES + "/Host/" + org.apache.ws.resource.JndiConstants.ATOMIC_NAME_HOME;
+
+ private example.filesystem.backend.FileSystem m_filesystem;
+
+ /**
+ * Initializes this resource's state (properties, etc.).
+ */
+ public void init()
{
super.init();
@@ -36,24 +45,24 @@
/*
* Add MUWS "capability topics" to the topic set.
*/
- ManagementEventTopic identityCapabilityTopic;
- ManagementEventTopic manageabilityCharacteristicsCapabilityTopic;
- ManagementEventTopic operationalStatusCapabilityTopic;
- ManagementEventTopic relationshipsCapabilityTopic;
+ org.apache.ws.muws.v1_0.topics.ManagementEventTopic identityCapabilityTopic;
+ org.apache.ws.muws.v1_0.topics.ManagementEventTopic manageabilityCharacteristicsCapabilityTopic;
+ org.apache.ws.muws.v1_0.topics.ManagementEventTopic operationalStatusCapabilityTopic;
+ org.apache.ws.muws.v1_0.topics.ManagementEventTopic relationshipsCapabilityTopic;
try
{
- TopicSpace muwsTopicSpace = new TopicSpaceImpl( MuwsConstants.NSURI_MUWS_PART2_TOPICS );
+ org.apache.ws.notification.topics.TopicSpace muwsTopicSpace = new org.apache.ws.notification.topics.impl.TopicSpaceImpl( org.apache.ws.muws.v1_0.MuwsConstants.NSURI_MUWS_PART2_TOPICS );
getTopicSpaceSet().addTopicSpace( muwsTopicSpace );
- identityCapabilityTopic = new XmlBeansManagementEventTopicImpl( IdentityCapability.TOPIC_NAME );
+ identityCapabilityTopic = new org.apache.ws.muws.v1_0.topics.impl.XmlBeansManagementEventTopicImpl( org.apache.ws.muws.v1_0.capability.IdentityCapability.TOPIC_NAME );
muwsTopicSpace.addTopic( identityCapabilityTopic );
- manageabilityCharacteristicsCapabilityTopic = new XmlBeansManagementEventTopicImpl(
- ManageabilityCharacteristicsCapability.TOPIC_NAME );
+ manageabilityCharacteristicsCapabilityTopic = new org.apache.ws.muws.v1_0.topics.impl.XmlBeansManagementEventTopicImpl(
+ org.apache.ws.muws.v1_0.capability.ManageabilityCharacteristicsCapability.TOPIC_NAME );
muwsTopicSpace.addTopic( manageabilityCharacteristicsCapabilityTopic );
- operationalStatusCapabilityTopic = new XmlBeansManagementEventTopicImpl(
- OperationalStatusCapability.TOPIC_NAME );
+ operationalStatusCapabilityTopic = new org.apache.ws.muws.v1_0.topics.impl.XmlBeansManagementEventTopicImpl(
+ org.apache.ws.muws.v1_0.capability.OperationalStatusCapability.TOPIC_NAME );
muwsTopicSpace.addTopic( operationalStatusCapabilityTopic );
- relationshipsCapabilityTopic = new XmlBeansManagementEventTopicImpl( RelationshipsCapability.TOPIC_NAME );
+ relationshipsCapabilityTopic = new org.apache.ws.muws.v1_0.topics.impl.XmlBeansManagementEventTopicImpl( org.apache.ws.muws.v1_0.capability.RelationshipsCapability.TOPIC_NAME );
muwsTopicSpace.addTopic( relationshipsCapabilityTopic );
}
catch ( Exception e )
@@ -122,33 +131,33 @@
*/
// 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 ResourceIdResourcePropertyCallback( this ) );
+ 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
// init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd}ManageabilityCapability resource property
resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.MANAGEABILITYCAPABILITY );
// add property element for MUWS Identity capability...
- ManageabilityCapabilityDocument identityCapabilityPropElem = ManageabilityCapabilityDocument.Factory.newInstance();
- identityCapabilityPropElem.setManageabilityCapability( IdentityCapability.URI );
+ org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument identityCapabilityPropElem = org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument.Factory.newInstance();
+ identityCapabilityPropElem.setManageabilityCapability( org.apache.ws.muws.v1_0.capability.IdentityCapability.URI );
resourceProperty.add( identityCapabilityPropElem );
// add property element for MUWS ManageabilityCharacteristics capability...
- ManageabilityCapabilityDocument manageabilityCharacteristicsCapabilityPropElem = ManageabilityCapabilityDocument.Factory.newInstance();
+ org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument manageabilityCharacteristicsCapabilityPropElem = org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument.Factory.newInstance();
manageabilityCharacteristicsCapabilityPropElem.setManageabilityCapability(
- ManageabilityCharacteristicsCapability.URI );
+ org.apache.ws.muws.v1_0.capability.ManageabilityCharacteristicsCapability.URI );
resourceProperty.add( manageabilityCharacteristicsCapabilityPropElem );
// add property element for MUWS OperationalStatus capability...
- ManageabilityCapabilityDocument operationalStatusCapabilityPropElem = ManageabilityCapabilityDocument.Factory.newInstance();
- operationalStatusCapabilityPropElem.setManageabilityCapability( OperationalStatusCapability.URI );
+ org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument operationalStatusCapabilityPropElem = org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument.Factory.newInstance();
+ operationalStatusCapabilityPropElem.setManageabilityCapability( org.apache.ws.muws.v1_0.capability.OperationalStatusCapability.URI );
resourceProperty.add( operationalStatusCapabilityPropElem );
// add property element for MUWS Relationships capability...
- ManageabilityCapabilityDocument relationshipsCapabilityPropElem = ManageabilityCapabilityDocument.Factory.newInstance();
- relationshipsCapabilityPropElem.setManageabilityCapability( RelationshipsCapability.URI );
+ org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument relationshipsCapabilityPropElem = org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument.Factory.newInstance();
+ relationshipsCapabilityPropElem.setManageabilityCapability( org.apache.ws.muws.v1_0.capability.RelationshipsCapability.URI );
resourceProperty.add( relationshipsCapabilityPropElem );
// NOTE: it's not necessary to add a property change listener, since the ManageabilityCapability prop is immutable
// init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}OperationalStatus resource property
resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.OPERATIONALSTATUS );
- resourceProperty.setCallback( new OperationalStatusCallback( m_filesystem ) );
+ resourceProperty.setCallback( new example.filesystem.callback.OperationalStatusCallback( m_filesystem ) );
resourceProperty.addChangeListener( operationalStatusCapabilityTopic ); // add for property-value-changed management events
// init the {http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}Relationship resource property
@@ -157,30 +166,30 @@
/*
* Create the relationship bean...
*/
- RelationshipType relationshipType = null;
+ org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipType relationshipType = null;
relationshipType = prop_relationship.addNewRelationship();
- RelationshipTypeType relationshipTypeType = relationshipType.addNewType();
- XmlBeanUtils.addChildElement( relationshipTypeType, new QName( "http://myns.com/", "ContainedBy", "myns" ) );
+ 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" ) );
- RelationshipParticipantType relationshipParticipantType = relationshipType.addNewParticipant();
- ResourceProperty resourceIdProp = resourcePropertySet.get( FilesystemPropertyQNames.RESOURCEID );
- XmlAnyURI resourceId = (XmlAnyURI) resourceIdProp.get( 0 );
+ 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 );
relationshipParticipantType.setResourceId( resourceId.getStringValue() );
relationshipParticipantType.setRole( "urn:containee" );
// NOTE: the below line assumes that the Filesystem resource's EndpointReference field has been initialized
- EndpointReferenceType filesystemReference = (EndpointReferenceType) ((XmlBeansEndpointReference)getEndpointReference()).getXmlObject( Constants.NS_URI_ADDRESSING_2004_08 );
- relationshipParticipantType.setManageabilityEndpointReferenceArray( new EndpointReferenceType[] { filesystemReference } );
+ org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType filesystemReference = (org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType) ((org.apache.ws.addressing.XmlBeansEndpointReference)getEndpointReference()).getXmlObject( org.apache.ws.addressing.v2004_08_10.AddressingConstants.NSURI_ADDRESSING_SCHEMA );
+ relationshipParticipantType.setManageabilityEndpointReferenceArray( new org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType[] { filesystemReference } );
- RelationshipParticipantType relationshipParticipantType2 = relationshipType.addNewParticipant();
- ResourceHome hostHome = (ResourceHome) new InitialContext( ).lookup( HOST_HOME_LOCATION );
- PropertiesResource host = (PropertiesResource) hostHome.find( null ); // host is a singleton resource w/ a null resource identifier
- resourceIdProp = host.getResourcePropertySet().get( IdentityCapability.PROP_NAME_RESOURCE_ID );
- resourceId = (XmlAnyURI) resourceIdProp.get( 0 );
+ org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipParticipantType relationshipParticipantType2 = relationshipType.addNewParticipant();
+ org.apache.ws.resource.ResourceHome hostHome = (org.apache.ws.resource.ResourceHome) new javax.naming.InitialContext( ).lookup( HOST_HOME_LOCATION );
+ org.apache.ws.resource.PropertiesResource host = (org.apache.ws.resource.PropertiesResource) hostHome.find( null ); // host is a singleton resource w/ a null resource identifier
+ resourceIdProp = host.getResourcePropertySet().get( org.apache.ws.muws.v1_0.capability.IdentityCapability.PROP_NAME_RESOURCE_ID );
+ resourceId = (org.apache.xmlbeans.XmlAnyURI) resourceIdProp.get( 0 );
relationshipParticipantType2.setResourceId( resourceId.getStringValue() );
relationshipParticipantType2.setRole( "urn:container" );
// NOTE: the below line assumes that the Host resource's EndpointReference field has been initialized
- EndpointReferenceType hostReference = (EndpointReferenceType) ((XmlBeansEndpointReference)host.getEndpointReference()).getXmlObject( Constants.NS_URI_ADDRESSING_2004_08 );
- relationshipParticipantType.setManageabilityEndpointReferenceArray( new EndpointReferenceType[] { hostReference } );
+ org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType hostReference = (org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType) ((org.apache.ws.addressing.XmlBeansEndpointReference)host.getEndpointReference()).getXmlObject( org.apache.ws.addressing.v2004_08_10.AddressingConstants.NSURI_ADDRESSING_SCHEMA );
+ relationshipParticipantType.setManageabilityEndpointReferenceArray( new org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType[] { hostReference } );
resourceProperty.add( prop_relationship );
resourceProperty.addChangeListener( relationshipsCapabilityTopic ); // add for property-value-changed management events
@@ -269,32 +278,28 @@
<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>
- <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( FilesystemPropertyQNames.RESOURCEID );
- resourceProperty.setCallback( new 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());
- }
-
-
+ <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());
+ }
}]]></source>
<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=225823&r1=225822&r2=225823&view=diff
==============================================================================
--- webservices/muse/trunk/src/site/content/xdocs/tutorial/webapp.xml (original)
+++ webservices/muse/trunk/src/site/content/xdocs/tutorial/webapp.xml Thu Jul 28 10:01:05 2005
@@ -21,13 +21,13 @@
<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/servlet/AxisServlet">
@@ -39,17 +39,20 @@
<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>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>Start Tomcat if it is not already started.</li>
- <li>Using a browser, go to <a href="http://localhost:8080/muse/servlet/AxisServlet">
+ <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>
+ parameter. This parameter is not required since this services is a singleton. Removing this entry ensures that MUSE does not look for a resource id
+ 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>
</ol>
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org