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 getTypeName(JAXBBeanInfo beanInfo) { Iterator<QName> itr = beanInfo.getTypeNames().iterator(); if (!itr.hasNext()) { return null; } return itr.next(); } public void checkForExistence(MessagePartInfo part) {
if (beanInfo.isElement()) { QName ename = new QName(beanInfo.getElementNamespaceURI(null), beanInfo.getElementLocalName(null)); XmlSchemaElement el2 = schemas.getElementByQName(ename); el.setNillable(false); el.setName(name.getLocalPart()); Iterator<QName> itr = beanInfo.getTypeNames().iterator(); if (!itr.hasNext()) { return;
boolean isElement = beanInfo.isElement() && !Boolean.TRUE.equals(part.getMessageInfo().getOperation() .getProperty("operation.force.types")); boolean hasType = !beanInfo.getTypeNames().isEmpty(); if (isElement && isFromWrapper && hasType) { QName name = new QName(beanInfo.getElementNamespaceURI(null), beanInfo.getElementLocalName(null)); XmlSchemaElement el = schemas.getElementByQName(name); if (el != null && el.getRef().getTarget() != 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; }
genericEle.setMinOccurs(0); JAXBBeanInfo anyBean = getBeanInfo(context, f.getType()); Iterator<QName> itr = anyBean.getTypeNames().iterator(); if (!itr.hasNext()) { return; genericEle.setMinOccurs(0); JAXBBeanInfo anyBean = getBeanInfo(context, genericMethod.getReturnType()); Iterator<QName> itr = anyBean.getTypeNames().iterator(); if (!itr.hasNext()) { return;
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; }
Iterator<QName> itr = beanInfo.getTypeNames().iterator(); if (!itr.hasNext()) { return; el = new XmlSchemaElement(schemaInfo.getSchema(), false); el.setName(m.getName().substring(beginIdx)); Iterator<QName> itr = beanInfo.getTypeNames().iterator(); if (!itr.hasNext()) { return;