XercesXsMarshaller marshaller = new XercesXsMarshaller();
marshaller.setSchemaResolver(RESOLVER);
// we need to specify what elements are top most (roots) providing namespace URI, prefix and local name
marshaller.addRootElement(PRODUCER_NAMESPACE, "", "producer-configuration");
// declare default namespace
marshaller.declareNamespace("wpc", PRODUCER_NAMESPACE);
// add schema location by declaring xsi namespace and adding xsi:schemaLocation attribute