// Get the jaxrpc-mapping.xml object graph
JavaWsdlMapping jaxrpcMapping = jaxrpcContext.getJavaWsdlMapping();
// schemabinding marshaller is the default delegate
JBossXBMarshaller delegate = marshaller;
// marshalling context
delegate.setProperty(JBossXBConstants.JBXB_XS_MODEL, model);
delegate.setProperty(JBossXBConstants.JBXB_TYPE_QNAME, xmlType);
delegate.setProperty(JBossXBConstants.JBXB_ROOT_QNAME, xmlName);
delegate.setProperty(JBossXBConstants.JBXB_JAVA_MAPPING, jaxrpcMapping);
// marshall
StringWriter strwr = new StringWriter();
delegate.marshal(value, strwr);
String xmlFragment = strwr.toString();
log.debug("serialized: " + xmlFragment);
return new BufferedStreamResult(xmlFragment);
}