Author: scamp
Date: Tue Jul 26 14:48:48 2005
New Revision: 225403
URL: http://svn.apache.org/viewcvs?rev=225403&view=rev
Log:
updated
Modified:
webservices/muse/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java
webservices/muse/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemResource.java
Modified:
webservices/muse/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java
URL:
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java?rev=225403&r1=225402&r2=225403&view=diff
==============================================================================
---
webservices/muse/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java
(original)
+++
webservices/muse/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemHome.java
Tue Jul 26 14:48:48 2005
@@ -1,17 +1,7 @@
package org.apache.ws.resource.example.filesystem;
-import org.apache.ws.resource.Resource;
-import org.apache.ws.resource.ResourceContext;
-import org.apache.ws.resource.ResourceContextException;
-import org.apache.ws.resource.ResourceException;
-import org.apache.ws.resource.ResourceUnknownException;
-import org.apache.ws.resource.impl.AbstractResourceHome;
-import org.apache.ws.addressing.EndpointReference;
-import javax.xml.namespace.QName;
-
-import java.io.Serializable;
/**
* The home for Filesystem resources.
@@ -21,20 +11,20 @@
*/
public class FilesystemHome
extends AbstractFilesystemHome
- implements Serializable
+ implements java.io.Serializable
{
/** The service endpoint name as registered with the SOAP Platform. This
is useful for building EPR's. **/
- public static final QName SERVICE_NAME =
javax.xml.namespace.QName.valueOf("{http://ws.apache.org/resource/example/filesystem}Filesystem");
+ public static final javax.xml.namespace.QName SERVICE_NAME =
javax.xml.namespace.QName.valueOf("{http://ws.apache.org/resource/example/filesystem}Filesystem");
/** The management PortType associated with this resource. This is useful
for building EPR's.**/
- public static final QName PORT_TYPE =
javax.xml.namespace.QName.valueOf("{http://ws.apache.org/resource/example/filesystem}FileSystemPortType");
+ public static final javax.xml.namespace.QName PORT_TYPE =
javax.xml.namespace.QName.valueOf("{http://ws.apache.org/resource/example/filesystem}FileSystemPortType");
/** The WSDL Port name associated with the resource. This is useful for
building EPR's. **/
public static final String PORT_NAME = "filesystem";
/** The name of the resource key for this resource. **/
- public static final QName RESOURCE_KEY_NAME =
javax.xml.namespace.QName.valueOf("{http://ws.apache.org/resource/example/filesystem}ResourceIdentifier");
+ public static final javax.xml.namespace.QName RESOURCE_KEY_NAME =
javax.xml.namespace.QName.valueOf("{http://ws.apache.org/resource/example/filesystem}ResourceIdentifier");
/**
* A NamespaceVerionHolder which maintains the QNames of Spec Wsdls
@@ -61,12 +51,12 @@
add( lvol2Resource );
}
- public QName getServiceName()
+ public javax.xml.namespace.QName getServiceName()
{
return SERVICE_NAME;
}
- public QName getPortType()
+ public javax.xml.namespace.QName getPortType()
{
return PORT_TYPE;
}
@@ -76,7 +66,7 @@
return PORT_NAME;
}
- public QName getResourceKeyNameQName()
+ public javax.xml.namespace.QName getResourceKeyNameQName()
{
return RESOURCE_KEY_NAME;
}
Modified:
webservices/muse/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemResource.java
URL:
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemResource.java?rev=225403&r1=225402&r2=225403&view=diff
==============================================================================
---
webservices/muse/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemResource.java
(original)
+++
webservices/muse/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/FilesystemResource.java
Tue Jul 26 14:48:48 2005
@@ -1,31 +1,6 @@
package org.apache.ws.resource.example.filesystem;
-import example.filesystem.callback.OperationalStatusCallback;
-import org.apache.axis.message.addressing.Constants;
-import org.apache.ws.addressing.XmlBeansEndpointReference;
-import org.apache.ws.muws.ResourceIdResourcePropertyCallback;
-import org.apache.ws.muws.v1_0.MuwsConstants;
-import org.apache.ws.muws.v1_0.capability.IdentityCapability;
-import
org.apache.ws.muws.v1_0.capability.ManageabilityCharacteristicsCapability;
-import org.apache.ws.muws.v1_0.capability.OperationalStatusCapability;
-import org.apache.ws.muws.v1_0.capability.RelationshipsCapability;
-import org.apache.ws.muws.v1_0.topics.ManagementEventTopic;
-import org.apache.ws.muws.v1_0.topics.impl.XmlBeansManagementEventTopicImpl;
-import org.apache.ws.notification.topics.TopicSpace;
-import org.apache.ws.notification.topics.impl.TopicSpaceImpl;
-import org.apache.ws.resource.PropertiesResource;
-import org.apache.ws.resource.ResourceHome;
-import org.apache.ws.resource.properties.ResourceProperty;
-import org.apache.ws.util.XmlBeanUtils;
-import org.apache.xmlbeans.XmlAnyURI;
-import
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ManageabilityCapabilityDocument;
-import
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipParticipantType;
-import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipType;
-import
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipTypeType;
-import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
-import javax.naming.InitialContext;
-import javax.xml.namespace.QName;
/**
* **** NOTE: This file will not be overwritten during generation ****
@@ -60,24 +35,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 )
@@ -146,33 +121,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
@@ -181,30 +156,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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]