Package axis.com.ibm.www.xmlns.stdwip.web_services.WS_ResourceProperties

Examples of axis.com.ibm.www.xmlns.stdwip.web_services.WS_ResourceProperties.SetResourceProperties_Element


    */
   public void testDiskPortSetResourceProperties(  )
   throws Exception
   {
      // Test operation
      SetResourceProperties_Element request =
         new SetResourceProperties_Element(  );
      MessageElement                                                                          block_size_ele =
         new MessageElement( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE );
      MessageElement                                                                          num_blocks_ele =
         new MessageElement( ExampleConstants.RESOURCE_PROP_QNAME_NUMBER_OF_BLOCKS );
      MessageElement                                                                          manu_ele =
         new MessageElement( ExampleConstants.RESOURCE_PROP_QNAME_MANUFACTURER );
      SetRequestComponentType[]                                                               set_components =
         new SetRequestComponentType[4];

      String bsValue = "7777";
      block_size_ele.addTextNode( bsValue );
      String nobValue = "55";
      num_blocks_ele.addTextNode( nobValue );
      manu_ele.addTextNode( "Another XYZ Company" );

      set_components[0]    = new UpdateType(  );
      set_components[1]    = new UpdateType(  );
      set_components[2]    = new UpdateType(  );
      set_components[3]    = new DeleteType(  );
      ( (UpdateType) set_components[0] ).set_any( new MessageElement[]
                                                  {
                                                     block_size_ele
                                                  } );
      ( (UpdateType) set_components[1] ).set_any( new MessageElement[]
                                                  {
                                                     num_blocks_ele
                                                  } );
      ( (UpdateType) set_components[2] ).set_any( new MessageElement[]
                                                  {
                                                     manu_ele
                                                  } );
      ( (DeleteType) set_components[3] ).setResourceProperty( NameUtils.toQName( manu_ele.getElementName(  ) ) );

      request.setSetRequestComponent( set_components );

      m_stub.setResourceProperties( request );
      assertContainsExactlyOnePropertyWithValue( bsValue,
                                                 getSimpleProperty( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE,
                                                                    RESOURCE_ID ) );
View Full Code Here


   {
      // run this just to get the Manufacturer property inserted
      testDiskPortSetResourcePropertiesInsert(  );

      // Test operation
      SetResourceProperties_Element request        = new SetResourceProperties_Element(  );
      DeleteType[]           set_components = new DeleteType[1];

      set_components[0] = new DeleteType(  );
      set_components[0].setResourceProperty( ExampleConstants.RESOURCE_PROP_QNAME_MANUFACTURER );
      request.setSetRequestComponent( set_components );
      m_stub.setResourceProperties( request );

      // no return value to validate; if no exceptions occurred, assume everything is OK
      // cannot delete a non-existing property
      set_components[0].setResourceProperty( ExampleConstants.RESOURCE_PROP_QNAME_MANUFACTURER );
      request.setSetRequestComponent( set_components );

      try
      {
         m_stub.setResourceProperties( request );
         fail( "Should not be allowed to delete a non-existing property" );
      }
      catch ( Throwable t )
      {
         // success
      }

      // cannot delete a required property
      set_components[0].setResourceProperty( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE );
      request.setSetRequestComponent( set_components );

      try
      {
         m_stub.setResourceProperties( request );
         fail( "Should not be allowed to delete a required property" );
View Full Code Here

    * Tests SetResourceProperties doing an Insert
    */
   public void testDiskPortSetResourcePropertiesInsert(  )
   throws Exception
   {
      SetResourceProperties_Element request =
         new SetResourceProperties_Element(  );
      InsertType[]           set_components = new InsertType[1];
      MessageElement         manuElem       =
         new MessageElement( ExampleConstants.RESOURCE_PROP_QNAME_MANUFACTURER );
      manuElem.addTextNode( "New XYZ Company" );
      set_components[0] = new InsertType(  );
      set_components[0].set_any( new MessageElement[]
                                 {
                                    manuElem
                                 } );

      request.setSetRequestComponent( set_components );

      try
      {
         m_stub.setResourceProperties( request );
         fail(  );
View Full Code Here

    */
   public void testDiskPortSetResourcePropertiesUpdate(  )
   throws Exception
   {
      // Test operation
      SetResourceProperties_Element request        = new SetResourceProperties_Element(  );
      UpdateType[]           set_components = new UpdateType[1];
      MessageElement         bsElem         =
         new MessageElement( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE );
      final String           bsValue = "7777";
      bsElem.addTextNode( bsValue );
      set_components[0] = new UpdateType(  );
      set_components[0].set_any( new MessageElement[]
                                 {
                                    bsElem
                                 } );
      request.setSetRequestComponent( set_components );
      m_stub.setResourceProperties( request );
      assertContainsExactlyOnePropertyWithValue( bsValue,
                                                 getSimpleProperty( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE,
                                                                    RESOURCE_ID ) );
   }
View Full Code Here

                    propElems[0].getValue(  ) );

      testGetCapacityMetric(  );

      // Now update the value of the ActiveTime metric
      SetResourceProperties_Element request            = new SetResourceProperties_Element(  );
      UpdateType[]           setComponents      = new UpdateType[1];
      MessageElement         activeTimePropElem =
         new MessageElement( ExampleConstants.RESOURCE_PROP_QNAME_ACTIVE_TIME );
      final String           activeTimeValue = "P7M2DT18H1M32S";
      activeTimePropElem.addTextNode( activeTimeValue );
      setComponents[0] = new UpdateType(  );
      setComponents[0].set_any( new MessageElement[]
                                {
                                   activeTimePropElem
                                } );
      request.setSetRequestComponent( setComponents );
      m_stub.setResourceProperties( request );

      // Check again to see that ActiveTime has changed.
      propElems = getComplexProperty( ExampleConstants.RESOURCE_PROP_QNAME_ACTIVE_TIME, RESOURCE_ID );
      assertNotNull( propElems );
View Full Code Here

    * @throws java.rmi.RemoteException
    */
   private void deleteResourceProp( QName prop_qname )
   throws java.rmi.RemoteException
   {
      SetResourceProperties_Element request = new SetResourceProperties_Element();
      DeleteType[] set_components = new DeleteType[]
      {
         new DeleteType( prop_qname )
      };
      request.setSetRequestComponent( set_components );
      m_stub.setResourceProperties( request );
   }
View Full Code Here

TOP

Related Classes of axis.com.ibm.www.xmlns.stdwip.web_services.WS_ResourceProperties.SetResourceProperties_Element

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.