Package org.apache.axis.message

Examples of org.apache.axis.message.MessageElement


   throws Exception
   {
      final MessageElement[] SET_REQUEST_COMPONENT_TYPE_ARRAY__INSERT =
         new MessageElement[]
         {
            new MessageElement( axis.com.xyz.DiskWsdmServiceWSResource.PropertyQNames.FILESYSTEM, FILESYSTEM__VAR ),
            new MessageElement( axis.com.xyz.DiskWsdmServiceWSResource.PropertyQNames.FILESYSTEM, FILESYSTEM_USR )
         };

      try
      {
         m_resourcePropsMgr.insertResourceProperties( SET_REQUEST_COMPONENT_TYPE_ARRAY__INSERT );
View Full Code Here


    * @throws Exception DOCUMENT_ME
    */
   public void testInsertStateInfo(  )
   throws Exception
   {
      MessageElement ms1   = new MessageElement( axis.com.xyz.DiskWsdmServiceWSResource.PropertyQNames.STATEINFO );
      SOAPElement    elem1 =
         ms1.addChildElement( "State",
                              DiskWsdmServiceWSResource.PropertyQNames.STATEINFO.getNamespaceURI(  ) );
      elem1.addTextNode( "http://destroy" );
      SOAPElement elem2 =
         ms1.addChildElement( "TimeEntered",
                              DiskWsdmServiceWSResource.PropertyQNames.STATEINFO.getNamespaceURI(  ) );
      elem2.addTextNode( "2004-03-15T00:00:00" );

      MessageElement ms2    = new MessageElement( DiskWsdmServiceWSResource.PropertyQNames.STATEINFO );
      SOAPElement    elem11 =
         ms2.addChildElement( "State",
                              axis.com.xyz.DiskWsdmServiceWSResource.PropertyQNames.STATEINFO.getNamespaceURI(  ) );
      elem11.addTextNode( "http://destroy2" );
      SOAPElement elem22 =
         ms2.addChildElement( "TimeEntered",
                              DiskWsdmServiceWSResource.PropertyQNames.STATEINFO.getNamespaceURI(  ) );
      elem22.addTextNode( "2004-05-15T00:00:00" );

      MessageElement[] SET_REQUEST_COMPONENT_TYPE_ARRAY__INSERT = new MessageElement[]
                                                                  {
View Full Code Here

      m_resourcePropsMgr.deleteResourceProperty( DiskWsdmServiceWSResource.PropertyQNames.MANUFACTURER );
      MessageElement[] insertElems =
         new MessageElement[]
         {
            new MessageElement( axis.com.xyz.DiskWsdmServiceWSResource.PropertyQNames.MANUFACTURER,
                                MANUFACTURER_MAXTOR )
         };
      m_resourcePropsMgr.insertResourceProperties( insertElems );

      assertTrue( listener.isNotified(  ) );
View Full Code Here

   {
      m_resourcePropsMgr.deleteResourceProperty( axis.com.xyz.DiskWsdmServiceWSResource.PropertyQNames.MANUFACTURER );
      MessageElement[] updateElems =
         new MessageElement[]
         {
            new MessageElement( DiskWsdmServiceWSResource.PropertyQNames.MANUFACTURER, MANUFACTURER_MAXTOR )
         };

      try
      {
         m_resourcePropsMgr.updateResourceProperties( updateElems );
View Full Code Here

   public void testUpdateEmptyResourceQName(  )
   throws Exception
   {
      MessageElement[] updateElems = new MessageElement[]
                                     {
                                        new MessageElement( new QName( "" ),
                                                            "" )
                                     };

      try
      {
View Full Code Here

      {
         ReferencePropertiesType props     = new ReferencePropertiesType(  );
         MessageElement[]        propElems =
            new MessageElement[]
            {
               new MessageElement( MuseAddressingConstants.REFERENCE_PROP_QNAME_RESOURCE_ID,
                                   this.getId(  ) )
            };
         props.set_any( propElems );
         endpointRef.setProperties( props );
      }
View Full Code Here

   public void testFindResource(  )
   throws Exception
   {
      EndpointReferenceType resource = m_stub.findResource( new FindResourceRequest( "disk", "1234" ) );
      Assert.assertNotNull( resource );
      MessageElement prop =
         resource.getProperties(  ).get( MuseAddressingConstants.REFERENCE_PROP_QNAME_RESOURCE_ID );
      Iterator       eleList = prop.getChildElements(  );
      Object         theText = eleList.next(  );
      Assert.assertEquals( "1234",
                           theText.toString(  ) );
   }
View Full Code Here

      GetMultipleResourcePropertiesResponse response = m_stub.getMultipleResourceProperties( request );

      // validate results
      assertNotNull( response );

      MessageElement propElem = response.get_any(  )[0];
      assertEquals( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE,
                    NameUtils.toQName( propElem.getElementName(  ) ) );
      assertEquals( String.valueOf( ExampleConstants.INITIAL_PROP_VALUE__BLOCK_SIZE ),
                    propElem.getValue(  ) );

      propElem = response.get_any(  )[1];
      assertEquals( ExampleConstants.RESOURCE_PROP_QNAME_NUMBER_OF_BLOCKS,
                    NameUtils.toQName( propElem.getElementName(  ) ) );
      assertEquals( ExampleConstants.INITIAL_PROP_VALUE__NUMBER_OF_BLOCKS.toString(  ),
                    propElem.getValue(  ) );
   }
View Full Code Here

         m_stub.getResourceProperty( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE );

      // validate results
      assertNotNull( response );

      MessageElement propElem = response.get_any(  )[0];
      assertEquals( ExampleConstants.RESOURCE_PROP_QNAME_BLOCK_SIZE,
                    NameUtils.toQName( propElem.getElementName(  ) ) );
      assertEquals( String.valueOf( ExampleConstants.INITIAL_PROP_VALUE__BLOCK_SIZE ),
                    propElem.getValue(  ) );
   }
View Full Code Here

   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,
View Full Code Here

TOP

Related Classes of org.apache.axis.message.MessageElement

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.