You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by hi...@apache.org on 2006/01/26 13:18:17 UTC

svn commit: r372516 [8/12] - in /webservices/muse/trunk/wsdm-jmx: ./ src/ src/examples/ src/examples/requestcounter/ src/examples/requestcounter/config/ src/examples/requestcounter/requests/ src/examples/requestcounter/src/ src/examples/requestcounter/...

Added: webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/resource/properties/PropertyValue.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/resource/properties/PropertyValue.java?rev=372516&view=auto
==============================================================================
--- webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/resource/properties/PropertyValue.java (added)
+++ webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/resource/properties/PropertyValue.java Thu Jan 26 04:14:27 2006
@@ -0,0 +1,419 @@
+/*=============================================================================*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.muws.jmx.resource.properties;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.xml.namespace.QName;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.muws.jmx.resource.AbstractMBeanResource;
+import org.apache.ws.muws.jmx.resource.MBeanServerAccessFailedException;
+import org.apache.ws.muws.jmx.resource.ResourcePropertySchemaTypeNotSupportedException;
+import org.apache.ws.muws.jmx.util.DataTypeUtils;
+import org.apache.ws.muws.jmx.util.WsdmJmxConstants;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.util.XmlBeanUtils;
+import org.apache.xmlbeans.SchemaType;
+import org.apache.xmlbeans.SimpleValue;
+import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.impl.values.XmlObjectBase;
+
+/**
+ * Represents a resource property value contains multiple values.
+ * A resource property consists of multiple MBean attributes.
+ *
+ * @author Hideharu Kato
+ * 
+ */
+public class PropertyValue
+{
+    private static final Log LOG = LogFactory.getLog(PropertyValue.class);
+    
+    private QName m_propertyName;
+    private HashMap m_locationPathMap;
+    private HashMap m_typeMap;
+    private ArrayList m_propertyValueList;
+    private AbstractMBeanResource m_mBeanResource;
+    
+    /**
+     * Creates a new {@link PropertyValue} object.
+     * 
+     * @param resourcePropertyName  QName of the resource property that this {@link PropertyValue} represents
+     * @param locationPathMap       HashMap object which contains MBean attribute names and location paths
+     * @param attributeTypeMap      HashMap object which contains MBean attribute names and types
+     * @param mBeanResource         {@link AbstractMBeanResource} which contains this {@link PropertyValue} object
+     * @throws MBeanServerAccessFailedException 
+     */
+    public PropertyValue(
+            QName resourcePropertyName, 
+            HashMap locationPathMap, 
+            HashMap attributeTypeMap, 
+            AbstractMBeanResource mBeanResource) 
+        throws MBeanServerAccessFailedException  
+    {
+        m_propertyName = resourcePropertyName;
+        m_locationPathMap = locationPathMap;
+        m_typeMap = attributeTypeMap;
+        m_mBeanResource = mBeanResource;
+
+        initPropertyValueList();
+        
+        LOG.debug("Created PropertyValue. " +
+                "Resource Property = " + m_propertyName +
+                "Size = " + m_propertyValueList.size());
+    }
+
+    /**
+     * Returns QName of the resource property this {@link PropertyValue} represents.
+     * 
+     * @return QName of the resource property this {@link PropertyValue} represents
+     */
+    public QName getPropertyName()
+    {
+        return m_propertyName;
+    }
+
+    /**
+     * Returns the name of the MBean attribute corresponds to the text node of the complex type.
+     *
+     * @return The name of the MBean attribute corresponds to the text node of the complex type.
+     */
+    public String getTextNodeAttributeName()
+    {
+        String attrName = null;
+        String locationPath = null;
+        for(Iterator it = m_locationPathMap.keySet().iterator(); it.hasNext();)
+        {
+            attrName = (String) it.next();
+            locationPath = (String) m_locationPathMap.get(attrName);
+            if(locationPath.equals("."))
+            {
+                break;
+            }
+        }
+        return attrName;
+    }
+    
+    /**
+     * Returns the type of the MBean attribute corresponds to the text node of the ComplexType.
+     * 
+     * @return The type of the MBean attribute corresponds to the text node of the ComplexType.
+     */
+    public String getTextNodeAttributeType()
+    {
+        String attrName = getTextNodeAttributeName();
+        String attrType = (String) m_typeMap.get(attrName);
+        return attrType;
+    }
+    
+    /**
+     * Returns MBeanServerConnection instance used for the MBean associated this {@link PropertyValue}.
+     * 
+     * @return MBeanServerConnection instance used for the MBean associated this {@link PropertyValue}
+     */
+    public MBeanServerConnection getMBeanServerConnection()
+    {
+        return m_mBeanResource.getMBeanServerConnection();
+    }
+    
+    /**
+     * Returns the object name of the MBean associated with this {@link PropertyValue}.
+     * 
+     * @return ObjectName object
+     */
+    public ObjectName getObjectName()
+    {
+        return m_mBeanResource.getObjectName();
+    }
+    
+    /**
+     * Updates the specified ResourceProperty with the associated MBean attribute values.
+     * 
+     * @param resourceProperty  ResourceProperty object to be updated
+     * @throws UpdateResourcePropertyFailedException 
+     * @throws PropertyValueException 
+     */
+    public void updateResourceProperty(ResourceProperty resourceProperty) 
+        throws UpdateResourcePropertyFailedException
+    {
+        LOG.debug("Updating Resource Property with MBean. " +
+                "QName = " + resourceProperty.getMetaData().getName());
+        
+        synchronized(resourceProperty)
+        {
+            try
+            {
+                if(!m_propertyName.equals(resourceProperty.getMetaData().getName()))
+                {
+                    LOG.warn("Unable to update. " + m_propertyName + " is expected. " + 
+                            "Resource Property name = " + resourceProperty.getMetaData().getName());
+                    
+                    throw new PropertyValueException(
+                            "Unable to update. " + 
+                            m_propertyName + " is expected. " + 
+                            "Resource Property QName = " + resourceProperty.getMetaData().getName());
+                }
+                
+                HashMap singleProperty = null;
+                XmlObject propXBean = null;
+                String attrName = null;
+                Object attrValue = null;
+                String locationPath = null;
+                XmlObject[] tokens = null;
+                SchemaType schemaType = null;
+                String value = null;
+                String localpart = null;
+                SimpleValue simpleValue = null;
+            
+                update();
+
+                int i = 0;
+                for(Iterator propIterator = m_propertyValueList.iterator(); propIterator.hasNext(); i++)
+                {
+                    singleProperty = (HashMap) propIterator.next();
+                
+                    if(i >= resourceProperty.size())
+                    {
+                        // Creates and adds new RP value from the copy of the 1st RP value 
+                        resourceProperty.add(resourceProperty.get(0));
+                    }
+                    propXBean = (XmlObject) resourceProperty.get(i);
+                    
+                    if(!DataTypeUtils.isSchemaTypeSupported(propXBean))
+                    {
+                        throw new ResourcePropertySchemaTypeNotSupportedException();
+                    }
+                
+                    for(Iterator attrNameIterator = singleProperty.keySet().iterator(); attrNameIterator.hasNext();)
+                    {
+                        attrName = (String) attrNameIterator.next();
+                        attrValue = singleProperty.get(attrName);
+                        locationPath = (String) m_locationPathMap.get(attrName);
+                        
+                        tokens = propXBean.selectPath(locationPath);
+                        
+                        if(tokens.length > 1)
+                        {
+                            LOG.error("Multiple XMLObject tokens selected. Location path = " + locationPath);
+                            
+                            throw new PropertyValueException(
+                                    "Multiple XMLObject tokens selected. Location path = " + locationPath);
+                        }
+                    
+                        if(attrValue != null)
+                        {
+                            // In case that the MBean attribute corresponds to an attribute node.
+                            if(locationPath.indexOf("@") != -1)
+                            {
+                                if(tokens.length == 0)
+                                {
+                                    // Insert new attribute to the propXBean                        
+                                    localpart = locationPath.substring(locationPath.indexOf("@") + 1);
+                                    if(localpart.startsWith("xml:"))
+                                    {
+                                        String prefix = localpart.substring(0, localpart.indexOf(":"));
+                                        String name = localpart.substring(localpart.indexOf(":")+1);
+                                        simpleValue = 
+                                            (SimpleValue) ((XmlObjectBase) propXBean).get_store().add_attribute_user(
+                                                    new QName(WsdmJmxConstants.XML_NAMESPACE, name, prefix));
+                                    }
+                                    else
+                                    {
+                                        simpleValue = 
+                                            (SimpleValue) ((XmlObjectBase) propXBean).get_store().add_attribute_user(new QName(null, localpart)); 
+                                    }
+                                    
+                                    schemaType = simpleValue.schemaType();
+                                    
+                                    QName schemaName = null;
+                                    SchemaType primitiveType = schemaType.getPrimitiveType();
+                                    if(primitiveType != null)
+                                    {
+                                        schemaName = primitiveType.getName();
+                                    }
+                                    else
+                                    {
+                                        schemaName = schemaType.getName();
+                                    }
+                                    
+                                    value = DataTypeUtils.toXsdString(attrValue, schemaName);
+                                    simpleValue.setStringValue(value);
+                                    
+                                    LOG.debug("Inserted a new attribute node in [" + propXBean +"] " +
+                                            "MBean Attribute name = [" + attrName + "] " +
+                                            "value = [" + attrValue + "] " +
+                                            "location path = [" + locationPath + "]");
+                                }   
+                                else
+                                {
+                                    // schemaType#isSimpleType() is always true 
+                                    schemaType = tokens[0].schemaType();
+                                    
+                                    QName schemaName = null;
+                                    SchemaType primitiveType = schemaType.getPrimitiveType();
+                                    if(primitiveType != null)
+                                    {
+                                        schemaName = primitiveType.getName();
+                                    }
+                                    else
+                                    {
+                                        schemaName = schemaType.getName();
+                                    }
+                                    
+                                    value = DataTypeUtils.toXsdString(attrValue, schemaName);
+                                    XmlBeanUtils.setValue(tokens[0], value);
+                                    
+                                    LOG.debug("Updated an attribute node in [" + propXBean +"] " +
+                                            "MBean Attribute name = [" + attrName + "] " +
+                                            "value = [" + attrValue + "] " +
+                                            "location path = [" + locationPath + "]");
+                                }
+                            }
+                            // In case that the MBean attribute corresponds to an text node.
+                            else
+                            {
+                                if(tokens.length == 0)
+                                { 
+                                    LOG.error("Text node not found in [" + propXBean + "]");
+                                    throw new PropertyValueException("Text node not found in [" + propXBean + "]");
+                                }
+                        
+                                schemaType = tokens[0].schemaType();
+                                
+                                QName schemaName = null;
+                                SchemaType primitiveType = schemaType.getPrimitiveType();
+                                if(primitiveType != null)
+                                {
+                                    schemaName = primitiveType.getName();
+                                }
+                                else
+                                {
+                                    schemaName = schemaType.getName();
+                                }
+                                
+                                value = DataTypeUtils.toXsdString(attrValue, schemaName);
+                                XmlBeanUtils.setValue(tokens[0], value);
+                                
+                                LOG.debug("Updated a text node in [" + propXBean +"] " +
+                                        "MBean Attribute name = [" + attrName + "] " +
+                                        "value = [" + attrValue + "] " +
+                                        "location path = [" + locationPath + "]");
+                            }
+                        }
+                        // In case that the MBean attribute value is null.
+                        else
+                        {
+                            // In case that the MBean attribute corresponds to an attribute node.
+                            if(locationPath.indexOf("@") != -1)
+                            {
+                                // schemaType.isSimpleType() is always true 
+                                schemaType = tokens[0].schemaType();
+                                ((XmlObjectBase) propXBean).get_store().remove_attribute(schemaType.getName());
+                                
+                                LOG.debug("Removed an attribute node in [" + propXBean +"] " +
+                                        "MBean Attribute name = [" + attrName + "] " +
+                                        "value = [" + attrValue + "] " +
+                                        "location path = [" + locationPath + "]");
+                            }
+                            // In case that the MBean attribute corresponds to an text node.
+                            else
+                            {
+                                XmlBeanUtils.setValue(tokens[0], null);
+                                
+                                LOG.debug("Updated a text node with null in [" + propXBean +"] " +
+                                        "MBean Attribute name = [" + attrName + "] " +
+                                        "value = [" + attrValue + "] " +
+                                        "location path = [" + locationPath + "]");
+                            }
+                        }
+                    }
+                }
+                
+                removeEmptyValues(resourceProperty);
+            }
+            catch(Exception e)
+            {
+                LOG.error("Update resource property failed. Cause: " + e.getLocalizedMessage());
+                
+                throw new UpdateResourcePropertyFailedException(e);
+            }
+        }
+    }
+    
+    private void initPropertyValueList() throws MBeanServerAccessFailedException
+    {
+        String textNodeAttributeName = getTextNodeAttributeName();
+        Object[] attributeValues = m_mBeanResource.getAttributeValues(textNodeAttributeName);
+        
+        m_propertyValueList = new ArrayList(attributeValues.length);
+        
+        HashMap singlePropertyValue = null;
+        for(int i = 0; i < attributeValues.length; i++)
+        {
+            singlePropertyValue = new HashMap(m_locationPathMap.size());
+            m_propertyValueList.add(singlePropertyValue);
+        }
+    }
+    
+    private void update() throws MBeanServerAccessFailedException
+    {   
+        String attrName = null;
+        Object[] attrValues = null;
+        HashMap singlePropertyValue = null;
+        
+        for (Iterator it = m_locationPathMap.keySet().iterator(); it.hasNext();)
+        {
+            attrName = (String) it.next();
+            attrValues = m_mBeanResource.getAttributeValues(attrName);
+            
+            for(int i = 0; i < m_propertyValueList.size(); i++)
+            {
+                singlePropertyValue = (HashMap) m_propertyValueList.get(i);
+                singlePropertyValue.put(attrName, attrValues[i]);
+            } 
+        }
+    }
+    
+    private void removeEmptyValues(ResourceProperty resourceProperty)
+    {
+        XmlObject propXBean = null;
+        String value = null;
+        ArrayList removeList = new ArrayList(resourceProperty.size());
+        
+        int i = 0;
+        for(Iterator it = resourceProperty.iterator(); it.hasNext();i++)
+        {
+            propXBean = (XmlObject) it.next();
+            value = XmlBeanUtils.getValue(propXBean);
+            if(propXBean.isNil() || value == null || value.equals("") )
+            {
+                removeList.add(propXBean);
+            }
+        }
+        for(Iterator it = removeList.iterator(); it.hasNext();)
+        {
+           resourceProperty.remove(it.next());
+           
+           LOG.debug("Removed a null property.");
+        }    
+    }
+}

Added: webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/resource/properties/PropertyValueException.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/resource/properties/PropertyValueException.java?rev=372516&view=auto
==============================================================================
--- webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/resource/properties/PropertyValueException.java (added)
+++ webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/resource/properties/PropertyValueException.java Thu Jan 26 04:14:27 2006
@@ -0,0 +1,30 @@
+/*=============================================================================*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.muws.jmx.resource.properties;
+
+/**
+ * An exception to be thrown in {@link PropertyValue}.
+ * 
+ * @author Hideharu Kato
+ *
+ */
+public class PropertyValueException extends Exception
+{
+    public PropertyValueException(String message)
+    {
+        super(message);
+    }
+}

Added: webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/resource/properties/UpdateResourcePropertyFailedException.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/resource/properties/UpdateResourcePropertyFailedException.java?rev=372516&view=auto
==============================================================================
--- webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/resource/properties/UpdateResourcePropertyFailedException.java (added)
+++ webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/resource/properties/UpdateResourcePropertyFailedException.java Thu Jan 26 04:14:27 2006
@@ -0,0 +1,30 @@
+/*=============================================================================*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.muws.jmx.resource.properties;
+
+/**
+ * An exception to be thrown when {@link PropertyValue#updateResourceProperty(ResourceProperty)} fails.
+ * 
+ * @author Hideharu Kato
+ *
+ */
+public class UpdateResourcePropertyFailedException extends Exception
+{
+    public UpdateResourcePropertyFailedException(Throwable e)
+    {
+        super("Update resource property failed", e);
+    }
+}

Added: webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/CapabilityTopicUtils.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/CapabilityTopicUtils.java?rev=372516&view=auto
==============================================================================
--- webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/CapabilityTopicUtils.java (added)
+++ webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/CapabilityTopicUtils.java Thu Jan 26 04:14:27 2006
@@ -0,0 +1,199 @@
+/*=============================================================================*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.muws.jmx.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import javax.xml.namespace.QName;
+
+import org.apache.ws.mows.v1_0.MowsConstants;
+import org.apache.ws.mows.v1_0.capability.IdentificationCapability;
+import org.apache.ws.mows.v1_0.capability.OperationalStateCapability;
+import org.apache.ws.muws.v1_0.capability.CorrelatablePropertiesCapability;
+import org.apache.ws.muws.v1_0.capability.DescriptionCapability;
+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.RelationshipResourceCapability;
+import org.apache.ws.muws.v1_0.capability.RelationshipsCapability;
+import org.apache.ws.muws.v1_0.topics.MuwsTopicsConstants;
+import org.apache.ws.muws.v1_0.topics.impl.XmlBeansManagementEventTopicImpl;
+import org.apache.ws.notification.topics.Topic;
+import org.apache.ws.notification.topics.impl.ResourcePropertyValueChangeTopicImpl;
+
+/**
+ * Provides utility methods regarding Topics.
+ *
+ * @author Hideharu Kato
+ * 
+ */
+public class CapabilityTopicUtils 
+{    
+    private static HashMap m_capabilityProperties = new HashMap(11);
+    
+    static
+    {
+        // muws-p1:Identity Capability
+        ArrayList identityProps = new ArrayList(1);
+        identityProps.add(IdentityCapability.PROP_NAME_RESOURCE_ID);
+        m_capabilityProperties.put(
+                MuwsTopicsConstants.IDENTITYCAPABILITY_TOPIC_NAME, 
+                identityProps);
+        
+        // muse-p1-xs:ManageabilityCharacteristics Capability
+        ArrayList manageabilityProps = new ArrayList(1);
+        manageabilityProps.add(ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY);
+        m_capabilityProperties.put(
+                MuwsTopicsConstants.MANAGEABILITYCHARACTERISTICSCAPABILITY_TOPIC_NAME, 
+                manageabilityProps);
+        
+        // muws-p1-xs:CorrelatableProperties Capability
+        ArrayList correlatableProps = new ArrayList(1);
+        correlatableProps.add(CorrelatablePropertiesCapability.PROP_NAME_CORRELATABLE_PROPERTIES);
+        m_capabilityProperties.put(
+                MuwsTopicsConstants.CORRELATABLEPROPERTIESCAPABILITY_TOPIC_NAME, 
+                correlatableProps);
+        
+        // muws-p2-xs:Description Capability
+        ArrayList descriptoinProps = new ArrayList(3);
+        descriptoinProps.add(DescriptionCapability.PROP_NAME_CAPTION);
+        descriptoinProps.add(DescriptionCapability.PROP_NAME_DESCRIPTION);
+        descriptoinProps.add(DescriptionCapability.PROP_NAME_VERSION);
+        m_capabilityProperties.put(
+                MuwsTopicsConstants.DESCRIPTIONCAPABILITY_TOPIC_NAME, 
+                descriptoinProps);
+        
+        // muws-p2:OperationalStatus Capability
+        ArrayList operationalStatusProps = new ArrayList(1);
+        operationalStatusProps.add(OperationalStatusCapability.PROP_NAME_OPERATIONAL_STATUS);
+        m_capabilityProperties.put(
+                MuwsTopicsConstants.OPERATIONALSTATECAPABILITY_TOPIC_NAME, 
+                operationalStatusProps);
+        
+        // muws-p2:Metrics Capability
+        ArrayList muwsMetricsProps = new ArrayList(1);
+        muwsMetricsProps.add(org.apache.ws.muws.v1_0.capability.MetricsCapability.PROP_NAME_CURRENT_TIME);
+        m_capabilityProperties.put(
+                MuwsTopicsConstants.METRICSCAPABILITY_TOPIC_NAME, 
+                muwsMetricsProps);
+        
+        // muws-p2-xs:Relationships Capability
+        ArrayList relationshipsProps = new ArrayList(1);
+        relationshipsProps.add(RelationshipsCapability.PROP_NAME_RELATIONSHIP);
+        m_capabilityProperties.put(
+                MuwsTopicsConstants.RELATIONSHIPSCAPABILITY_TOPIC_NAME, 
+                relationshipsProps);
+        
+        // muws-p2-xs:RelationshipResource Capability
+        ArrayList relationshipResourceProps = new ArrayList(3);
+        relationshipResourceProps.add(RelationshipResourceCapability.PROP_NAME_NAME);
+        relationshipResourceProps.add(RelationshipResourceCapability.PROP_NAME_PARTICIPANT);
+        relationshipResourceProps.add(RelationshipResourceCapability.PROP_NAME_TYPE);
+        m_capabilityProperties.put(
+                MuwsTopicsConstants.RELATIONSHIPRESOURCECAPABILITY_TOPIC_NAME, 
+                relationshipResourceProps);
+        
+        // mows-xs:Identification Capability
+        ArrayList identificationProps = new ArrayList(2);
+        identificationProps.add(IdentificationCapability.PROP_NAME_ENDPOINT_DESCRIPTIONS);
+        identificationProps.add(IdentificationCapability.PROP_NAME_ENDPOINT_REFERENCE);
+        m_capabilityProperties.put(
+                new QName(MowsConstants.NSURI_MOWS_TOPICS, IdentificationCapability.TOPIC_NAME),
+                identificationProps);
+        
+        // mows-xs:Metrics Capability
+        ArrayList mowsMetricsProps = new ArrayList(6);
+        mowsMetricsProps.add(org.apache.ws.mows.v1_0.capability.MetricsCapability.PROP_NAME_NUMBER_OF_REQUESTS);
+        mowsMetricsProps.add(org.apache.ws.mows.v1_0.capability.MetricsCapability.PROP_NAME_NUMBER_OF_FAILED_REQUESTS);
+        mowsMetricsProps.add(org.apache.ws.mows.v1_0.capability.MetricsCapability.PROP_NAME_NUMBER_OF_SUCCESSFUL_REQUESTS);
+        mowsMetricsProps.add(org.apache.ws.mows.v1_0.capability.MetricsCapability.PROP_NAME_SERVICE_TIME);
+        mowsMetricsProps.add(org.apache.ws.mows.v1_0.capability.MetricsCapability.PROP_NAME_MAX_RESPONSE_TIME);
+        mowsMetricsProps.add(org.apache.ws.mows.v1_0.capability.MetricsCapability.PROP_NAME_LAST_RESPONSE_TIME);
+        m_capabilityProperties.put(
+                new QName(MowsConstants.NSURI_MOWS_TOPICS, org.apache.ws.mows.v1_0.capability.MetricsCapability.TOPIC_NAME), 
+                mowsMetricsProps);
+    
+        // mows-xs:OperationalState Capability
+        ArrayList operationalStateProps = new ArrayList(2);
+        operationalStateProps.add(OperationalStateCapability.PROP_NAME_CURRENT_OPERATIONAL_STATE);
+        operationalStateProps.add(OperationalStateCapability.PROP_NAME_LAST_OPERATIONAL_STATE_TRANSITION);
+        m_capabilityProperties.put(
+                new QName(MowsConstants.NSURI_MOWS_TOPICS, OperationalStateCapability.TOPIC_NAME),
+                operationalStateProps);
+
+    }
+    
+    /**
+     * Returns ArrayList of the resource properties that relate to the specified capability topic.
+     * 
+     * @param capabilityTopic QName of capability topic
+     * @return ArrayList of resource properties
+     */
+    public static ArrayList toResourcePropertyListFromCapabilityTopic(QName capabilityTopic) 
+    {
+        ArrayList props = (ArrayList) m_capabilityProperties.get(capabilityTopic);    
+        if(props == null)
+        {
+            props = new ArrayList();
+        }
+        return props;
+    }
+    
+    /**
+     * Returns array of Topic objects that contain the specified resource property.
+     * 
+     * @param topics
+     * @param observedProperty
+     * @return Array of Topic objects
+     */
+    public static Topic[] selectTopicsContainsResourceProperty(Topic[] topics, QName observedProperty)
+    {
+        String topicNamespace = null;
+        String topicName = null;
+        ArrayList propList = new ArrayList();
+        QName propName = null;
+        ArrayList topicList = new ArrayList();
+        for(int i = 0; i < topics.length; i++)
+        {
+            topicNamespace = topics[i].getTopicSpace().getTargetNamespace();
+            topicName = topics[i].getName();
+        
+            if(topics[i] instanceof XmlBeansManagementEventTopicImpl)
+            {
+                propList = 
+                    (ArrayList) CapabilityTopicUtils.toResourcePropertyListFromCapabilityTopic(new QName(topicNamespace, topicName));
+                
+                if( (propList != null) && (propList.contains(observedProperty)) )
+                {
+                    topicList.add(topics[i]);                    
+                }
+            }
+            else if(topics[i] instanceof ResourcePropertyValueChangeTopicImpl)
+            {
+                propName = new QName(topicNamespace, topicName);
+                if(propName.toString().equals(observedProperty.toString()))
+                {
+                    topicList.add(topics[i]);
+                }
+            }
+        }
+        Topic[] selectedTopics = new Topic[topicList.size()];
+        System.arraycopy(topicList.toArray(), 0, selectedTopics, 0, topicList.size());
+        
+        return selectedTopics;
+    }
+}

Added: webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/DataTypeUtils.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/DataTypeUtils.java?rev=372516&view=auto
==============================================================================
--- webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/DataTypeUtils.java (added)
+++ webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/DataTypeUtils.java Thu Jan 26 04:14:27 2006
@@ -0,0 +1,451 @@
+/*=============================================================================*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.muws.jmx.util;
+
+import java.util.Date;
+
+import javax.xml.namespace.QName;
+
+import org.apache.commons.lang.time.DateFormatUtils;
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.xmlbeans.SchemaType;
+import org.apache.xmlbeans.XmlObject;
+
+/**
+ * Provides methods regarding xsd data conversion.
+ *
+ * @author Hideharu Kato
+ * 
+ */
+public class DataTypeUtils 
+{        
+    private static final Log LOG = LogFactory.getLog(DataTypeUtils.class);
+    
+    /**
+     * Converts the specified Object to a string representation compatible for XML.
+     * 
+     * @param value     Object to be converted
+     * @param schemaName    The schema name of xsd type
+     * @return The string representaion compatible for XML
+     * @throws UnsupportedDataTypeConversion
+     */
+    public static String toXsdString(Object value, QName schemaName) 
+        throws UnsupportedDataTypeConversion
+    {    
+        String valueString = null;
+        if( schemaName.equals(WsdmJmxConstants.XSD_DATETIME) ) 
+        {
+            valueString = DataTypeUtils.toDateTime(value);
+        }
+        else if( schemaName.equals(WsdmJmxConstants.XSD_DATE) ) 
+        {
+            valueString = DataTypeUtils.toDate(value);
+        }
+        else if( schemaName.equals(WsdmJmxConstants.XSD_TIME) ) 
+        {
+            valueString = DataTypeUtils.toTime(value);
+        }
+        else if( schemaName.equals(WsdmJmxConstants.XSD_GYEAR) ) 
+        {
+            valueString = DataTypeUtils.toGYear(value);
+        }   
+        else if( schemaName.equals(WsdmJmxConstants.XSD_GMONTH) ) 
+        {
+            valueString = DataTypeUtils.toGMonth(value);
+        }   
+        else if( schemaName.equals(WsdmJmxConstants.XSD_GDAY) )
+        {
+            valueString = DataTypeUtils.toGDay(value);
+        }
+        else if( schemaName.equals(WsdmJmxConstants.XSD_GYEARMONTH) ) 
+        {
+            valueString = DataTypeUtils.toGYearMonth(value);
+        }
+        else if( schemaName.equals(WsdmJmxConstants.XSD_GMONTHDAY) )
+        {
+            valueString = DataTypeUtils.toGMonthDay(value);
+        }
+        else if( schemaName.equals(WsdmJmxConstants.XSD_DURATION) )
+        {                
+            valueString = toDurationFromMillisec(value);
+        }
+        else if( schemaName.equals(WsdmJmxConstants.XSD_QNAME) )
+        {
+            valueString = toQName(value);
+        }
+        else
+        {
+            valueString = value.toString();
+        }
+        return valueString;
+    }
+    
+    /**
+     * Returns the string representation of xsd:dateTime
+     * 
+     * @param value Object to be converted
+     * @return The string representation of xsd:dateTime
+     * @throws UnsupportedDataTypeConversion 
+     */
+    public static String toDateTime(Object value) throws UnsupportedDataTypeConversion 
+    {
+        if(!(value instanceof Date))
+        {
+            LOG.error(value + " is not java.util.Date.");
+            throw new UnsupportedDataTypeConversion(WsdmJmxConstants.XSD_DATETIME, value);
+        }
+        String dateTimeString = DateFormatUtils.format((Date)value, "yyyy-MM-dd'T'HH:mm:ss.SSS");
+        return dateTimeString;
+    }
+    
+    /**
+     * Returns the string representation of xsd:date
+     * 
+     * @param value Object to be converted
+     * @return The string representation of xsd:date
+     * @throws UnsupportedDataTypeConversion
+     */
+    public static String toDate(Object value) throws UnsupportedDataTypeConversion
+    {
+        if(!(value instanceof Date))
+        {
+            LOG.error(value + " is not java.util.Date.");
+            throw new UnsupportedDataTypeConversion(WsdmJmxConstants.XSD_DATETIME, value);
+        }
+        String dateString = DateFormatUtils.format((Date)value, "yyyy-MM-dd");
+        return dateString;
+    }
+    
+    /**
+     * Returns the string representation of xsd:time
+     *  
+     * @param value
+     * @return The string representation of xsd:time
+     * @throws UnsupportedDataTypeConversion
+     */
+    public static String toTime(Object value) throws UnsupportedDataTypeConversion
+    {
+        if(!(value instanceof Date))
+        {
+            LOG.error(value + " is not java.util.Date.");
+            throw new UnsupportedDataTypeConversion(WsdmJmxConstants.XSD_DATETIME, value);
+        }
+        String timeString = DateFormatUtils.format((Date)value, "HH:mm:ss.SSS");
+        return timeString;
+    }
+    
+    /**
+     * Returns the string representation of xsd:gYear 
+     * 
+     * @param value
+     * @return The string representation of xsd:gYear
+     * @throws UnsupportedDataTypeConversion
+     */
+    public static String toGYear(Object value) throws UnsupportedDataTypeConversion
+    {
+        if(!(value instanceof Date))
+        {
+            LOG.error(value + " is not java.util.Date.");
+            throw new UnsupportedDataTypeConversion(WsdmJmxConstants.XSD_DATETIME, value);
+        }
+        String gYearString = DateFormatUtils.format((Date)value, "yyyy");
+        return gYearString;
+    }
+    
+    /**
+     * Returns the string representation of xsd:gMonth 
+     * 
+     * @param value
+     * @return The string representation of xsd:gMonth 
+     * @throws UnsupportedDataTypeConversion
+     */
+    public static String toGMonth(Object value) throws UnsupportedDataTypeConversion
+    {
+        if(!(value instanceof Date))
+        {
+            LOG.error(value + " is not java.util.Date.");
+            throw new UnsupportedDataTypeConversion(WsdmJmxConstants.XSD_DATETIME, value);
+        }
+        String gMonthString = DateFormatUtils.format((Date)value, "--MM");
+        return gMonthString;
+    }
+    
+    /**
+     * Returns the string representation of xsd:gDay 
+     * 
+     * @param value
+     * @return The string representation of xsd:gDay 
+     * @throws UnsupportedDataTypeConversion
+     */
+    public static String toGDay(Object value) throws UnsupportedDataTypeConversion
+    {
+        if(!(value instanceof Date))
+        {
+            LOG.error(value + " is not java.util.Date.");
+            throw new UnsupportedDataTypeConversion(WsdmJmxConstants.XSD_DATETIME, value);
+        }
+        String gDayString = DateFormatUtils.format((Date)value, "---dd");
+        return gDayString;
+    }
+
+    /**
+     * Returns the string representation of xsd:GYearMonth 
+     * 
+     * @param value
+     * @return The string representation of xsd:GYearMonth
+     * @throws UnsupportedDataTypeConversion
+     */
+    public static String toGYearMonth(Object value) throws UnsupportedDataTypeConversion
+    {
+        if(!(value instanceof Date))
+        {
+            LOG.error(value + " is not java.util.Date.");
+            throw new UnsupportedDataTypeConversion(WsdmJmxConstants.XSD_DATETIME, value);
+        }
+        String gYearMonthString = DateFormatUtils.format((Date)value, "yyyy-MM");
+        return gYearMonthString;
+    }
+    
+    /**
+     * Returns the string representation of xsd:gMonthDay 
+     * 
+     * @param value
+     * @return The string representation of xsd:gMonthDay
+     * @throws UnsupportedDataTypeConversion
+     */
+    public static String toGMonthDay(Object value) throws UnsupportedDataTypeConversion
+    {
+        if(!(value instanceof Date))
+        {
+            LOG.error(value + " is not java.util.Date.");
+            throw new UnsupportedDataTypeConversion(WsdmJmxConstants.XSD_DATETIME, value);
+        }
+        String gMonthDayString = DateFormatUtils.format((Date)value, "--MM-dd");
+        return gMonthDayString;
+    }
+
+    /**
+     * Returns the string representaion of xsd:duration from the specified Long value in millisec.
+     * 
+     * @param value Long value in millisec
+     * @return The string representaion of the xsd:duration
+     * @throws UnsupportedDataTypeConversion 
+     */
+    public static String toDurationFromMillisec(Object value) 
+        throws UnsupportedDataTypeConversion 
+    {
+        if(!(value instanceof Long))
+        {
+            LOG.error(value + " is not java.lang.Long.");
+            throw new UnsupportedDataTypeConversion(WsdmJmxConstants.XSD_DURATION, value);
+        }
+        
+        long millisec= ((Long) value).longValue();
+        
+        int day = (int) (millisec / DateUtils.MILLIS_IN_DAY);
+        millisec = millisec % DateUtils.MILLIS_IN_DAY;
+        
+        int hour = (int) ( millisec / DateUtils.MILLIS_IN_HOUR);
+        millisec = millisec % DateUtils.MILLIS_IN_HOUR;
+        
+        int minute = (int) ( millisec / DateUtils.MILLIS_IN_MINUTE);
+        millisec = millisec % DateUtils.MILLIS_IN_MINUTE;
+        
+        int second = (int) (millisec / DateUtils.MILLIS_IN_SECOND);
+        millisec = millisec % DateUtils.MILLIS_IN_SECOND;
+        
+        StringBuffer buffer = new StringBuffer(17);
+        
+        buffer.append("P");
+        if(day != 0)
+        {
+            buffer.append(day);
+            buffer.append("D");
+        }
+        buffer.append("T");
+        if(hour != 0)
+        {
+            buffer.append(hour);
+            buffer.append("H");
+        }
+        if(minute != 0)
+        {
+            buffer.append(minute);
+            buffer.append("M");
+        }
+        
+        buffer.append(second);
+        
+        if(millisec != 0)
+        {
+            buffer.append(".");
+            if(millisec < 10)
+            {
+                buffer.append(0).append(0);
+            }
+            else if(millisec < 100)
+            {
+                buffer.append(0);
+            }
+            buffer.append(millisec);
+        }
+        buffer.append("S");
+        
+        if(buffer.indexOf("T0S") != -1)
+        {
+            if(buffer.length() > 4)
+            {
+                buffer.delete(buffer.indexOf("T0S"), buffer.indexOf("T0S") + 3);
+            }
+        }
+        
+        return buffer.toString();
+    }
+    
+    public static String toQName(Object value)
+    {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * Returns false if the content type of the XmlObject is EMPTY_CONTENT, ELEMENT_CONTENT, MIXED_CONTENT.
+     * 
+     * @param propXBean XmlObject object to be checked
+     * @return false if the content type of the XmlObject is EMPTY_CONTENT, ELEMENT_CONTENT, MIXED_CONTENT
+     */
+    public static boolean isSchemaTypeSupported(XmlObject propXBean) 
+    {
+        SchemaType schemaType = propXBean.schemaType();
+        int contentType = schemaType.getContentType();
+        
+        if( (contentType == SchemaType.EMPTY_CONTENT) || 
+                (contentType == SchemaType.ELEMENT_CONTENT) ||
+                (contentType == SchemaType.MIXED_CONTENT) )
+        {
+            LOG.warn("Content type = " + contentType);
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Converts an Object instance of an array to Object[] instance. 
+     * 
+     * @param value The Object instance to be converted to Object[]
+     * @return Object[] instance
+     */
+    public static Object[] toObjectArray(Object value)
+    {
+        Object[] valueArray = null;
+        
+        if(value != null)
+        {
+            Class clazz = value.getClass();
+            if(clazz.isArray())
+            {
+                Class componentTypeClass = value.getClass().getComponentType();
+                if(componentTypeClass.isPrimitive())
+                {
+                    String name = componentTypeClass.getName();
+                    if(name.equals("byte"))
+                    {
+                        byte[] bValues = (byte[]) value; 
+                        valueArray = new Object[bValues.length];
+                        for(int i = 0; i < bValues.length; i++)
+                        {
+                            valueArray[i] = new Byte(bValues[i]);
+                        }
+                    }
+                    else if(name.equals("char"))
+                    {
+                        char[] cValues = (char[]) value; 
+                        valueArray = new Object[cValues.length];
+                        for(int i = 0; i < cValues.length; i++)
+                        {
+                            valueArray[i] = new Character(cValues[i]);
+                        }
+                    }
+                    else if(name.equals("double"))
+                    {
+                        double[] dValues = (double[]) value; 
+                        valueArray = new Object[dValues.length];
+                        for(int i = 0; i < dValues.length; i++)
+                        {
+                            valueArray[i] = new Double(dValues[i]);
+                        }
+                    }
+                    else if(name.equals("float"))
+                    {
+                        float[] fValues = (float[]) value; 
+                        valueArray = new Object[fValues.length];
+                        for(int i = 0; i < fValues.length; i++)
+                        {
+                            valueArray[i] = new Float(fValues[i]);
+                        }   
+                    }
+                    else if(name.equals("int"))
+                    {
+                        int[] iValues = (int[]) value;
+                        valueArray = new Object[iValues.length];
+                        for(int i = 0; i < iValues.length; i++)
+                        {
+                            valueArray[i] = new Integer(iValues[i]);
+                        }
+                    }
+                    else if(name.equals("long"))
+                    {
+                        long[] jValues = (long[]) value;
+                        valueArray = new Object[jValues.length];
+                        for(int i = 0; i < jValues.length; i++)
+                        {
+                            valueArray[i] = new Long(jValues[i]);
+                        }   
+                    }
+                    else if(name.equals("short"))
+                    {
+                        short[] sValues = (short[]) value;   
+                        valueArray = new Object[sValues.length];
+                        for(int i = 0; i < sValues.length; i++)
+                        {
+                            valueArray[i] = new Short(sValues[i]);
+                        }
+                    }
+                    else if(name.equals("boolean"))
+                    {
+                        boolean[] zValues = (boolean[]) value; 
+                        valueArray = new Object[zValues.length];
+                        for(int i = 0; i < zValues.length; i++)
+                        {
+                            valueArray[i] = new Boolean(zValues[i]);
+                        }
+                    }                    
+                }
+                else
+                {
+                    valueArray = (Object[]) value;
+                }
+            }
+            else
+            {
+                valueArray = new Object[]{ value };
+            }
+        }
+        return valueArray;
+    }
+}

Added: webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/UnsupportedDataTypeConversion.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/UnsupportedDataTypeConversion.java?rev=372516&view=auto
==============================================================================
--- webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/UnsupportedDataTypeConversion.java (added)
+++ webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/UnsupportedDataTypeConversion.java Thu Jan 26 04:14:27 2006
@@ -0,0 +1,32 @@
+/*=============================================================================*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.muws.jmx.util;
+
+import javax.xml.namespace.QName;
+
+/**
+ * An exception to be thrown in {@link DataTypeUtils} when the conversion is not supported.
+ * 
+ * @author Hideharu Kato
+ *
+ */
+public class UnsupportedDataTypeConversion extends Exception
+{
+    public UnsupportedDataTypeConversion(QName type, Object value)
+    {
+        super("Unable to convert " + value + " to " + type);
+    }
+}

Added: webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/WsdmJmxConstants.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/WsdmJmxConstants.java?rev=372516&view=auto
==============================================================================
--- webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/WsdmJmxConstants.java (added)
+++ webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/WsdmJmxConstants.java Thu Jan 26 04:14:27 2006
@@ -0,0 +1,89 @@
+/*=============================================================================*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.muws.jmx.util;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import javax.xml.namespace.QName;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Provides constants used for WSDM-JMX.
+ * 
+ * @author Hideharu Kato
+ * 
+ */
+public class WsdmJmxConstants 
+{
+    private static final Log LOG = LogFactory.getLog(WsdmJmxConstants.class);   
+    
+    public static final String BASE_URI_MUSE_MONITOR = "http://ws.apache.org/muse/muse-monitor.xsd";
+    public static final URI DIALECT_URI_MONITOR = Initializer.DIALECT_URI_MONITOR;
+    public static final String XML_SCHEMA_NAMESPACE = "http://www.w3.org/2001/XMLSchema";
+    public static final QName XSD_DATETIME = new QName(XML_SCHEMA_NAMESPACE, "dateTime");
+    public static final QName XSD_DATE = new QName(XML_SCHEMA_NAMESPACE, "date");
+    public static final QName XSD_TIME = new QName(XML_SCHEMA_NAMESPACE, "time");
+    public static final QName XSD_GYEAR = new QName(XML_SCHEMA_NAMESPACE, "gYear");
+    public static final QName XSD_GMONTH = new QName(XML_SCHEMA_NAMESPACE, "gMonth");
+    public static final Object XSD_GDAY = new QName(XML_SCHEMA_NAMESPACE, "gDay");
+    public static final QName XSD_GYEARMONTH = new QName(XML_SCHEMA_NAMESPACE, "gYearMonth");
+    public static final QName XSD_GMONTHDAY = new QName(XML_SCHEMA_NAMESPACE, "gMonthDay");
+    public static final QName XSD_DURATION = new QName(XML_SCHEMA_NAMESPACE, "duration");
+    public static final QName XSD_QNAME = new QName(XML_SCHEMA_NAMESPACE, "QName");
+    public static final String XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace";
+    
+    static class Initializer
+    {
+        static URI DIALECT_URI_MONITOR;
+        static
+        {
+            try
+            {
+                DIALECT_URI_MONITOR = new URI("http://ws.apache.org/muse/monitor");
+            }
+            catch(URISyntaxException e)
+            {
+                throw new RuntimeException(e);
+            }
+        }    
+    }
+    
+    private static Long s_valueChangeMonitoringPeriod;
+    
+    /**
+     * Sets the monitoring period for the value change event.
+     * 
+     * @param monitoringPeriod
+     */
+    public static void setValueChangeMonitoringPeriod(Long monitoringPeriod)
+    {
+        s_valueChangeMonitoringPeriod = monitoringPeriod;
+        LOG.debug("Set value change monitoring period. " + s_valueChangeMonitoringPeriod);
+    }
+    
+    /**
+     * Returns the monitoring period for the value change event.
+     * 
+     * @return The monitoring period for the value change event
+     */
+    public static Long getValueChangeMonitoringPeriod()
+    {
+        return s_valueChangeMonitoringPeriod;
+    }
+}

Added: webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/WsdmJmxUtils.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/WsdmJmxUtils.java?rev=372516&view=auto
==============================================================================
--- webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/WsdmJmxUtils.java (added)
+++ webservices/muse/trunk/wsdm-jmx/src/java/org/apache/ws/muws/jmx/util/WsdmJmxUtils.java Thu Jan 26 04:14:27 2006
@@ -0,0 +1,77 @@
+/*=============================================================================*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.muws.jmx.util;
+
+import org.apache.commons.id.uuid.UUID;
+import org.apache.ws.muws.v1_0.capability.IdentityCapability;
+import org.apache.ws.notification.topics.Topic;
+import org.apache.ws.notification.topics.TopicSpace;
+import org.apache.ws.notification.topics.TopicSpaceSet;
+import org.apache.ws.notification.topics.impl.TopicSpaceImpl;
+import org.apache.ws.resource.PropertiesResource;
+import org.apache.ws.resource.Resource;
+import org.apache.ws.resource.properties.ResourceProperty;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.ResourceIdDocument;
+
+/**
+ * Provides utility methods for users to develop resources.
+ *
+ * @author Hideharu Kato
+ * 
+ */
+public class WsdmJmxUtils 
+{    
+    /**
+     * Initializes muws-p1-xs:ResourceId with UUID.
+     * 
+     * @param resource
+     */
+    public static void initResourceIdPropertyWithUUID(Resource resource)
+    {
+        ResourceProperty resourceProperty =
+            ((PropertiesResource) resource).getResourcePropertySet().get(IdentityCapability.PROP_NAME_RESOURCE_ID);
+        
+        if ( resourceProperty.isEmpty())
+        {
+            ResourceIdDocument propElem = ResourceIdDocument.Factory.newInstance(  );
+            propElem.setResourceId("urn:" + (UUID.randomUUID()).toString());
+            resourceProperty.add(propElem);
+        }
+    }
+
+    /**
+     * Creates Topic instances.
+     * 
+     * @param topicSpaceSet     TopicSpaceSet of the resource
+     * @param topicNamespace    Topic namespace for created topics
+     * @param topics            Topics to be created
+     * 
+     * @deprecated
+     */
+    public static void createTopicInstances(
+            TopicSpaceSet topicSpaceSet, 
+            String topicNamespace, 
+            Topic[] topics)
+    {
+        TopicSpace muwsTopicSpace = new TopicSpaceImpl(topicNamespace);
+        topicSpaceSet.addTopicSpace(muwsTopicSpace);
+        
+        for(int i = 0; i < topics.length; i++)
+        {
+            muwsTopicSpace.addTopic(topics[i]);
+        }
+    }
+}

Added: webservices/muse/trunk/wsdm-jmx/src/schema/muse-monitor.xsd
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/wsdm-jmx/src/schema/muse-monitor.xsd?rev=372516&view=auto
==============================================================================
--- webservices/muse/trunk/wsdm-jmx/src/schema/muse-monitor.xsd (added)
+++ webservices/muse/trunk/wsdm-jmx/src/schema/muse-monitor.xsd Thu Jan 26 04:14:27 2006
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsd:schema
+    targetNamespace="http://ws.apache.org/muse/muse-monitor.xsd"	
+    xmlns:mm="http://ws.apache.org/muse/muse-monitor.xsd"
+    xmlns:muws-p2-xs="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    elementFormDefault="qualified" attributeFormDefault="unqualified">
+
+<xsd:import namespace="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd" 
+    schemaLocation="../spec/wsdm/MUWS-Part2-1_0.xsd"/>
+
+<xsd:element name="StringMonitor" type="mm:StringMonitorType"/>
+<xsd:element name="CounterMonitor" type="mm:CounterMonitorType"/>
+<xsd:element name="GaugeMonitor" type="mm:GaugeMonitorType"/>
+
+<xsd:element name="GranularityPeriod" type="xsd:long"/>
+<xsd:element name="ObservedProperty" type="xsd:QName"/>
+
+<xsd:element name="NotifyDiffer" type="xsd:boolean"/>
+<xsd:element name="NotifyMatch" type="xsd:boolean"/>
+<xsd:element name="StringToCompare" type="xsd:string"/>
+
+<xsd:element name="DifferenceMode" type="xsd:boolean"/>
+<xsd:element name="Modulus" type="xsd:integer"/>
+<xsd:element name="Notify" type="xsd:boolean"/>
+<xsd:element name="Offset" type="xsd:integer"/>
+<xsd:element name="Threshold" type="xsd:integer"/>
+
+<xsd:element name="HighThreshold" type="xsd:double"/>
+<xsd:element name="LowThreshold" type="xsd:double"/>
+<xsd:element name="NotifyHigh" type="xsd:boolean"/>
+<xsd:element name="NotifyLow" type="xsd:boolean"/>
+
+<xsd:complexType name="StringMonitorType">
+    <xsd:sequence>
+      <xsd:element ref="mm:GranularityPeriod" minOccurs="0"/>
+      <xsd:element ref="mm:ObservedProperty"/>
+      <xsd:element ref="mm:NotifyDiffer"/>
+      <xsd:element ref="mm:NotifyMatch"/>
+      <xsd:element ref="mm:StringToCompare"/>
+    </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="CounterMonitorType">
+    <xsd:sequence>
+      <xsd:element ref="mm:GranularityPeriod" minOccurs="0"/>
+      <xsd:element ref="mm:ObservedProperty"/>
+      <xsd:element ref="mm:DifferenceMode"/>
+      <xsd:element ref="mm:Modulus"/>
+      <xsd:element ref="mm:Notify"/>
+      <xsd:element ref="mm:Offset"/>
+      <xsd:element ref="mm:Threshold"/>
+    </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="GaugeMonitorType">
+    <xsd:sequence>
+      <xsd:element ref="mm:GranularityPeriod" minOccurs="0"/>
+      <xsd:element ref="mm:ObservedProperty"/>
+      <xsd:element ref="mm:DifferenceMode"/>
+      <xsd:element ref="mm:HighThreshold"/>
+      <xsd:element ref="mm:LowThreshold"/>
+      <xsd:element ref="mm:NotifyHigh"/>
+      <xsd:element ref="mm:NotifyLow"/>
+    </xsd:sequence>
+</xsd:complexType>
+
+<xsd:element name="StringMatchSituation" type="mm:MonitorSituationType"/>
+<xsd:element name="StringDifferSituation" type="mm:MonitorSituationType"/>
+<xsd:element name="CounterSituation" type="mm:MonitorSituationType"/>
+<xsd:element name="GaugeHighSituation" type="mm:MonitorSituationType"/>
+<xsd:element name="GaugeLowSituation" type="mm:MonitorSituationType"/>
+
+<xsd:complexType name="MonitorSituationType">
+    <xsd:complexContent>
+      <xsd:extension base="muws-p2-xs:SituationCategoryType"/>
+    </xsd:complexContent>
+</xsd:complexType>
+
+</xsd:schema>

Added: webservices/muse/trunk/wsdm-jmx/src/schema/property-map.xsd
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/wsdm-jmx/src/schema/property-map.xsd?rev=372516&view=auto
==============================================================================
--- webservices/muse/trunk/wsdm-jmx/src/schema/property-map.xsd (added)
+++ webservices/muse/trunk/wsdm-jmx/src/schema/property-map.xsd Thu Jan 26 04:14:27 2006
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
+    targetNamespace="http://ws.apache.org/muse/property-map.xsd"
+    xmlns:pm="http://ws.apache.org/muse/property-map.xsd"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    elementFormDefault="qualified" attributeFormDefault="unqualified">
+
+ <xsd:element name="PropertyMapping" type="pm:PropertyMappingType"/>
+
+ <xsd:complexType name="PropertyMappingType">
+    <xsd:sequence>
+      <xsd:element ref="pm:WsdmResourceProperty" maxOccurs="unbounded"/>
+    </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="WsdmResourceProperty" type="pm:WsdmResourcePropertyType"/>
+
+ <xsd:complexType name="WsdmResourcePropertyType">
+    <xsd:sequence>
+      <xsd:element ref="pm:MBeanAttribute" maxOccurs="unbounded"/>
+    </xsd:sequence>
+    <xsd:attribute name="name" type="xsd:QName"/>
+ </xsd:complexType>
+
+ <xsd:element name="MBeanAttribute" type="pm:MBeanAttributeType"/>
+
+ <xsd:complexType name="MBeanAttributeType">
+    <xsd:sequence>
+      <xsd:element name="LocationPath" type="xsd:string" minOccurs="0"/>
+    </xsd:sequence>
+    <xsd:attribute name="name" type="xsd:string"/>
+ </xsd:complexType>
+
+</xsd:schema>

Added: webservices/muse/trunk/wsdm-jmx/src/schema/resource-list.xsd
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/wsdm-jmx/src/schema/resource-list.xsd?rev=372516&view=auto
==============================================================================
--- webservices/muse/trunk/wsdm-jmx/src/schema/resource-list.xsd (added)
+++ webservices/muse/trunk/wsdm-jmx/src/schema/resource-list.xsd Thu Jan 26 04:14:27 2006
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
+    targetNamespace="http://ws.apache.org/muse/resource-list.xsd"
+    xmlns:rl="http://ws.apache.org/muse/resource-list.xsd"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    elementFormDefault="qualified" attributeFormDefault="unqualified">
+
+ <xsd:element name="ResourceList" type="rl:ResourceListType"/>
+
+ <xsd:complexType name="ResourceListType">
+    <xsd:sequence>
+      <xsd:element ref="rl:Resource" maxOccurs="unbounded"/>
+    </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="Resource" type="rl:ResourceType"/>
+
+ <xsd:complexType name="ResourceType">
+    <xsd:sequence>
+      <xsd:element name="ResourceIdentifier" type="xsd:string"/>
+      <xsd:element name="MBeanObjectName" type="xsd:string"/>
+      <xsd:element name="JMXServiceURL" type="xsd:string"/>
+    </xsd:sequence>
+ </xsd:complexType>
+
+</xsd:schema>

Added: webservices/muse/trunk/wsdm-jmx/src/spec/soap/SOAP-Envelope-1_1.xsd
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/wsdm-jmx/src/spec/soap/SOAP-Envelope-1_1.xsd?rev=372516&view=auto
==============================================================================
--- webservices/muse/trunk/wsdm-jmx/src/spec/soap/SOAP-Envelope-1_1.xsd (added)
+++ webservices/muse/trunk/wsdm-jmx/src/spec/soap/SOAP-Envelope-1_1.xsd Thu Jan 26 04:14:27 2006
@@ -0,0 +1,118 @@
+<?xml version="1.0"?>
+
+<!-- Schema for the SOAP/1.1 envelope
+
+     This schema has been produced using W3C's SOAP Version 1.2 schema
+     found at:
+
+     http://www.w3.org/2001/06/soap-envelope
+
+     Copyright 2001 Martin Gudgin, Developmentor.
+
+     Changes made are the following:
+     - reverted namespace to http://schemas.xmlsoap.org/soap/envelope/
+     - reverted mustUnderstand to only allow 0 and 1 as lexical values
+	 - made encodingStyle a global attribute 20020825
+
+	 Further changes:
+
+	 - removed default value from mustUnderstand attribute declaration - 20030314
+
+     Original copyright:
+     
+     Copyright 2001 W3C (Massachusetts Institute of Technology,
+     Institut National de Recherche en Informatique et en Automatique,
+     Keio University). All Rights Reserved.
+     http://www.w3.org/Consortium/Legal/
+
+     This document is governed by the W3C Software License [1] as
+     described in the FAQ [2].
+
+     [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
+     [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/"
+  targetNamespace="http://schemas.xmlsoap.org/soap/envelope/">
+
+  <!-- Envelope, header and body -->
+  <xs:element name="Envelope" type="tns:Envelope"/>
+  <xs:complexType name="Envelope">
+    <xs:sequence>
+      <xs:element ref="tns:Header" minOccurs="0"/>
+      <xs:element ref="tns:Body" minOccurs="1"/>
+      <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax"/>
+  </xs:complexType>
+
+  <xs:element name="Header" type="tns:Header"/>
+  <xs:complexType name="Header">
+    <xs:sequence>
+      <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+    </xs:sequence>
+    <xs:anyAttribute namespace="##other" processContents="lax"/>
+  </xs:complexType>
+
+  <xs:element name="Body" type="tns:Body"/>
+  <xs:complexType name="Body">
+    <xs:sequence>
+      <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+    </xs:sequence>
+    <xs:anyAttribute namespace="##any" processContents="lax">
+      <xs:annotation>
+        <xs:documentation>
+		  Prose in the spec does not specify that attributes are allowed on the Body element
+        </xs:documentation>
+      </xs:annotation>
+    </xs:anyAttribute>
+  </xs:complexType>
+
+  <!-- Global Attributes.  The following attributes are intended to be usable via qualified attribute names on any complex type referencing them.  -->
+  <xs:attribute name="mustUnderstand">
+    <xs:simpleType>
+      <xs:restriction base='xs:boolean'>
+        <xs:pattern value='0|1'/>
+      </xs:restriction>
+    </xs:simpleType>
+  </xs:attribute>
+  <xs:attribute name="actor" type="xs:anyURI"/>
+
+  <xs:simpleType name="encodingStyle">
+    <xs:annotation>
+      <xs:documentation>
+	    'encodingStyle' indicates any canonicalization conventions followed in the contents of the containing element.  For example, the value 'http://schemas.xmlsoap.org/soap/encoding/' indicates the pattern described in SOAP specification
+      </xs:documentation>
+    </xs:annotation>
+    <xs:list itemType="xs:anyURI"/>
+  </xs:simpleType>
+
+  <xs:attribute name="encodingStyle" type="tns:encodingStyle"/>
+  <xs:attributeGroup name="encodingStyle">
+    <xs:attribute ref="tns:encodingStyle"/>
+  </xs:attributeGroup>
+
+  <xs:element name="Fault" type="tns:Fault"/>
+  <xs:complexType name="Fault" final="extension">
+    <xs:annotation>
+      <xs:documentation>
+	    Fault reporting structure
+      </xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="faultcode" type="xs:QName"/>
+      <xs:element name="faultstring" type="xs:string"/>
+      <xs:element name="faultactor" type="xs:anyURI" minOccurs="0"/>
+      <xs:element name="detail" type="tns:detail" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:complexType name="detail">
+    <xs:sequence>
+      <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+    </xs:sequence>
+    <xs:anyAttribute namespace="##any" processContents="lax"/>
+  </xs:complexType>
+
+</xs:schema>

Added: webservices/muse/trunk/wsdm-jmx/src/spec/soap/SOAP-Envelope-1_2.xsd
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/wsdm-jmx/src/spec/soap/SOAP-Envelope-1_2.xsd?rev=372516&view=auto
==============================================================================
--- webservices/muse/trunk/wsdm-jmx/src/spec/soap/SOAP-Envelope-1_2.xsd (added)
+++ webservices/muse/trunk/wsdm-jmx/src/spec/soap/SOAP-Envelope-1_2.xsd Thu Jan 26 04:14:27 2006
@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<!-- Schema defined in the SOAP Version 1.2 Part 1 specification
+     Proposed Recommendation:
+     http://www.w3.org/TR/2003/PR-soap12-part1-20030507/
+     $Id: soap-envelope.xsd,v 1.1 2003/04/17 14:23:23 ylafon Exp $
+
+     Copyright (C)2003 W3C(R) (MIT, ERCIM, Keio), All Rights Reserved.
+     W3C viability, trademark, document use and software licensing rules
+     apply.
+     http://www.w3.org/Consortium/Legal/
+
+     This document is governed by the W3C Software License [1] as
+     described in the FAQ [2].
+
+     [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
+     [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
+-->
+<xs:schema targetNamespace="http://www.w3.org/2003/05/soap-envelope" xmlns:tns="http://www.w3.org/2003/05/soap-envelope" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+	<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
+	<!-- Envelope, header and body -->
+	<xs:element name="Envelope" type="tns:Envelope"/>
+	<xs:complexType name="Envelope">
+		<xs:sequence>
+			<xs:element ref="tns:Header" minOccurs="0"/>
+			<xs:element ref="tns:Body"/>
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	<xs:element name="Header" type="tns:Header"/>
+	<xs:complexType name="Header">
+		<xs:annotation>
+			<xs:documentation>
+	  Elements replacing the wildcard MUST be namespace qualified, but can be in the targetNamespace
+      </xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	<xs:element name="Body" type="tns:Body"/>
+	<xs:complexType name="Body">
+		<xs:sequence>
+			<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	<!-- Global Attributes.  The following attributes are intended to be
+  usable via qualified attribute names on any complex type referencing
+  them.  -->
+	<xs:attribute name="mustUnderstand" type="xs:boolean" default="0"/>
+	<xs:attribute name="relay" type="xs:boolean" default="0"/>
+	<xs:attribute name="role" type="xs:anyURI"/>
+	<!-- 'encodingStyle' indicates any canonicalization conventions
+  followed in the contents of the containing element.  For example, the
+  value 'http://www.w3.org/2003/05/soap-encoding' indicates the pattern
+  described in the last call working draft of SOAP Version 1.2 Part 2:
+  Adjuncts -->
+	<xs:attribute name="encodingStyle" type="xs:anyURI"/>
+	<xs:element name="Fault" type="tns:Fault"/>
+	<xs:complexType name="Fault" final="extension">
+		<xs:annotation>
+			<xs:documentation>
+	    Fault reporting structure
+      </xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element name="Code" type="tns:faultcode"/>
+			<xs:element name="Reason" type="tns:faultreason"/>
+			<xs:element name="Node" type="xs:anyURI" minOccurs="0"/>
+			<xs:element name="Role" type="xs:anyURI" minOccurs="0"/>
+			<xs:element name="Detail" type="tns:detail" minOccurs="0"/>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:complexType name="faultreason">
+		<xs:sequence>
+			<xs:element name="Text" type="tns:reasontext" maxOccurs="unbounded"/>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:complexType name="reasontext">
+		<xs:simpleContent>
+			<xs:extension base="xs:string">
+				<xs:attribute ref="xml:lang" use="required"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	<xs:complexType name="faultcode">
+		<xs:sequence>
+			<xs:element name="Value" type="tns:faultcodeEnum"/>
+			<xs:element name="Subcode" type="tns:subcode" minOccurs="0"/>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:simpleType name="faultcodeEnum">
+		<xs:restriction base="xs:QName">
+			<xs:enumeration value="tns:DataEncodingUnknown"/>
+			<xs:enumeration value="tns:MustUnderstand"/>
+			<xs:enumeration value="tns:Receiver"/>
+			<xs:enumeration value="tns:Sender"/>
+			<xs:enumeration value="tns:VersionMismatch"/>
+		</xs:restriction>
+	</xs:simpleType>
+	<xs:complexType name="subcode">
+		<xs:sequence>
+			<xs:element name="Value" type="xs:QName"/>
+			<xs:element name="Subcode" type="tns:subcode" minOccurs="0"/>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:complexType name="detail">
+		<xs:sequence>
+			<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	<!-- Global element declaration and complex type definition for header entry returned due to a mustUnderstand fault -->
+	<xs:element name="NotUnderstood" type="tns:NotUnderstoodType"/>
+	<xs:complexType name="NotUnderstoodType">
+		<xs:attribute name="qname" type="xs:QName" use="required"/>
+	</xs:complexType>
+	<!-- Global element and associated types for managing version transition as described in Appendix A of the SOAP Version 1.2 Part 1 Last Call Working Draft -->
+	<xs:complexType name="SupportedEnvType">
+		<xs:attribute name="qname" type="xs:QName" use="required"/>
+	</xs:complexType>
+	<xs:element name="Upgrade" type="tns:UpgradeType"/>
+	<xs:complexType name="UpgradeType">
+		<xs:sequence>
+			<xs:element name="SupportedEnvelope" type="tns:SupportedEnvType" maxOccurs="unbounded"/>
+		</xs:sequence>
+	</xs:complexType>
+</xs:schema>

Added: webservices/muse/trunk/wsdm-jmx/src/spec/wsa/WS-Addressing-2003_03.xsd
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/wsdm-jmx/src/spec/wsa/WS-Addressing-2003_03.xsd?rev=372516&view=auto
==============================================================================
--- webservices/muse/trunk/wsdm-jmx/src/spec/wsa/WS-Addressing-2003_03.xsd (added)
+++ webservices/muse/trunk/wsdm-jmx/src/spec/wsa/WS-Addressing-2003_03.xsd Thu Jan 26 04:14:27 2006
@@ -0,0 +1,114 @@
+<?xml version="1.0"?>
+
+<!-- 
+ 
+Legal Disclaimer
+
+The presentation, distribution or other dissemination of the information 
+contained in this document is not a license, either expressly or impliedly, 
+to any intellectual property owned or controlled by BEA or IBM or Microsoft
+and\or any other third party.  BEA and IBM and Microsoft and\or any other
+third party may have patents, patent applications, trademarks, copyrights, 
+or other intellectual property rights covering subject matter in this 
+document.  The furnishing of this document does not give you any license 
+to BEA's and IBM's and Microsoft's or any other third party's patents, 
+trademarks, copyrights, or other intellectual property.
+
+This document and the information contained herein is provided on an "AS IS"
+basis and to the maximum extent permitted by applicable law, BEA and IBM 
+and Microsoft provide the document AS IS AND WITH ALL FAULTS, and hereby 
+disclaims all other warranties and conditions, either express, implied or 
+statutory, including, but not limited to, any (if any) implied warranties, 
+duties or conditions of merchantability, of fitness for a particular 
+purpose, of accuracy or completeness of responses, of results, of 
+workmanlike effort, of lack of viruses, and of lack of negligence, all with
+regard to the document. ALSO, THERE IS NO WARRANTY OR CONDITION OF 
+TITLE, QUIET ENJOYMENT, QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR 
+NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO THE 
+DOCUMENT.
+
+IN NO EVENT WILL BEA or IBM or MICROSOFT BE LIABLE TO ANY OTHER PARTY FOR THE
+COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS OF USE, 
+LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL 
+DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING IN ANY 
+WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS DOCUMENT, WHETHER OR 
+NOT SUCH PARTY HAD ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Copyright Notice
+
+Copyright 2003 BEA Systems Inc. and IBM Corporation and Microsoft Corporation. All rights reserved.
+
+-->
+
+<xs:schema targetNamespace="http://schemas.xmlsoap.org/ws/2003/03/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" blockDefault="#all">
+
+   <!-- //////////////////// WS-Addressing //////////////////// -->
+	<!-- Endpoint reference -->
+	<xs:element name="EndpointReference" type="wsa:EndpointReferenceType"/>
+	<xs:complexType name="EndpointReferenceType">
+		<xs:sequence>
+			<xs:element name="Address" type="wsa:AttributedURI"/>
+			<xs:element name="ReferenceProperties" type="wsa:ReferencePropertiesType" minOccurs="0"/>
+			<xs:element name="PortType" type="wsa:AttributedQName" minOccurs="0"/>
+			<xs:element name="ServiceName" type="wsa:ServiceNameType" minOccurs="0"/>
+			<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+				<xs:annotation>
+					<xs:documentation>
+					 If "Policy" elements from namespace "http://schemas.xmlsoap.org/ws/2002/12/policy#policy" are used, they must appear first (before any extensibility elements).
+					</xs:documentation>
+				</xs:annotation>
+                        </xs:any>			
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	<xs:complexType name="ReferencePropertiesType">
+		<xs:sequence>
+			<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xs:sequence>
+	</xs:complexType>
+	<xs:complexType name="ServiceNameType">
+		<xs:simpleContent>
+			<xs:extension base="xs:QName">
+				<xs:attribute name="PortName" type="xs:NCName"/>
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	<!-- Message information header blocks -->
+	<xs:element name="MessageID" type="wsa:AttributedURI"/>
+	<xs:element name="RelatesTo" type="wsa:Relationship"/>
+	<xs:element name="To" type="wsa:AttributedURI"/>
+	<xs:element name="Action" type="wsa:AttributedURI"/>
+	<xs:element name="From" type="wsa:EndpointReferenceType"/>
+	<xs:element name="ReplyTo" type="wsa:EndpointReferenceType"/>
+	<xs:element name="FaultTo" type="wsa:EndpointReferenceType"/>
+	<xs:element name="Recipient" type="wsa:EndpointReferenceType"/>
+	<xs:complexType name="Relationship">
+		<xs:simpleContent>
+			<xs:extension base="xs:anyURI">
+				<xs:attribute name="RelationshipType" type="xs:QName" use="optional"/>
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	<xs:simpleType name="RelationshipTypeValues">
+		<xs:restriction base="xs:QName">
+			<xs:enumeration value="wsa:Response"/>
+		</xs:restriction>
+	</xs:simpleType>
+	<!-- Common declarations and definitions -->
+	<xs:complexType name="AttributedQName">
+		<xs:simpleContent>
+			<xs:extension base="xs:QName">
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	<xs:complexType name="AttributedURI">
+		<xs:simpleContent>
+			<xs:extension base="xs:anyURI">
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+</xs:schema>