import org.apache.cxf.wsdl.JAXBExtensibilityElement;
public final class XmlIoPlugin extends AbstractWSDLPlugin {
public ExtensibilityElement createExtension(final Map<String, Object> args) throws WSDLException {
XMLBindingMessageFormat xmlFormat = null;
Class<?> clz = getOption(args, Class.class);
QName qname = getOption(args, QName.class);
ExtensibilityElement ext = registry.createExtension(clz, ToolConstants.XML_FORMAT);
if (ext instanceof JAXBExtensibilityElement) {
xmlFormat = (XMLBindingMessageFormat)((JAXBExtensibilityElement)ext).getValue();
} else {
xmlFormat = (XMLBindingMessageFormat)ext;
}
xmlFormat.setRootNode(qname);
return ext;
}