TL DR
You have an extra / at the end of the namespace indicated in the annotation @XmlRootElement.
LONG RESPONSE
package info
The namespace is correctly specified at the package level @XmlSchemaannotation:
@XmlSchema(namespace="http://www.docsite.com/ClientConfig.xsd",elementFormDefault=XmlNsForm.QUALIFIED)
package com.convertXml.docSite.XmlConverter;
import javax.xml.bind.annotation.XmlSchema;
import javax.xml.bind.annotation.XmlNsForm;
Clientconfig
But you redefined it with the wrong namespace in the class ClientConfig. You have an extra /at the end of the namespace specified in the annotation @XmlRooElement.
package com.convertXml.docSite.XmlConverter;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name="ClientConfig",namespace="http://www.docsite.com/ClientConfig.xsd/")
public class ClientConfig {}
@XmlSchema package-info, @XmlRootElement.
package com.convertXml.docSite.XmlConverter;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name="ClientConfig")
public class ClientConfig {}
Demo
unmarshal :
package com.convertXml.docSite.XmlConverter;
import java.io.StringReader;
import javax.xml.bind.*;
public class Demo {
public static void main(String[] args) throws Exception {
JAXBContext jc = JAXBContext.newInstance(ClientConfig.class);
Unmarshaller unmarshaller = jc.createUnmarshaller();
StringReader xml = new StringReader("<ClientConfig xmlns='http://www.docsite.com/ClientConfig.xsd'/>");
ClientConfig clientConfig = (ClientConfig) unmarshaller.unmarshal(xml);
}
}