* normal Dispatch<OMElement> flow
* @throws Exception
*/
public void testOMOutflow() throws Exception {
// Get the BlockFactory
OMBlockFactory f = (OMBlockFactory)
FactoryRegistry.getFactory(OMBlockFactory.class);
// Create a Block using the sample string as the content. This simulates
// what occurs on the outbound JAX-WS dispatch<OMElement> client
StringReader sr = new StringReader(sampleText);
XMLStreamReader inputReader = inputFactory.createXMLStreamReader(sr);
StAXOMBuilder builder = new StAXOMBuilder(inputReader);
OMElement om = builder.getDocumentElement();
Block block = f.createFrom(om, null, null);
// Assuming no handlers are installed, the next thing that will happen
// is a XMLStreamReader will be requested...to go to OM. At this point the
// block should be consumed.
XMLStreamReader reader = block.getXMLStreamReader(true);