return new QName(namespace, name);
} else {
JAXBContext context = getJAXBContext(cls, type);
JAXBContextProxy proxy = ReflectionInvokationHandler.createProxyWrapper(context,
JAXBContextProxy.class);
JAXBBeanInfo info = JAXBUtils.getBeanInfo(proxy, cls);
if (info != null) {
try {
Object instance = object == null ? cls.newInstance() : object;
String name = getLocalName(info.getElementLocalName(instance), cls.getSimpleName(),
pluralName);
String namespace = getNamespace(info.getElementNamespaceURI(instance));
return new QName(namespace, name);
} catch (Exception ex) {
// ignore
}
}