private XmlSchemaType findSchemaType(QName typeName) { for (XmlSchema xmlSchema : xmlSchemaList.getXmlSchemas()) { // if the schema includes other schemas need to search there. XmlSchemaType schemaType = findTypeInSchema(xmlSchema, typeName); if (schemaType != null) { return schemaType; } } return null; }
@Override public void write(StringBuilder sb) { for (XmlSchema xs : coll.getXmlSchemas()) { if (xs.getItems().isEmpty() || Constants.URI_2001_SCHEMA_XSD.equals(xs.getTargetNamespace())) { continue; } StringWriter writer = new StringWriter(); xs.write(writer); sb.append(writer.toString()); } } }
@Override public void write(StringBuilder sb) { for (XmlSchema xs : coll.getXmlSchemas()) { if (xs.getItems().isEmpty() || Constants.URI_2001_SCHEMA_XSD.equals(xs.getTargetNamespace())) { continue; } StringWriter writer = new StringWriter(); xs.write(writer); sb.append(writer.toString()); } } }
public void write(StringBuilder sb) { for (XmlSchema xs : coll.getXmlSchemas()) { if (xs.getItems().isEmpty() || WSDLConstants.NS_SCHEMA_XSD.equals(xs.getTargetNamespace())) { continue; } StringWriter writer = new StringWriter(); xs.write(writer); sb.append(writer.toString()); } } }
public XmlSchemaType getSchemaType(QName name) throws Exception { XmlSchemaType type = null; for (XmlSchema xmlSchema : xmlSchemaList.getXmlSchemas()) { String nspace = name.getNamespaceURI(); if (nspace == null) { nspace = xmlSchema.getTargetNamespace(); } //QName tname = createQName(nspace, name.getLocalPart(), "xsd"); QName tname = createQName(nspace, name.getLocalPart(), ""); type = findSchemaType(tname); if (type != null) { break; } } return type; }
private static XmlSchemaType getType(Part part, SchemaCollection xmlSchemaList) throws Exception { XmlSchemaType schemaType = null; for (XmlSchema xmlSchema : xmlSchemaList.getXmlSchemas()) { if (part.getTypeName() != null) { schemaType = findSchemaType(xmlSchema, part.getTypeName()); if (schemaType != null) { return schemaType; } } } return schemaType; }
private static XmlSchemaElement getSchemaObject(WSDLToCorbaBinding wsdlToCorbaBinding, QName typeName) { SchemaCollection schemaList = wsdlToCorbaBinding.getHelper().getXMLSchemaList(); for (XmlSchema s : schemaList.getXmlSchemas()) { XmlSchemaElement e = s.getElementByName(typeName); if (e != null) { return e; } } return null; }
private static XmlSchemaElement getElement(Part part, SchemaCollection xmlSchemaList) throws Exception { XmlSchemaElement schemaElement = null; for (XmlSchema xmlSchema : xmlSchemaList.getXmlSchemas()) { if (part.getElementName() != null) { schemaElement = findElement(xmlSchema, part.getElementName()); if (schemaElement != null) { return schemaElement; } } } return schemaElement; }
private boolean isObjectReference(SchemaCollection schemaList, QName name) { for (XmlSchema schema : schemaList.getXmlSchemas()) { XmlSchemaElement element = schema.getElementByName(name); if (element != null) { XmlSchemaAnnotation annotation = element.getAnnotation(); if (annotation != null) { List<XmlSchemaAnnotationItem> annotationColl = annotation.getItems(); for (XmlSchemaAnnotationItem item : annotationColl) { if (item instanceof XmlSchemaAppInfo) { return true; } } } } } return false; }
public void initialize(Service service) { for (ServiceInfo serviceInfo : service.getServiceInfos()) { SchemaCollection schemaCollection = serviceInfo.getXmlSchemaCollection(); if (schemaCollection.getXmlSchemas().length > 1) { // Schemas are already populated. continue; } new ServiceModelVisitor(serviceInfo) { public void begin(MessagePartInfo part) { if (part.getTypeQName() != null || part.getElementQName() != null) { return; } part.setTypeQName(Constants.XSD_ANYTYPE); } } .walk(); } }
public void initialize(Service service) { for (ServiceInfo serviceInfo : service.getServiceInfos()) { SchemaCollection schemaCollection = serviceInfo.getXmlSchemaCollection(); if (schemaCollection.getXmlSchemas().length > 1) { // Schemas are already populated. continue; } new ServiceModelVisitor(serviceInfo) { public void begin(MessagePartInfo part) { if (part.getTypeQName() != null || part.getElementQName() != null) { return; } part.setTypeQName(Constants.XSD_ANYTYPE); } } .walk(); } }
public void initialize(Service service) { for (ServiceInfo serviceInfo : service.getServiceInfos()) { SchemaCollection schemaCollection = serviceInfo.getXmlSchemaCollection(); if (schemaCollection.getXmlSchemas().length > 1) { // Schemas are already populated. continue; } new ServiceModelVisitor(serviceInfo) { public void begin(MessagePartInfo part) { if (part.getTypeQName() != null || part.getElementQName() != null) { return; } part.setTypeQName(Constants.XSD_ANYTYPE); } } .walk(); } }
public void initialize(Service service) { for (ServiceInfo serviceInfo : service.getServiceInfos()) { SchemaCollection schemaCollection = serviceInfo.getXmlSchemaCollection(); if (schemaCollection.getXmlSchemas().length > 1) { // Schemas are already populated. continue; } new ServiceModelVisitor(serviceInfo) { public void begin(MessagePartInfo part) { if (part.getTypeQName() != null || part.getElementQName() != null) { return; } part.setTypeQName(XmlSchemaConstants.ANY_TYPE_QNAME); } } .walk(); } }
public void initialize(Service service) { for (ServiceInfo serviceInfo : service.getServiceInfos()) { SchemaCollection schemaCollection = serviceInfo.getXmlSchemaCollection(); if (schemaCollection.getXmlSchemas().length > 1) { // Schemas are already populated. continue; } new ServiceModelVisitor(serviceInfo) { public void begin(MessagePartInfo part) { if (part.getTypeQName() != null || part.getElementQName() != null) { return; } part.setTypeQName(XmlSchemaConstants.ANY_TYPE_QNAME); } } .walk(); } }
public void initialize(Service service) { if (LOG.isLoggable(Level.FINER)) { LOG.log(Level.FINER, "Creating XmlBeansDatabinding for " + service.getName()); } for (ServiceInfo serviceInfo : service.getServiceInfos()) { SchemaCollection col = serviceInfo.getXmlSchemaCollection(); if (col.getXmlSchemas().length > 1) { // someone has already filled in the types continue; } XmlBeansSchemaInitializer schemaInit = new XmlBeansSchemaInitializer(serviceInfo, col, this); schemaInit.walk(); } }
public void initialize(Service service) { for (ServiceInfo serviceInfo : service.getServiceInfos()) { SchemaCollection schemaCollection = serviceInfo.getXmlSchemaCollection(); if (schemaCollection.getXmlSchemas().length > 1) { // Schemas are already populated. continue; } new ServiceModelVisitor(serviceInfo) { public void begin(MessagePartInfo part) { if (part.getTypeQName() != null || part.getElementQName() != null) { return; } part.setTypeQName(Constants.XSD_ANYTYPE); } } .walk(); } }
public void initialize(Service service) { for (ServiceInfo serviceInfo : service.getServiceInfos()) { SchemaCollection schemaCollection = serviceInfo.getXmlSchemaCollection(); if (schemaCollection.getXmlSchemas().length > 1) { // Schemas are already populated. continue; } new ServiceModelVisitor(serviceInfo) { public void begin(MessagePartInfo part) { if (part.getTypeQName() != null || part.getElementQName() != null) { return; } part.setTypeQName(XmlSchemaConstants.ANY_TYPE_QNAME); } } .walk(); } }
private void addCorbaTypes(Definition definition) throws Exception { for (XmlSchema xmlSchemaTypes : xmlSchemaList.getXmlSchemas()) { for (XmlSchemaExternal ext : xmlSchemaTypes.getExternals()) { addCorbaTypes(ext.getSchema()); // REVISIT: This was preventing certain types from being added to the corba // typemap even when they are referenced from other parts of the wsdl. // // Should this add the corba types if it IS an instance of the XmlSchemaImport // (and not an XmlSchemaInclude or XmlSchemaRedefine)? //if (!(extSchema instanceof XmlSchemaImport)) { // addCorbaTypes(extSchema.getSchema()); //} } if (!W3CConstants.NU_SCHEMA_XSD.equals(xmlSchemaTypes.getTargetNamespace())) { addCorbaTypes(xmlSchemaTypes); } } }
private void addedEnumClassToCollector(SchemaCollection schemaCollection, ClassNameAllocatorImpl allocator) { //for (Element schemaElement : schemaList.values()) { for (XmlSchema schema : schemaCollection.getXmlSchemas()) { String targetNamespace = schema.getTargetNamespace(); if (StringUtils.isEmpty(targetNamespace)) { continue; } String packageName = context.mapPackageName(targetNamespace); if (!addedToClassCollector(packageName)) { allocator.assignClassName(packageName, "*"); } } }
private void addedEnumClassToCollector(SchemaCollection schemaCollection, ClassNameAllocatorImpl allocator) { //for (Element schemaElement : schemaList.values()) { for (XmlSchema schema : schemaCollection.getXmlSchemas()) { String targetNamespace = schema.getTargetNamespace(); if (StringUtils.isEmpty(targetNamespace)) { continue; } String packageName = context.mapPackageName(targetNamespace); if (!addedToClassCollector(packageName)) { allocator.assignClassName(packageName, "*"); } } }