Author: ips
Date: Tue Mar 22 16:14:53 2005
New Revision: 158698
URL: http://svn.apache.org/viewcvs?view=rev&rev=158698
Log:
MOWS interfaces and interop test harness
Added:
incubator/muse/trunk/src/java/org/apache/ws/mows/
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/MowsConstants.java
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointIdentificationCapability.java
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointMetricsCapability.java
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointOperationalStateCapability.java
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/ManageabilityReferencesCapability.java
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/OperationalStatusCapability.java
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/RequestProcessingStateCapability.java
incubator/muse/trunk/src/site/content/interop/src/test/org/
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/
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/FaultException.java
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ResourceStub.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
Added: incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/MowsConstants.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/MowsConstants.java?view=auto&rev=158698
==============================================================================
--- incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/MowsConstants.java
(added)
+++ incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/MowsConstants.java
Tue Mar 22 16:14:53 2005
@@ -0,0 +1,64 @@
+/*=============================================================================*
+ * Copyright 2005 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.mows.v1_0;
+
+/**
+ * Constants for names defined by the MOWS 1.0 specification.
+ */
+public interface MowsConstants
+{
+
+ /**
+ * The base URI for all URIs defined by the MOWS spec.
+ */
+ String BASE_URI_MOWS = "http://docs.oasis-open.org/wsdm/2004/12/mows/";
+
+ /**
+ * The base URI for all manageability capability URIs defined by the MOWS
spec.
+ */
+ String BASE_URI_MOWS_CAPABILITIES = BASE_URI_MOWS + "capabilities/";
+
+ /**
+ * Namespace URI for MOWS schema.
+ */
+ String NSURI_MOWS_SCHEMA = BASE_URI_MOWS + "wsdm-mows.xsd";
+
+ /**
+ * Namespace prefix for MOWS schema.
+ */
+ String NSPREFIX_MOWS_SCHEMA = "mows-xs";
+
+ /**
+ * Namespace URI for MOWS WSDL.
+ */
+ String NSURI_MOWS_WSDL = BASE_URI_MOWS + "wsdm-mows.wsdl";
+
+ /**
+ * Namespace prefix for MOWS WSDL.
+ */
+ String NSPREFIX_MOWS_WSDL = "mows-wsdl";
+
+ /**
+ * Namespace URI for MOWS topics.
+ */
+ String NSURI_MOWS_TOPICS = BASE_URI_MOWS + "wsdm-mows-events.xml";
+
+ /**
+ * Namespace prefix for MOWS topics.
+ */
+ String NSPREFIX_MOWS_TOPICS = "mows-events";
+
+}
Added:
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointIdentificationCapability.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointIdentificationCapability.java?view=auto&rev=158698
==============================================================================
---
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointIdentificationCapability.java
(added)
+++
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointIdentificationCapability.java
Tue Mar 22 16:14:53 2005
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2004-2005 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.mows.v1_0.capability;
+
+import org.apache.ws.mows.v1_0.MowsConstants;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The MOWS EndpointIdentification manageability capability.
+ */
+public interface EndpointIdentificationCapability
+{
+
+ /**
+ * Name of this capability.
+ */
+ String NAME = "EndpointIdentification";
+
+ /**
+ * Manageability capability URI.
+ */
+ String URI = MowsConstants.BASE_URI_MOWS_CAPABILITIES + NAME;
+
+ /**
+ * Port type name.
+ */
+ QName PORT_TYPE_NAME = new QName( MowsConstants.NSURI_MOWS_WSDL, NAME,
MowsConstants.NSPREFIX_MOWS_WSDL );
+
+ /**
+ * Topic name.
+ */
+ String TOPIC_NAME = NAME + "Capability";
+
+ /**
+ * EndpointReference property name.
+ */
+ QName PROP_NAME_ENDPOINT_REFERENCE = new QName(
MowsConstants.NSURI_MOWS_SCHEMA, "EndpointReference",
MowsConstants.NSPREFIX_MOWS_SCHEMA );
+
+ /**
+ * EndpointDescriptions property name.
+ */
+ QName PROP_NAME_ENDPOINT_DESCRIPTIONS = new QName(
MowsConstants.NSURI_MOWS_SCHEMA, "EndpointDescriptions",
MowsConstants.NSPREFIX_MOWS_SCHEMA );
+
+}
Added:
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointMetricsCapability.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointMetricsCapability.java?view=auto&rev=158698
==============================================================================
---
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointMetricsCapability.java
(added)
+++
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointMetricsCapability.java
Tue Mar 22 16:14:53 2005
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2004-2005 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.mows.v1_0.capability;
+
+import org.apache.ws.mows.v1_0.MowsConstants;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The MOWS EndpointMetrics manageability capability.
+ */
+public interface EndpointMetricsCapability
+{
+
+ /**
+ * Name of this capability.
+ */
+ String NAME = "EndpointMetrics";
+
+ /**
+ * Manageability capability URI.
+ */
+ String URI = MowsConstants.BASE_URI_MOWS_CAPABILITIES + NAME;
+
+ /**
+ * Port type name.
+ */
+ QName PORT_TYPE_NAME = new QName( MowsConstants.NSURI_MOWS_WSDL, NAME,
MowsConstants.NSPREFIX_MOWS_WSDL );
+
+ /**
+ * Topic name.
+ */
+ String TOPIC_NAME = NAME + "Capability";
+
+ /**
+ * NumberOfRequests property name.
+ */
+ QName PROP_NAME_NUMBER_OF_REQUESTS = new QName(
MowsConstants.NSURI_MOWS_SCHEMA, "NumberOfRequests",
MowsConstants.NSPREFIX_MOWS_SCHEMA );
+
+ /**
+ * NumberOfSuccessfulRequests property name.
+ */
+ QName PROP_NAME_NUMBER_OF_SUCCESSFUL_REQUESTS = new QName(
MowsConstants.NSURI_MOWS_SCHEMA, "NumberOfSuccessfulRequests",
MowsConstants.NSPREFIX_MOWS_SCHEMA );
+
+ /**
+ * NumberOfFailedRequests property name.
+ */
+ QName PROP_NAME_NUMBER_OF_FAILED_REQUESTS = new QName(
MowsConstants.NSURI_MOWS_SCHEMA, "NumberOfFailedRequests",
MowsConstants.NSPREFIX_MOWS_SCHEMA );
+
+ /**
+ * ServiceTime property name.
+ */
+ QName PROP_NAME_SERVICE_TIME = new QName( MowsConstants.NSURI_MOWS_SCHEMA,
"ServiceTime", MowsConstants.NSPREFIX_MOWS_SCHEMA );
+
+ /**
+ * MaxResponseTime property name.
+ */
+ QName PROP_NAME_MAX_RESPONSE_TIME = new QName(
MowsConstants.NSURI_MOWS_SCHEMA, "MaxResponseTime",
MowsConstants.NSPREFIX_MOWS_SCHEMA );
+
+ /**
+ * LastResponseTime property name.
+ */
+ QName PROP_NAME_LAST_RESPONSE_TIME = new QName(
MowsConstants.NSURI_MOWS_SCHEMA, "LastResponseTime",
MowsConstants.NSPREFIX_MOWS_SCHEMA );
+
+}
Added:
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointOperationalStateCapability.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointOperationalStateCapability.java?view=auto&rev=158698
==============================================================================
---
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointOperationalStateCapability.java
(added)
+++
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/EndpointOperationalStateCapability.java
Tue Mar 22 16:14:53 2005
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2004-2005 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.mows.v1_0.capability;
+
+import org.apache.ws.mows.v1_0.MowsConstants;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The MOWS EndpointOperationalState manageability capability.
+ */
+public interface EndpointOperationalStateCapability
+{
+
+ /**
+ * Name of this capability.
+ */
+ String NAME = "EndpointOperationalState";
+
+ /**
+ * Manageability capability URI.
+ */
+ String URI = MowsConstants.BASE_URI_MOWS_CAPABILITIES + NAME;
+
+ /**
+ * Port type name.
+ */
+ QName PORT_TYPE_NAME = new QName( MowsConstants.NSURI_MOWS_WSDL, NAME,
MowsConstants.NSPREFIX_MOWS_WSDL );
+
+ /**
+ * Topic name.
+ */
+ String TOPIC_NAME = NAME + "Capability";
+
+ /**
+ * CurrentOperationalState property name.
+ */
+ QName PROP_NAME_CURRENT_OPERATIONAL_STATE = new QName(
MowsConstants.NSURI_MOWS_SCHEMA, "CurrentOperationalState",
MowsConstants.NSPREFIX_MOWS_SCHEMA );
+
+ /**
+ * LastOperationalStateTransition property name.
+ */
+ QName PROP_NAME_LAST_OPERATIONAL_STATE_TRANSITION = new QName(
MowsConstants.NSURI_MOWS_SCHEMA, "LastOperationalStateTransition",
MowsConstants.NSPREFIX_MOWS_SCHEMA );
+
+}
Added:
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/ManageabilityReferencesCapability.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/ManageabilityReferencesCapability.java?view=auto&rev=158698
==============================================================================
---
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/ManageabilityReferencesCapability.java
(added)
+++
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/ManageabilityReferencesCapability.java
Tue Mar 22 16:14:53 2005
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004-2005 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.mows.v1_0.capability;
+
+import org.apache.ws.mows.v1_0.MowsConstants;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The MOWS ManageabilityReferences manageability capability.
+ */
+public interface ManageabilityReferencesCapability
+{
+
+ /**
+ * Name of this capability.
+ */
+ String NAME = "ManageabilityReferences";
+
+ /**
+ * Manageability capability URI.
+ */
+ String URI = MowsConstants.BASE_URI_MOWS_CAPABILITIES + NAME;
+
+ /**
+ * Port type name.
+ */
+ QName PORT_TYPE_NAME = new QName( MowsConstants.NSURI_MOWS_WSDL, NAME,
MowsConstants.NSPREFIX_MOWS_WSDL );
+
+}
Added:
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/OperationalStatusCapability.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/OperationalStatusCapability.java?view=auto&rev=158698
==============================================================================
---
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/OperationalStatusCapability.java
(added)
+++
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/OperationalStatusCapability.java
Tue Mar 22 16:14:53 2005
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2004-2005 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.mows.v1_0.capability;
+
+import org.apache.ws.mows.v1_0.MowsConstants;
+
+/**
+ * The MOWS OperationalStatus manageability capability.
+ */
+public interface OperationalStatusCapability
+{
+
+ /**
+ * Name of this capability.
+ */
+ String NAME = "OperationalStatus";
+
+ /**
+ * Manageability capability URI.
+ */
+ String URI = MowsConstants.BASE_URI_MOWS_CAPABILITIES + NAME;
+
+ /**
+ * Topic name.
+ */
+ String TOPIC_NAME = NAME + "Capability";
+
+}
Added:
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/RequestProcessingStateCapability.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/RequestProcessingStateCapability.java?view=auto&rev=158698
==============================================================================
---
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/RequestProcessingStateCapability.java
(added)
+++
incubator/muse/trunk/src/java/org/apache/ws/mows/v1_0/capability/RequestProcessingStateCapability.java
Tue Mar 22 16:14:53 2005
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2004-2005 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.mows.v1_0.capability;
+
+import org.apache.ws.mows.v1_0.MowsConstants;
+
+/**
+ * The MOWS RequestProcessingState manageability capability.
+ */
+public interface RequestProcessingStateCapability
+{
+
+ /**
+ * Name of this capability.
+ */
+ String NAME = "RequestProcessingState";
+
+ /**
+ * Manageability capability URI.
+ */
+ String URI = MowsConstants.BASE_URI_MOWS_CAPABILITIES + NAME;
+
+ /**
+ * Topic name.
+ */
+ String TOPIC_NAME = NAME + "Capability";
+
+}
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=158697&r2=158698
==============================================================================
--- 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 22 16:14:53 2005
@@ -16,7 +16,7 @@
package org.apache.ws.muws.v1_0;
/**
- * Constants for names defined by the MUWS 1.0 specification.
+ * Constants for names defined by the MUWS 1.0 specifications.
*/
public interface MuwsConstants
{
@@ -75,5 +75,10 @@
* Namespace URI for MUWS Part 2 topics.
*/
String NSURI_MUWS_PART2_TOPICS = BASE_URI_MUWS +
"wsdm-muws-part2-events.xml";
+
+ /**
+ * Namespace prefix for MUWS Part 2 topics.
+ */
+ String NSPREFIX_MUWS_PART2_TOPICS = "muws-p2-events";
}
Added:
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=auto&rev=158698
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/AbstractWsdmInteropTestCase.java
(added)
+++
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/AbstractWsdmInteropTestCase.java
Tue Mar 22 16:14:53 2005
@@ -0,0 +1,75 @@
+/*=============================================================================*
+ * Copyright 2005 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.interop.client;
+
+import org.apache.ws.util.test.axis.AbstractOneAxisTestCase;
+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.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlAnyURI;
+import
org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.OperationalStatusDocument;
+
+/**
+ * TODO
+ */
+public abstract class AbstractWsdmInteropTestCase extends
AbstractOneAxisTestCase
+{
+
+ protected void performMuwsIdentityCharacteristicsAct( ResourceStub
resource ) throws FaultException
+ {
+ XmlObject[] idElems = resource.getResourceProperty(
IdentityCapability.PROP_NAME_RESOURCE_ID );
+ assertEquals( 1, idElems.length );
+ assertTrue( idElems[0] instanceof XmlAnyURI );
+ XmlObject[] capabilityElems = resource.getResourceProperty(
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
+ assertContainsURI( capabilityElems, IdentityCapability.URI );
+ }
+
+ protected void performMuwsStatusAct( ResourceStub resource ) throws
FaultException
+ {
+ XmlObject[] capabilityElems = resource.getResourceProperty(
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
+ assertContainsURI( capabilityElems, OperationalStatusCapability.URI );
+ XmlObject[] statusElems = resource.getResourceProperty(
OperationalStatusCapability.PROP_NAME_OPERATIONAL_STATUS );
+ assertEquals( 1, statusElems.length );
+ assertTrue( statusElems[0] instanceof
OperationalStatusDocument.OperationalStatus );
+ }
+
+ protected void performMuwsMetricChangeAct( ResourceStub resource ) throws
FaultException
+ {
+ // TODO
+ }
+
+ protected void performMuwsStatusChangeAct( ResourceStub resource ) throws
FaultException
+ {
+ // TODO
+ }
+
+ protected void assertContainsURI( XmlObject[] capabilityElems, String uri )
+ {
+ boolean result = false;
+ for ( int i = 0; i < capabilityElems.length; i++ )
+ {
+ XmlAnyURI capabilityElem = (XmlAnyURI) capabilityElems[i];
+ if ( capabilityElem.getStringValue().equals( uri ) )
+ {
+ result = true;
+ break;
+ }
+ }
+ assertTrue( result );
+ }
+
+}
Added:
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/FaultException.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/FaultException.java?view=auto&rev=158698
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/FaultException.java
(added)
+++
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/FaultException.java
Tue Mar 22 16:14:53 2005
@@ -0,0 +1,30 @@
+/*=============================================================================*
+ * Copyright 2005 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.interop.client;
+
+/**
+ * TODO
+ */
+public class FaultException extends Exception
+{
+
+ public FaultException( String message )
+ {
+ super( message );
+ }
+
+}
+
Added:
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ResourceStub.java
URL:
http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ResourceStub.java?view=auto&rev=158698
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ResourceStub.java
(added)
+++
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ResourceStub.java
Tue Mar 22 16:14:53 2005
@@ -0,0 +1,115 @@
+/*=============================================================================*
+ * Copyright 2005 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.interop.client;
+
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.ToDocument;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.ActionDocument;
+import org.xmlsoap.schemas.soap.envelope.EnvelopeDocument;
+import org.xmlsoap.schemas.soap.envelope.Envelope;
+import org.xmlsoap.schemas.soap.envelope.Header;
+import org.apache.xmlbeans.XmlObject;
+import org.apache.ws.util.XmlBeanUtils;
+import org.apache.ws.util.soap.SoapClient;
+import
org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument;
+import
org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyResponseDocument;
+
+import javax.xml.namespace.QName;
+import java.net.URL;
+import java.net.URI;
+
+/**
+ * TODO
+ */
+public class ResourceStub
+{
+
+ private EndpointReferenceType m_epr;
+
+ public ResourceStub( EndpointReferenceType epr )
+ {
+ m_epr = epr;
+ }
+
+ XmlObject[] getResourceProperty( QName propName ) throws FaultException
+ {
+ GetResourcePropertyDocument requestDoc =
GetResourcePropertyDocument.Factory.newInstance();
+ requestDoc.setGetResourceProperty( propName );
+ XmlObject response = sendRequest( requestDoc,
"http://xyz.com/action/GetResourceProperty" );
+ if ( ! ( response instanceof
GetResourcePropertyResponseDocument.GetResourcePropertyResponse ) )
+ {
+ throw new FaultException( response.toString() );
+ }
+ return XmlBeanUtils.getChildElements( response );
+ }
+
+ EnvelopeDocument createEnvelope()
+ {
+ EnvelopeDocument envelopeDoc = EnvelopeDocument.Factory.newInstance();
+ Envelope envelope = envelopeDoc.addNewEnvelope();
+ envelope.addNewHeader();
+ envelope.addNewBody();
+ return envelopeDoc;
+ }
+
+ XmlObject sendRequest( XmlObject requestDoc, String action )
+ {
+ EnvelopeDocument envelopeDoc = createEnvelope();
+ Envelope envelope = envelopeDoc.getEnvelope();
+ addAddressingHeaders( envelope.getHeader(), action );
+ XmlBeanUtils.addChildElement( envelope.getBody(), requestDoc );
+ try
+ {
+ URL endpointURL = new URL( m_epr.getAddress().getStringValue() );
+ URI actionURI = new URI( action );
+ String response = SoapClient.sendRequest( endpointURL,
envelopeDoc.newInputStream(), actionURI );
+ EnvelopeDocument responseEnvelopeDoc = (EnvelopeDocument)
XmlObject.Factory.parse( response );
+ Envelope responseEnvelope = responseEnvelopeDoc.getEnvelope();
+ XmlObject[] responseBodyElems = XmlBeanUtils.getChildElements(
responseEnvelope.getBody() );
+ if ( responseBodyElems.length == 0 )
+ {
+ return null;
+ }
+ else
+ {
+ return responseBodyElems[0];
+ }
+ }
+ catch ( Exception e )
+ {
+ throw new RuntimeException( e );
+ }
+ }
+
+ private void addAddressingHeaders( Header header, String action )
+ {
+ ToDocument toDoc = ToDocument.Factory.newInstance();
+ toDoc.setTo( m_epr.getAddress() );
+ ActionDocument actionDoc = ActionDocument.Factory.newInstance();
+ AttributedURI actionType = actionDoc.addNewAction();
+ actionType.setStringValue( action );
+ if (m_epr.getReferenceProperties() != null)
+ {
+ XmlObject[] refPropElems =
XmlBeanUtils.getChildElements(m_epr.getReferenceProperties());
+ for (int i = 0; i < refPropElems.length; i++)
+ {
+ XmlBeanUtils.addChildElement(header, refPropElems[i]);
+ }
+ }
+ }
+
+}
Added:
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=auto&rev=158698
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ServerMgmtTestCase.java
(added)
+++
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/ServerMgmtTestCase.java
Tue Mar 22 16:14:53 2005
@@ -0,0 +1,74 @@
+/*=============================================================================*
+ * Copyright 2005 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.interop.client;
+
+/**
+ * A test case containing a test for each act in the "Server Management"
+ * playbook, as defined in the WSDM 1.0 interop scenarios doc.
+ *
+ * @author Ian Springer
+ */
+public class ServerMgmtTestCase extends AbstractWsdmInteropTestCase
+{
+
+ private ResourceStub m_resource;
+
+ protected void setUp() throws Exception
+ {
+ m_resource = new ResourceStub( null ); // TODO: pass IPMI server EPR -
read from file?
+ }
+
+ public void testMuwsIdentityCharacteristics() throws FaultException
+ {
+ performMuwsIdentityCharacteristicsAct( m_resource );
+ }
+
+ public void testServerConfiguration()
+ {
+ // TBD in interop doc
+ }
+
+ public void testServerMetrics()
+ {
+ // TBD in interop doc
+ }
+
+ public void testServerReset()
+ {
+ // TBD in interop doc
+ }
+
+ public void testServerAlertNotification()
+ {
+ // TBD in interop doc
+ }
+
+ public void testMuwsStatus() throws FaultException
+ {
+ performMuwsStatusAct( m_resource );
+ }
+
+ public void testMuwsMetricChange() throws FaultException
+ {
+ performMuwsMetricChangeAct( m_resource );
+ }
+
+ public void testMuwsStatusChange() throws FaultException
+ {
+ performMuwsStatusChangeAct( m_resource );
+ }
+
+}
Added:
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=auto&rev=158698
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/SmallDeviceMgmtTestCase.java
(added)
+++
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/SmallDeviceMgmtTestCase.java
Tue Mar 22 16:14:53 2005
@@ -0,0 +1,64 @@
+/*=============================================================================*
+ * Copyright 2005 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.interop.client;
+
+/**
+ * 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.
+ *
+ * @author Ian Springer
+ */
+public class SmallDeviceMgmtTestCase extends AbstractWsdmInteropTestCase
+{
+
+ private ResourceStub m_resource;
+
+ protected void setUp() throws Exception
+ {
+ m_resource = new ResourceStub( null ); // TODO: pass Blackberry EPR -
read from file?
+ }
+
+ public void testMuwsIdentityCharacteristics() throws FaultException
+ {
+ performMuwsIdentityCharacteristicsAct( m_resource );
+ }
+
+ public void testBlackberryMetrics() throws FaultException
+ {
+ // TODO
+ }
+
+ public void testBlackberryConfiguration()
+ {
+ // TODO
+ }
+
+ public void testMuwsStatus() throws FaultException
+ {
+ performMuwsStatusAct( m_resource );
+ }
+
+ public void testMuwsMetricChange() throws FaultException
+ {
+ performMuwsMetricChangeAct( m_resource );
+ }
+
+ public void testMuwsStatusChange() throws FaultException
+ {
+ performMuwsStatusChangeAct( m_resource );
+ }
+
+}
Added:
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=auto&rev=158698
==============================================================================
---
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/WebServicesMgmtTestCase.java
(added)
+++
incubator/muse/trunk/src/site/content/interop/src/test/org/apache/ws/muws/interop/client/WebServicesMgmtTestCase.java
Tue Mar 22 16:14:53 2005
@@ -0,0 +1,116 @@
+/*=============================================================================*
+ * Copyright 2005 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.interop.client;
+
+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.RelationshipsCapability;
+import org.apache.ws.muws.v1_0.capability.CorrelatablePropertiesCapability;
+import org.apache.ws.muws.v1_0.capability.MetricsCapability;
+import org.apache.ws.mows.v1_0.capability.EndpointIdentificationCapability;
+import org.apache.ws.mows.v1_0.capability.EndpointMetricsCapability;
+import org.apache.ws.mows.v1_0.capability.RequestProcessingStateCapability;
+import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlAnyURI;
+
+/**
+ * A test case containing a test for each act in the "Web Services Management"
+ * playbook, as defined in the WSDM 1.0 interop scenarios doc.
+ *
+ * @author Ian Springer
+ */
+public class WebServicesMgmtTestCase extends AbstractWsdmInteropTestCase
+{
+
+ private ResourceStub m_resource;
+
+ protected void setUp() throws Exception
+ {
+ m_resource = new ResourceStub( null ); // TODO: pass weather station
EPR - read from file?
+ }
+
+ public void testMuwsIdentityCharacteristics() throws FaultException
+ {
+ performMuwsIdentityCharacteristicsAct( m_resource );
+ }
+
+ public void testMowsIdentification() throws FaultException
+ {
+ XmlObject[] capabilityElems = m_resource.getResourceProperty(
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
+ assertContainsURI( capabilityElems,
EndpointIdentificationCapability.URI );
+ m_resource.getResourceProperty(
EndpointIdentificationCapability.PROP_NAME_ENDPOINT_REFERENCE );
+ m_resource.getResourceProperty(
EndpointIdentificationCapability.PROP_NAME_ENDPOINT_DESCRIPTIONS );
+ // TODO: validate each endpoint description URLs point to valid WSDLs
that each contain a single port
+ // with a soap:address that matches the wsa:Address in the
mows-xs:EPR
+ }
+
+ public void testMowsManageabilityReferences()
+ {
+ // TODO: invoke GetManageabilityReferences operation and validate
response
+ }
+
+ public void testMowsMetrics() throws FaultException
+ {
+ XmlObject[] capabilityElems = m_resource.getResourceProperty(
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
+ assertContainsURI( capabilityElems, MetricsCapability.URI );
+ assertContainsURI( capabilityElems, EndpointMetricsCapability.URI );
+ m_resource.getResourceProperty(
EndpointMetricsCapability.PROP_NAME_NUMBER_OF_REQUESTS );
+ m_resource.getResourceProperty(
EndpointMetricsCapability.PROP_NAME_NUMBER_OF_FAILED_REQUESTS );
+ m_resource.getResourceProperty(
EndpointMetricsCapability.PROP_NAME_NUMBER_OF_SUCCESSFUL_REQUESTS );
+ m_resource.getResourceProperty(
EndpointMetricsCapability.PROP_NAME_SERVICE_TIME );
+ m_resource.getResourceProperty(
EndpointMetricsCapability.PROP_NAME_MAX_RESPONSE_TIME );
+ m_resource.getResourceProperty(
EndpointMetricsCapability.PROP_NAME_LAST_RESPONSE_TIME );
+ // TODO: validate responses
+ }
+
+ public void testMuwsStatus() throws FaultException
+ {
+ performMuwsStatusAct( m_resource );
+ }
+
+ public void testMowsState()
+ {
+ // TBD in interop doc
+ }
+
+ public void testMowsRequestProcessingNotification() throws FaultException
+ {
+ XmlObject[] capabilityElems = m_resource.getResourceProperty(
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
+ assertContainsURI( capabilityElems,
RequestProcessingStateCapability.URI );
+ // TODO: subscribe to mows-events:RequestProcessingObservations topic
and validate that events are received
+ }
+
+ public void testMuwsRelationships() throws FaultException
+ {
+ XmlObject[] capabilityElems = m_resource.getResourceProperty(
ManageabilityCharacteristicsCapability.PROP_NAME_MANAGEABILITY_CAPABILITY );
+ assertContainsURI( capabilityElems, RelationshipsCapability.URI );
+ XmlObject[] idElems = m_resource.getResourceProperty(
IdentityCapability.PROP_NAME_RESOURCE_ID );
+ assertEquals( 1, idElems.length );
+ assertTrue( idElems[0] instanceof XmlAnyURI );
+ m_resource.getResourceProperty(
RelationshipsCapability.PROP_NAME_RELATIONSHIP );
+ // TODO: validate response is a valid relationship by sending request
to each participant EPR
+ }
+
+ public void testWeatherStationCorrelateableProperties() throws
FaultException
+ {
+ 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
+ // TODO: validate that the match assertion is true
+ }
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]