private QName getJaxbQName(JAXBContextProxy jaxbProxy, Class<?> type, Map<Class<?>, QName> clsMap) { XmlRootElement root = type.getAnnotation(XmlRootElement.class); if (root != null) { return getJaxbQName(root.name(), root.namespace(), type, clsMap); } try { JAXBBeanInfo jaxbInfo = jaxbProxy == null ? null : JAXBUtils.getBeanInfo(jaxbProxy, type); if (jaxbInfo == null) { return null; } Object instance = type.newInstance(); return getQNameFromParts(jaxbInfo.getElementLocalName(instance), jaxbInfo.getElementNamespaceURI(instance), type, clsMap); } catch (Exception ex) { // ignore } return null; }
private QName getJaxbQName(JAXBContextProxy jaxbProxy, Class<?> type, Map<Class<?>, QName> clsMap) { XmlRootElement root = type.getAnnotation(XmlRootElement.class); if (root != null) { return getJaxbQName(root.name(), root.namespace(), type, clsMap); } try { JAXBBeanInfo jaxbInfo = jaxbProxy == null ? null : JAXBUtils.getBeanInfo(jaxbProxy, type); if (jaxbInfo == null) { return null; } Object instance = type.newInstance(); return getQNameFromParts(jaxbInfo.getElementLocalName(instance), jaxbInfo.getElementNamespaceURI(instance), type, clsMap); } catch (Exception ex) { // ignore } return null; }
private QName getJaxbQName(JAXBContextProxy jaxbProxy, Class<?> type, Map<Class<?>, QName> clsMap) { XmlRootElement root = type.getAnnotation(XmlRootElement.class); if (root != null) { return getJaxbQName(root.name(), root.namespace(), type, clsMap); } try { JAXBBeanInfo jaxbInfo = jaxbProxy == null ? null : JAXBUtils.getBeanInfo(jaxbProxy, type); if (jaxbInfo == null) { return null; } Object instance = type.newInstance(); return getQNameFromParts(jaxbInfo.getElementLocalName(instance), jaxbInfo.getElementNamespaceURI(instance), type, clsMap); } catch (Exception ex) { // ignore } return null; }
QName ename = new QName(beanInfo.getElementNamespaceURI(null), beanInfo.getElementLocalName(null)); XmlSchemaElement el2 = schemas.getElementByQName(ename);
QName name = new QName(beanInfo.getElementNamespaceURI(null), beanInfo.getElementLocalName(null)); XmlSchemaElement el = schemas.getElementByQName(name);