public static QName getBaseType(XmlSchemaComplexType type) { XmlSchemaContentModel model = type.getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content; return ext.getBaseTypeName(); }
public static QName getBaseType(XmlSchemaComplexType type) { XmlSchemaContentModel model = type.getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content; return ext.getBaseTypeName(); }
public static QName getBaseType(XmlSchemaComplexType type) { XmlSchemaContentModel model = type.getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content; return ext.getBaseTypeName(); }
public static QName getBaseType(XmlSchemaComplexType type) { XmlSchemaContentModel model = type.getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content; return ext.getBaseTypeName(); }
public static QName getBaseType(XmlSchemaComplexType type) { XmlSchemaContentModel model = type.getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension)content; return ext.getBaseTypeName(); }
/** * Return the QName of the base schema type, if any, as defined in the content model. */ public QName getBaseSchemaTypeName() { XmlSchemaContentModel model = getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension) content; return ext.getBaseTypeName(); }
/** * Return the QName of the base schema type, if any, as defined in the content model. */ public QName getBaseSchemaTypeName() { XmlSchemaContentModel model = getContentModel(); if (model == null) { return null; } XmlSchemaContent content = model.getContent(); if (content == null) { return null; } if (!(content instanceof XmlSchemaComplexContentExtension)) { return null; } XmlSchemaComplexContentExtension ext = (XmlSchemaComplexContentExtension) content; return ext.getBaseTypeName(); }
private static void processComplexContentModel(XmlSchemaComplexType cmplxType, TypeMapper mapper, String opName, Map<String,XmlSchema> schemaMap, String qnameSuffix) { XmlSchemaContentModel contentModel = cmplxType.getContentModel(); if (contentModel instanceof XmlSchemaComplexContent) { XmlSchemaComplexContent xmlSchemaComplexContent = (XmlSchemaComplexContent) contentModel; XmlSchemaContent content = xmlSchemaComplexContent.getContent(); if (content instanceof XmlSchemaComplexContentExtension) { XmlSchemaComplexContentExtension schemaExtension = (XmlSchemaComplexContentExtension) content; // process particles inside this extension, if any processSchemaSequence(schemaExtension.getParticle(), mapper, opName, schemaMap, qnameSuffix); XmlSchemaType extensionSchemaType = null; for (XmlSchema xmlSchema : schemaMap.values()) { extensionSchemaType = getSchemaType(xmlSchema,schemaExtension.getBaseTypeName()); if (extensionSchemaType != null){ break; } } processXMLSchemaComplexType(extensionSchemaType, mapper, opName, schemaMap, qnameSuffix); } } }
public void processXMLSchemaObject(String toNamespace, XmlSchemaObject obj, XmlSchemaObject fixUpObj){ if (obj instanceof XmlSchemaComplexType){ processXMLSchemaObject(toNamespace, ((XmlSchemaComplexType)obj).getParticle(), fixUpObj); processXMLSchemaObject(toNamespace, ((XmlSchemaComplexType)obj).getContentModel(), fixUpObj); } else if (obj instanceof XmlSchemaComplexContent){ processXMLSchemaObject(toNamespace, ((XmlSchemaComplexContent)obj).getContent(), fixUpObj); } else if (obj instanceof XmlSchemaElement){ XmlSchemaElement element = (XmlSchemaElement)obj; if(element.getSchemaType() == fixUpObj){ QName name = element.getSchemaTypeName(); QName newName = new QName(toNamespace, name.getLocalPart()); element.setSchemaTypeName(newName); } ((XmlSchemaElement)obj).getSchemaType(); } else if (obj instanceof XmlSchemaGroupBase){ XmlSchemaObjectCollection items = ((XmlSchemaGroupBase)obj).getItems(); Iterator<XmlSchemaObject> iter = items.getIterator(); while(iter.hasNext()){ processXMLSchemaObject(toNamespace, iter.next(), fixUpObj); } } else if (obj instanceof XmlSchemaComplexContentExtension){ XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)obj; QName name = extension.getBaseTypeName(); QName newName = new QName(toNamespace, name.getLocalPart()); extension.setBaseTypeName(newName); } // TODO - what other structure items will be generated by JAXB? }
public void processXMLSchemaObject(String toNamespace, XmlSchemaObject obj, XmlSchemaObject fixUpObj){ if (obj instanceof XmlSchemaComplexType){ processXMLSchemaObject(toNamespace, ((XmlSchemaComplexType)obj).getParticle(), fixUpObj); processXMLSchemaObject(toNamespace, ((XmlSchemaComplexType)obj).getContentModel(), fixUpObj); } else if (obj instanceof XmlSchemaComplexContent){ processXMLSchemaObject(toNamespace, ((XmlSchemaComplexContent)obj).getContent(), fixUpObj); } else if (obj instanceof XmlSchemaElement){ XmlSchemaElement element = (XmlSchemaElement)obj; if(element.getSchemaType() == fixUpObj){ QName name = element.getSchemaTypeName(); QName newName = new QName(toNamespace, name.getLocalPart()); element.setSchemaTypeName(newName); } ((XmlSchemaElement)obj).getSchemaType(); } else if (obj instanceof XmlSchemaGroupBase){ XmlSchemaObjectCollection items = ((XmlSchemaGroupBase)obj).getItems(); Iterator<XmlSchemaObject> iter = items.getIterator(); while(iter.hasNext()){ processXMLSchemaObject(toNamespace, iter.next(), fixUpObj); } } else if (obj instanceof XmlSchemaComplexContentExtension){ XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)obj; QName name = extension.getBaseTypeName(); QName newName = new QName(toNamespace, name.getLocalPart()); extension.setBaseTypeName(newName); } // TODO - what other structure items will be generated by JAXB? }
private static void processComplexContentModel(XmlSchemaComplexType cmplxType, TypeMapper mapper, String opName, Map<String,XmlSchema> schemaMap, String qnameSuffix) { XmlSchemaContentModel contentModel = cmplxType.getContentModel(); if (contentModel instanceof XmlSchemaComplexContent) { XmlSchemaComplexContent xmlSchemaComplexContent = (XmlSchemaComplexContent) contentModel; XmlSchemaContent content = xmlSchemaComplexContent.getContent(); if (content instanceof XmlSchemaComplexContentExtension) { XmlSchemaComplexContentExtension schemaExtension = (XmlSchemaComplexContentExtension) content; // process particles inside this extension, if any processSchemaSequence(schemaExtension.getParticle(), mapper, opName, schemaMap, qnameSuffix); XmlSchemaType extensionSchemaType = null; for (XmlSchema xmlSchema : schemaMap.values()) { extensionSchemaType = getSchemaType(xmlSchema,schemaExtension.getBaseTypeName()); if (extensionSchemaType != null){ break; } } processXMLSchemaComplexType(extensionSchemaType, mapper, opName, schemaMap, qnameSuffix); } } }
XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)type .getContentModel().getContent(); QName baseTypeName = extension.getBaseTypeName(); XmlSchemaType schemaType = schema.getTypeByQName(baseTypeName); if (schemaType instanceof XmlSchemaComplexType) {
protected Struct processComplexContentStruct(XmlSchemaComplexContent complex, QName defaultName, Struct corbaStruct, QName schematypeName) throws Exception { if (complex.getContent() instanceof XmlSchemaComplexContentExtension) { XmlSchemaComplexContentExtension extype = (XmlSchemaComplexContentExtension)complex.getContent(); QName extName = extype.getBaseTypeName(); corbaStruct = processComplexContentStructParticle(extype.getParticle(), defaultName, corbaStruct, schematypeName, extName, extype.getAttributes()); } else { if (complex.getContent() instanceof XmlSchemaComplexContentRestriction) { XmlSchemaComplexContentRestriction extype = (XmlSchemaComplexContentRestriction)complex.getContent(); QName extName = extype.getBaseTypeName(); corbaStruct = processComplexContentStructParticle(extype.getParticle(), defaultName, corbaStruct, schematypeName, extName, extype.getAttributes()); } } return corbaStruct; }
XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)type .getContentModel().getContent(); QName baseTypeName = extension.getBaseTypeName(); ServiceInfo serviceInfo = wrapper.getOperation().getInterface().getService(); XmlSchemaType schemaType = serviceInfo.getXmlSchemaCollection().getTypeByQName(baseTypeName);
XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)type .getContentModel().getContent(); QName baseTypeName = extension.getBaseTypeName(); ServiceInfo serviceInfo = wrapper.getOperation().getInterface().getService(); XmlSchemaType schemaType = serviceInfo.getXmlSchemaCollection().getTypeByQName(baseTypeName);
XmlSchemaComplexContentExtension extension = (XmlSchemaComplexContentExtension)type .getContentModel().getContent(); QName baseTypeName = extension.getBaseTypeName(); ServiceInfo serviceInfo = wrapper.getOperation().getInterface().getService(); XmlSchemaType schemaType = serviceInfo.getXmlSchemaCollection().getTypeByQName(baseTypeName);
XmlSchemaUtils.addImportIfNeeded(schema, extension.getBaseTypeName()); addCrossImportsAttributeList(schema, extension.getAttributes()); XmlSchemaParticle particle = extension.getParticle();
XmlSchemaUtils.addImportIfNeeded(schema, extension.getBaseTypeName()); addCrossImportsAttributeList(schema, extension.getAttributes()); XmlSchemaParticle particle = extension.getParticle();
XmlSchemaUtils.addImportIfNeeded(schema, extension.getBaseTypeName()); addCrossImportsAttributeList(schema, extension.getAttributes()); XmlSchemaParticle particle = extension.getParticle();
XmlSchemaUtils.addImportIfNeeded(schema, extension.getBaseTypeName()); addCrossImportsAttributeList(schema, extension.getAttributes()); XmlSchemaParticle particle = extension.getParticle();