Author: ips
Date: Tue Mar 29 11:30:13 2005
New Revision: 159418
URL: http://svn.apache.org/viewcvs?view=rev&rev=159418
Log:
further work for interop
Modified:
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/MuwsConstants.java
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/CorrelatablePropertiesCapability.java
incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/AbstractWsdmInteropTestCase.java
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ServerMgmtTestCase.java
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/SmallDeviceMgmtTestCase.java
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/WebServicesMgmtTestCase.java
Modified:
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/MuwsConstants.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/MuwsConstants.java?view=diff&r1=159417&r2=159418
==============================================================================
--- incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/MuwsConstants.java
(original)
+++ incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/MuwsConstants.java
Tue Mar 29 11:30:13 2005
@@ -22,11 +22,16 @@
*/
public interface MuwsConstants
{
- String PARTIAL_URI_MUWS = "http://docs.oasis-open.org/wsdm/2004/12/";
+
+ /**
+ * The base URI for all URIs defined by the WSDM specs.
+ */
+ String BASE_URI_WSDM = "http://docs.oasis-open.org/wsdm/2004/12/";
+
/**
* The base URI for all URIs defined by the MUWS specs.
*/
- String BASE_URI_MUWS = PARTIAL_URI_MUWS + "muws/";
+ String BASE_URI_MUWS = BASE_URI_WSDM + "muws/";
/**
* The base URI for all manageability capability URIs defined by the MUWS
specs.
@@ -54,9 +59,9 @@
String NSPREFIX_PBM = "pbm";
/**
- * Dialect used for Properties Boolean Match (PBM)
+ * Properties Boolean Match (PBM) CorrelatableProperties expression
dialect.
*/
- String NSURI_PBM_DIALECT = PARTIAL_URI_MUWS + "pbm";
+ String PBM_DIALECT = BASE_URI_WSDM + "pbm";
/**
* Namespace URI for MUWS Part 2 schema.
Modified:
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/CorrelatablePropertiesCapability.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/CorrelatablePropertiesCapability.java?view=diff&r1=159417&r2=159418
==============================================================================
---
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/CorrelatablePropertiesCapability.java
(original)
+++
incubator/muse/trunk/src/java/org/apache/ws/muws/v1_0/capability/CorrelatablePropertiesCapability.java
Tue Mar 29 11:30:13 2005
@@ -53,6 +53,6 @@
/**
* Dialect for PBM
*/
- String PBM_DIALECT = MuwsConstants.NSURI_PBM_DIALECT;
+ String PBM_DIALECT = MuwsConstants.PBM_DIALECT;
}
Modified:
incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java?view=diff&r1=159417&r2=159418
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
(original)
+++
incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
Tue Mar 29 11:30:13 2005
@@ -194,7 +194,7 @@
resourceProperty = resourcePropertySet.get(
WeatherstationPropertyQNames.CORRELATABLEPROPERTIES );
CorrelatablePropertiesDocument correlatablePropertiesDocument =
CorrelatablePropertiesDocument.Factory.newInstance();
CorrelatablePropertiesType correlatablePropertiesType =
correlatablePropertiesDocument.addNewCorrelatableProperties();
- correlatablePropertiesType.setDialect( MuwsConstants.NSURI_PBM );
+ correlatablePropertiesType.setDialect( MuwsConstants.PBM_DIALECT );
correlatablePropertiesType.setNegativeAssertionPossible( false );
MatchDocument matchDocument = MatchDocument.Factory.newInstance();
matchDocument.setMatch( WeatherstationPropertyQNames.FCCID );
Modified:
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/AbstractWsdmInteropTestCase.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/AbstractWsdmInteropTestCase.java?view=diff&r1=159417&r2=159418
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/AbstractWsdmInteropTestCase.java
(original)
+++
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/AbstractWsdmInteropTestCase.java
Tue Mar 29 11:30:13 2005
@@ -78,9 +78,12 @@
// TODO
}
- protected void performMuwsStatusChangeAct( ResourceStub resource ) throws
FaultException
+ protected void performMuwsStatusChangeEventAct( ResourceStub resource )
throws FaultException
{
- // TODO
+ XmlObject[] capabilityPropElems = resource.getResourceProperty(
+
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
+ assertContainsURI( capabilityPropElems,
OperationalStatusCapability.URI );
+ // TODO: subscribe to muws-events:StatusCapability topic and
receive/validate a propChanged event
}
protected XmlObject getSingleProperty( ResourceStub resource, QName
propName )
@@ -103,7 +106,7 @@
break;
}
}
- assertTrue( "List of manageabiltiy capabilities does not include the
URI: " + uri, result );
+ assertTrue( "List of manageability capabilities does not include the
URI: " + uri, result );
}
/**
@@ -112,7 +115,7 @@
* @param url
* @return
* @throws Exception
- */
+ */
protected EndpointReferenceDocument getEndpointReference( URL url ) throws
Exception
{
return (EndpointReferenceDocument) XmlObject.Factory.parse( url );
Modified:
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ServerMgmtTestCase.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ServerMgmtTestCase.java?view=diff&r1=159417&r2=159418
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ServerMgmtTestCase.java
(original)
+++
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ServerMgmtTestCase.java
Tue Mar 29 11:30:13 2005
@@ -48,22 +48,17 @@
performMuwsIdentityCharacteristicsAct( m_resource );
}
- public void testServerConfiguration()
+ public void testServerAssets()
{
// TBD in interop doc
}
- public void testServerMetrics()
+ public void testServerAlert()
{
// TBD in interop doc
}
- public void testServerReset()
- {
- // TBD in interop doc
- }
-
- public void testServerAlertNotification()
+ public void testServerChassisIntrusionDetection()
{
// TBD in interop doc
}
@@ -71,16 +66,6 @@
public void testMuwsStatus() throws FaultException
{
performMuwsStatusAct( m_resource );
- }
-
- public void testMuwsMetricChange() throws FaultException
- {
- performMuwsMetricChangeAct( m_resource );
- }
-
- public void testMuwsStatusChange() throws FaultException
- {
- performMuwsStatusChangeAct( m_resource );
}
}
Modified:
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/SmallDeviceMgmtTestCase.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/SmallDeviceMgmtTestCase.java?view=diff&r1=159417&r2=159418
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/SmallDeviceMgmtTestCase.java
(original)
+++
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/SmallDeviceMgmtTestCase.java
Tue Mar 29 11:30:13 2005
@@ -15,10 +15,20 @@
*=============================================================================*/
package org.apache.ws.muws.interop.client;
+import
org.apache.ws.muws.v1_0.capability.ManageabilityCharacteristicsCapability;
+import org.apache.ws.muws.v1_0.capability.MetricsCapability;
+import org.apache.ws.muws.v1_0.capability.ConfigurationCapability;
+import org.apache.xmlbeans.XmlDateTime;
+import org.apache.xmlbeans.XmlObject;
import org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument;
import java.net.URL;
+import rim.pda.DateDocument;
+import rim.pda.TimeDocument;
+
+import javax.xml.namespace.QName;
+
/**
* A test case containing a test for each act in the "Small Device Management"
* playbook, as defined in the WSDM 1.0 interop scenarios doc.
@@ -33,6 +43,13 @@
private static final String DEFAULT_BLACKBERRY_EPR =
"http://cvs.apache.org/~ips/interop/blackberry-epr.xml";
private static final String BLACKBERRY_EPR = System.getProperty(
SYSPROP_BLACKBERRY_EPR, DEFAULT_BLACKBERRY_EPR );
+ private static final String NSURI_BLACKBERRY = "http://pda.rim";
+ private static final String NSPREFIX_BLACKBERRY = "bbry";
+ private static final String CAPABILITY_URI_BLACKBERRY_CONFIGURATION =
NSURI_BLACKBERRY + "/BlackberryConfiguration";
+ private static final String CAPABILITY_URI_BLACKBERRY_METRICS =
NSURI_BLACKBERRY + "/BlackberryMetrics";
+ private static final QName PROP_NAME_DATE = new QName( NSURI_BLACKBERRY,
"date", NSPREFIX_BLACKBERRY );
+ private static final QName PROP_NAME_TIME = new QName( NSURI_BLACKBERRY,
"time", NSPREFIX_BLACKBERRY );
+
private ResourceStub m_resource;
protected void setUp() throws Exception
@@ -50,12 +67,27 @@
public void testBlackberryMetrics() throws FaultException
{
- // TODO
- }
-
- public void testBlackberryConfiguration()
- {
- // TODO
+ XmlObject[] capabilityElems = m_resource.getResourceProperty(
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
+ assertContainsURI( capabilityElems, MetricsCapability.URI );
+ assertContainsURI( capabilityElems, CAPABILITY_URI_BLACKBERRY_METRICS
);
+ XmlObject currentTimePropElem = getSingleProperty( m_resource,
MetricsCapability.PROP_NAME_CURRENT_TIME );
+ assertTrue( currentTimePropElem instanceof XmlDateTime );
+ // TODO: retrieve and verify Blackberry metrics
+ }
+
+ public void testBlackberryConfiguration() throws FaultException
+ {
+ XmlObject[] capabilityElems = m_resource.getResourceProperty(
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
+ assertContainsURI( capabilityElems, ConfigurationCapability.URI );
+ assertContainsURI( capabilityElems,
CAPABILITY_URI_BLACKBERRY_CONFIGURATION );
+ // TODO: set values on Date and Time props
+ XmlObject datePropElem = getSingleProperty( m_resource, PROP_NAME_DATE
);
+ assertTrue( datePropElem instanceof DateDocument.Date );
+ DateDocument.Date date = (DateDocument.Date)datePropElem;
+ XmlObject timePropElem = getSingleProperty( m_resource, PROP_NAME_TIME
);
+ assertTrue( timePropElem instanceof TimeDocument.Time );
+ TimeDocument.Time time = (TimeDocument.Time)timePropElem;
+ // TODO: check that the retrieved values match the values that we set
above
}
public void testMuwsStatus() throws FaultException
@@ -65,12 +97,20 @@
public void testMuwsMetricChange() throws FaultException
{
+ // TODO: is this act being removed?
performMuwsMetricChangeAct( m_resource );
}
- public void testMuwsStatusChange() throws FaultException
+ public void testBlackberryCodeModuleSizeChangeEvent() throws FaultException
+ {
+ XmlObject[] capabilityElems = m_resource.getResourceProperty(
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
+ assertContainsURI( capabilityElems, MetricsCapability.URI );
+ // TODO: subscribe to bbry:CodeModuleSizeChange topic and receive a
propChanged event
+ }
+
+ public void testMuwsStatusChangeEvent() throws FaultException
{
- performMuwsStatusChangeAct( m_resource );
+ performMuwsStatusChangeEventAct( m_resource );
}
}
Modified:
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/WebServicesMgmtTestCase.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/WebServicesMgmtTestCase.java?view=diff&r1=159417&r2=159418
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/WebServicesMgmtTestCase.java
(original)
+++
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/WebServicesMgmtTestCase.java
Tue Mar 29 11:30:13 2005
@@ -23,16 +23,23 @@
import
org.apache.ws.muws.v1_0.capability.ManageabilityCharacteristicsCapability;
import org.apache.ws.muws.v1_0.capability.MetricsCapability;
import org.apache.ws.muws.v1_0.capability.RelationshipsCapability;
+import org.apache.ws.muws.v1_0.MuwsConstants;
+import org.apache.ws.util.XmlBeanUtils;
import org.apache.xmlbeans.XmlAnyURI;
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlDateTime;
+import org.apache.xmlbeans.XmlQName;
import org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.DurationMetric;
import org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.IntegerCounter;
import
org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.EndpointDescriptionsDocument;
import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.RelationshipType;
+import
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart1.CorrelatablePropertiesType;
+import org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmPbm.MatchDocument;
import org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument;
import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
+import
org.everestWeather.wsdm.samples.x2005.x04.schema.WeatherstationPropertyQNames;
+import javax.xml.namespace.QName;
import java.net.URL;
/**
@@ -148,8 +155,15 @@
{
XmlObject[] capabilityElems = m_resource.getResourceProperty(
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
assertContainsURI( capabilityElems,
CorrelatablePropertiesCapability.URI );
- m_resource.getResourceProperty(
CorrelatablePropertiesCapability.PROP_NAME_CORRELATABLE_PROPERTIES );
- // TODO: validate dialect is PBM and contains a single Match assertion
+ XmlObject correlatablePropertiesPropElem = getSingleProperty(
m_resource, CorrelatablePropertiesCapability.PROP_NAME_CORRELATABLE_PROPERTIES
);
+ assertTrue( correlatablePropertiesPropElem instanceof
CorrelatablePropertiesType );
+ CorrelatablePropertiesType correlatableProperties =
(CorrelatablePropertiesType)correlatablePropertiesPropElem;
+ assertEquals( "Incorrect dialect", MuwsConstants.PBM_DIALECT,
correlatableProperties.getDialect() );
+ XmlObject[] matchElems = XmlBeanUtils.getChildElements(
correlatableProperties, new QName( MuwsConstants.NSURI_PBM, "Match",
MuwsConstants.NSPREFIX_PBM ) );
+ assertEquals( "muws-p1-xs:CorrelatableProperties element does not
contain exactly one pbm:Match element.", 1, matchElems.length );
+ assertTrue( matchElems[0] instanceof XmlQName );
+ XmlQName match = (XmlQName) matchElems[0];
+ assertEquals( WeatherstationPropertyQNames.FCCID,
match.getQNameValue() );
// TODO: validate that the match assertion is true
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]