ArrayList topicQNames = new ArrayList( );
for ( int i = 0; i < topicSpaceElements.length; i++ )
{
MessageElement topicSpaceElement = topicSpaceElements[i];
//System.out.println(topicSpaceElement.getAsString());
Iterator children = topicSpaceElement.getChildElements( );
assertNotNull( children );
assertTrue( children.hasNext( ) );
String targetNS = topicSpaceElement.getAttributeValue( "targetNamespace" );
//System.out.println("Namespace: " + targetNS);
while ( children.hasNext( ) )
{
MessageElement topicElem = (MessageElement) children.next( );
assertEquals( new QName( TopicsConstants.NSURI_WS_TOPICS_1_0, "Topic" ),
NameUtils.toQName( topicElem.getElementName( ) ) );
String name = topicElem.getAttributeValue( "name" );
topicQNames.add( new QName( targetNS, name ) );
//System.out.println("Topic Name: " + name);
}
}