* outbound flow
* @throws Exception
*/
public void testDOMSourceOutflow() throws Exception {
// Get the BlockFactory
SourceBlockFactory f = (SourceBlockFactory)
FactoryRegistry.getFactory(SourceBlockFactory.class);
// Turn the content into a stream
ByteArrayInputStream bais = new ByteArrayInputStream(sampleText.getBytes());
// Create a DOM tree from the sample text
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
domFactory.setNamespaceAware(true);
DocumentBuilder domBuilder = domFactory.newDocumentBuilder();
Document domTree = domBuilder.parse(bais);
Node node = domTree.getDocumentElement();
TestLogger.logger.debug(node.toString());
// Create a DOMSource object from the DOM tree
DOMSource ds = new DOMSource(node);
node = ds.getNode();
// Create a Block using the sample string as the content. This simulates
// what occurs on the outbound JAX-WS dispatch<Source> client
Block block = f.createFrom(ds, null, null);
// We didn't pass in a qname, so the following should return false
assertTrue(!block.isQNameAvailable());
// Assuming no handlers are installed, the next thing that will happen