WidgetComponentType widget = createWidgetComponentType( wcdf );
if ( widget == null ) {
return null;
}
IThingWriterFactory factory = new XmlThingWriterFactory();
IThingWriteContext context = new DefaultThingWriteContext( factory, true );
IThingWriter writer;
try {
writer = factory.getWriter( widget );
} catch ( UnsupportedThingException ex ) {
logger.error( "No writer to write widget component type to XML", ex );
return null;
}