* Simulate creating a SOAP 1.2 message when the business object
* provided is the full message.
*/
public void testCreateSoap12FromMessage() throws Exception {
// Create a SOAP 1.2 Message
MessageFactory mf = (MessageFactory)
FactoryRegistry.getFactory(MessageFactory.class);
// Get the BlockFactory
XMLStringBlockFactory f = (XMLStringBlockFactory)
FactoryRegistry.getFactory(XMLStringBlockFactory.class);
// Create a Block using the sample string as the content. This simulates
// what occurs on the outbound JAX-WS dispatch<String> client
Block block = f.createFrom(sampleSoap12Envelope, null, null);
// Create a Message with the full XML contents that we have
Message m = mf.createFrom(block.getXMLStreamReader(true), 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.
OMElement om = m.getAsOMElement();