}
@Test
public void handleReturnValueAxiom() throws Exception {
AxiomSoapMessageFactory messageFactory = new AxiomSoapMessageFactory();
MessageContext messageContext = new DefaultMessageContext(messageFactory);
MyType type = new MyType();
type.setString("Foo");
JAXBElement<MyType> element = new JAXBElement<MyType>(new QName("http://springframework.org", "type"), MyType.class, type);
processor.handleReturnValue(messageContext, supportedReturnType, element);
assertTrue("context has no response", messageContext.hasResponse());
AxiomSoapMessage response = (AxiomSoapMessage) messageContext.getResponse();
Transformer transformer = TransformerFactory.newInstance().newTransformer();
StringResult payloadResult = new StringResult();
transformer.transform(response.getPayloadSource(), payloadResult);