SOAPMessageContextJAXWS messageContext = new SOAPMessageContextJAXWS();
QName portTypeName = new QName("http://jbossws.jboss.org", "GetSedans");
EndpointMetaData endpointMetaData = new MockEndpointMetaData(portTypeName);
messageContext.setEndpointMetaData(endpointMetaData);
MessageContextAssociation.pushMessageContext(messageContext);
BufferedStreamResult result = (BufferedStreamResult)serializer.serialize(qname, null, response, context, null);
Element element = DOMUtils.parse(result.toString());
List<Element> elements = DOMUtils.getChildElementsAsList(element, "return");
for (Element ele : elements)
{
String typeValue = DOMUtils.getAttributeValue(ele, new QName("http://www.w3.org/2001/XMLSchema-instance", "type"));
assertEquals("The namespace prefix is not serialized", true ,typeValue.indexOf(":") > 0);