//Sample text for JAXBSource
String echoSample = "<echoString xmlns=\"http://test\"><input>Hello World</input></echoString>";
// Get the BlockFactory
SourceBlockFactory f = (SourceBlockFactory)
FactoryRegistry.getFactory(SourceBlockFactory.class);
//Create a JAXBSource
JAXBContext context = JAXBContext.newInstance("test");
Unmarshaller u = context.createUnmarshaller();
ByteArrayInputStream inputStream = new ByteArrayInputStream(echoSample.getBytes());
EchoString jaxb = (EchoString)u.unmarshal(inputStream);
JAXBSource src = new JAXBSource(context.createMarshaller(), jaxb);
// 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(src, 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