childElems = XmlBeanUtils.getChildElements( fooElem, new QName( "foo" ) );
//assertEquals( 0, childElems.length ); // a bug in XmlBeans causes this assertion to fail
resourcePropertyValueChangeNotificationType = ResourcePropertyValueChangeNotificationType.Factory.newInstance();
oldValue = resourcePropertyValueChangeNotificationType.addNewOldValue();
CurrentTimeDocument currentTimeDocument = CurrentTimeDocument.Factory.newInstance();
currentTimeDocument.setCurrentTime( Calendar.getInstance( ) );
XmlObject newXBean = XmlBeanUtils.copyXmlBean( currentTimeDocument.xgetCurrentTime() );
XmlBeanUtils.addChildElement( oldValue, newXBean );
childElems = XmlBeanUtils.getChildElements( oldValue, new QName( "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "CurrentTime" ) );
assertEquals( 1, childElems.length );
XmlObject currentTimeElem = childElems[0];
childElems = XmlBeanUtils.getChildElements( currentTimeElem, new QName( "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "CurrentTime" ) );