QueryOperation queryOperation = (QueryOperation)op; if (queryOperation.isSimpleXMLFormat()) { XMLAnyObjectMapping mapping = new XMLAnyObjectMapping(); mapping.setUseXMLRoot(true); mapping.setAttributeName("result"); XMLAnyObjectMapping mapping = new XMLAnyObjectMapping(); mapping.setAttributeName("result"); mapping.setXPath(SERVICE_NAMESPACE_PREFIX + ":" + "result");
QueryOperation queryOperation = (QueryOperation)op; if (queryOperation.isSimpleXMLFormat()) { XMLAnyObjectMapping mapping = new XMLAnyObjectMapping(); mapping.setUseXMLRoot(true); mapping.setAttributeName("result"); XMLAnyObjectMapping mapping = new XMLAnyObjectMapping(); mapping.setAttributeName("result"); mapping.setXPath(SERVICE_NAMESPACE_PREFIX + ":" + "result");
public AnyObjectMapping generateAnyObjectMapping(Property property, Descriptor descriptor, NamespaceInfo namespaceInfo) { AnyObjectMapping mapping = new XMLAnyObjectMapping(); initializeXMLMapping((XMLMapping)mapping, property); // if the XPath is set (via xml-path) use it if (property.getXmlPath() != null) { mapping.setField(new XMLField(property.getXmlPath())); } Class declaredType = org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(property.getActualType().getQualifiedName(), helper.getClassLoader()); JAXBElementRootConverter jaxbElementRootConverter = new JAXBElementRootConverter(declaredType); mapping.setConverter(jaxbElementRootConverter); if (property.getDomHandlerClassName() != null) { jaxbElementRootConverter.setNestedConverter(new DomHandlerConverter(property.getDomHandlerClassName())); } if (property.isLax()) { mapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT); } else { mapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT); } if (property.isMixedContent()) { mapping.setMixedContent(true); } else { mapping.setUseXMLRoot(true); } return mapping; }
public AnyObjectMapping generateAnyObjectMapping(Property property, Descriptor descriptor, NamespaceInfo namespaceInfo) { AnyObjectMapping mapping = new XMLAnyObjectMapping(); initializeXMLMapping((XMLMapping)mapping, property); // if the XPath is set (via xml-path) use it if (property.getXmlPath() != null) { mapping.setField(new XMLField(property.getXmlPath())); } Class declaredType = org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(property.getActualType().getQualifiedName(), helper.getClassLoader()); JAXBElementRootConverter jaxbElementRootConverter = new JAXBElementRootConverter(declaredType); mapping.setConverter(jaxbElementRootConverter); if (property.getDomHandlerClassName() != null) { jaxbElementRootConverter.setNestedConverter(new DomHandlerConverter(property.getDomHandlerClassName())); } if (property.isLax()) { mapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT); } else { mapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT); } if (property.isMixedContent()) { mapping.setMixedContent(true); } else { mapping.setUseXMLRoot(true); } return mapping; }