Author: ips
Date: Tue Apr  5 07:58:41 2005
New Revision: 160182

URL: http://svn.apache.org/viewcvs?view=rev&rev=160182
Log:
finished server acts

Modified:
    
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/WebServicesMgmtTestCase.java

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=160181&r2=160182
==============================================================================
--- 
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 Apr  5 07:58:41 2005
@@ -15,22 +15,19 @@
  
*=============================================================================*/
 package org.apache.ws.muws.interop.client;
 
-import org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument;
+import com.dell.wsdm.demos.interop.x2005.x04.AttentionLedOnDocument;
+import com.dell.wsdm.demos.interop.x2005.x04.IpmiserverPropertyQNames;
 import org.apache.ws.addressing.XmlBeansEndpointReference;
-import 
org.apache.ws.muws.v1_0.capability.ManageabilityCharacteristicsCapability;
 import org.apache.ws.muws.v1_0.capability.ConfigurationCapability;
+import 
org.apache.ws.muws.v1_0.capability.ManageabilityCharacteristicsCapability;
 import org.apache.ws.muws.v1_0.capability.OperationalStatusCapability;
+import org.apache.xmlbeans.XmlBoolean;
 import org.apache.xmlbeans.XmlObject;
 import org.apache.xmlbeans.XmlString;
-import org.apache.xmlbeans.XmlBoolean;
+import org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument;
 
 import java.net.URL;
 
-import rim.pda.DateDocument;
-import com.dell.wsdm.demos.interop.x2005.x04.IpmiserverPropertyQNames;
-import com.dell.wsdm.demos.interop.x2005.x04.AttentionLedOnDocument;
-import com.dell.wsdm.demos.interop.x2005.x04.CoverOpenDocument;
-
 /**
  * A test case containing a test for each act in the "Server Management"
  * playbook, as defined in the WSDM 1.0 interop scenarios doc.
@@ -46,7 +43,6 @@
     private static final String IPMI_SERVER_EPR = System.getProperty( 
SYSPROP_IPMI_SERVER_EPR, DEFAULT_IPMI_SERVER_EPR );
 
     private static final String NSURI_IPMI_SERVER = 
"http://dell.com/wsdm/demos/interop/2005/04";;
-    private static final String NSPREFIX_IPMI_SERVER = "svr";
     private static final String CAPABILITY_URI_SERVER_CONFIGURATION = 
NSURI_IPMI_SERVER + "/ServerConfiguration";
     private static final String CAPABILITY_URI_SERVER_CHASSIS_CONFIGURATION = 
NSURI_IPMI_SERVER + "/ServerChassisConfiguration";
     private static final String CAPABILITY_URI_SERVER_ALERT_STATUS = 
NSURI_IPMI_SERVER + "/ServerAlertStatus";
@@ -74,7 +70,8 @@
         assertContainsURI( capabilityElems, 
CAPABILITY_URI_SERVER_CONFIGURATION );
         XmlObject serialNumberPropElem = getSingleProperty( m_resource, 
IpmiserverPropertyQNames.SERIALNUMBER );
         assertTrue( serialNumberPropElem instanceof XmlString );
-        System.out.println( "Serial number value returned by server: " + 
((XmlString)serialNumberPropElem).getStringValue() );
+        System.out.println( "Value of svr:SerialNumber property is: " + 
((XmlString)serialNumberPropElem).getStringValue() );
+        System.out.println( "*** Please verify that this result matches the 
known manufacturer's serial number." );
         XmlObject modelNamePropElem = getSingleProperty( m_resource, 
IpmiserverPropertyQNames.MODELNAME );
         assertTrue( modelNamePropElem instanceof XmlString );
         XmlObject ipNamePropElem = getSingleProperty( m_resource, 
IpmiserverPropertyQNames.IPNAME );
@@ -92,7 +89,8 @@
         AttentionLedOnDocument attentionLedOnDoc = 
AttentionLedOnDocument.Factory.newInstance();
         attentionLedOnDoc.setAttentionLedOn( true );
         setSingleProperty( m_resource, attentionLedOnDoc );
-        System.out.println( "AttentionLedOn property has been set to true. 
Please verify that the LED on the physical server is now lit up." );
+        System.out.println( "svr:AttentionLedOn property has been set to 
true." );
+        System.out.println( "*** Please verify that the front panel attention 
LED blinks for approximately ten seconds." );
     }
 
     public void testServerChassisIntrusionDetection() throws FaultException
@@ -103,8 +101,8 @@
         assertContainsURI( capabilityElems, 
CAPABILITY_URI_SERVER_CHASSIS_CONFIGURATION );
         XmlObject coverOpenPropElem = getSingleProperty( m_resource, 
IpmiserverPropertyQNames.COVEROPEN );
         assertTrue( coverOpenPropElem instanceof XmlBoolean );
-        // TODO
-        System.out.println( "Please verify that ..." );
+        System.out.println( "Value of svr:CoverOpen property is: " + 
((XmlBoolean)coverOpenPropElem).getStringValue() );
+        System.out.println( "*** Please verify that this result matches the 
current visible state of the front panel bezel and other interlocked covers of 
the server." );
     }
 
     public void testMuwsStatus() throws FaultException

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=160181&r2=160182
==============================================================================
--- 
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 Apr  5 07:58:41 2005
@@ -29,7 +29,6 @@
 import org.apache.xmlbeans.XmlAnyURI;
 import org.apache.xmlbeans.XmlDateTime;
 import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlPositiveInteger;
 import org.apache.xmlbeans.XmlQName;
 import org.apache.xmlbeans.XmlString;
 import 
org.everestWeather.wsdm.samples.x2005.x04.schema.WeatherstationPropertyQNames;
@@ -50,7 +49,6 @@
 import javax.wsdl.factory.WSDLFactory;
 import javax.wsdl.xml.WSDLReader;
 import javax.xml.namespace.QName;
-import java.math.BigInteger;
 import java.net.MalformedURLException;
 import java.net.URL;
 
@@ -63,6 +61,7 @@
 public class WebServicesMgmtTestCase extends AbstractWsdmInteropTestCase
 {
 
+    public static final String SYSPROP_WEATHER_STATION_URL = "TODO"; // this 
is the Weather Station business Web service
     public static final String SYSPROP_WEATHER_STATION_EPR_URL = 
"weather_station.epr";
     public static final String SYSPROP_WEATHER_STATION_2_EPR_URL = 
"weather_station_2.epr";
 
@@ -99,27 +98,20 @@
         assertTrue( epDescsPropElem instanceof 
EndpointDescriptionsDocument.EndpointDescriptions );
         EndpointDescriptionsDocument.EndpointDescriptions epDescs = 
(EndpointDescriptionsDocument.EndpointDescriptions)epDescsPropElem;
         assertTrue( "mows-xs:EndpointDescriptions element is not valid", 
epDescs.validate() );
-
-        String[] descriptionArray = epDescs.getDescriptionArray();
-        boolean addressMatch = false;
-        for (int i = 0; i < descriptionArray.length; i++)
+        String[] wsdlURLs = epDescs.getDescriptionArray();
+        for (int i = 0; i < wsdlURLs.length; i++)
         {
-            String s = descriptionArray[i];
+            String wsdlURL = wsdlURLs[i];
             WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
-            Definition definition = wsdlReader.readWSDL(s);
-            assertNotNull("WSDL at location: " + s + " was 
null.",definition);//valid wsdls
-            assertEquals("There must only be 1 service in the wsdl file.", 1, 
definition.getServices().size()); //single service
+            Definition definition = wsdlReader.readWSDL(wsdlURL);
+            assertNotNull("WSDL at location: " + wsdlURL + " was 
null.",definition);//valid wsdls
+            assertEquals("There must only be exactly one service in the WSDL 
file.", 1, definition.getServices().size()); //single service
             Service service = (Service) 
definition.getServices().values().iterator().next();
-            assertEquals("There must only be 1 port associated with the 
service in the wsdl file.", 1, service.getPorts().size());  //single port
+            assertEquals("There must only be exactly one port associated with 
the service in the WSDL file.", 1, service.getPorts().size());  //single port
             Port port = (Port) service.getPorts().values().iterator().next();
             SOAPAddress soapAddress = (SOAPAddress) 
port.getExtensibilityElements().get(0);
-            if(address.equals(soapAddress.getLocationURI()) ) //check that EPR 
address matches that contained in soap:address
-            {
-                addressMatch = true;
-            }
+            assertEquals("The soap:address in WSDL at " + wsdlURL + " did not 
match the EPR address.", address, soapAddress.getLocationURI()); //EPR address 
matches that contained in soap:address
         }
-
-        assertTrue("The EPR Address URI did not match any contained in the 
WSDLS", addressMatch);
     }
 
     public void testMowsManageabilityReferences()



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to