@Override public TemplateModel get(String key) throws TemplateModelException { if (("filename".equals(key)) || ("location".equals(key)) || ("inlineSchema".equals(key))) { return wrap(wsdlInfo.getProperty(key)); } else if ("importedNamespaces".equals(key)) { Set<String> importedNamespaces = wsdlInfo.getImportedNamespaces(); SchemaInfo associatedSchema = wsdlInfo.getAssociatedSchema(); Boolean inlineSchema = (Boolean) wsdlInfo.getProperty("inlineSchema"); if (associatedSchema != null && inlineSchema != null && inlineSchema) { importedNamespaces.addAll(associatedSchema.getReferencedNamespaces()); } return wrap(importedNamespaces); } else if ("importedSchemas".equals(key)) { TreeSet<SchemaInfo> schemas = new TreeSet<SchemaInfo>(new SchemaInfoComparator()); schemas.addAll(wsdlInfo.getImportedSchemas()); SchemaInfo associatedSchema = wsdlInfo.getAssociatedSchema(); Boolean inlineSchema = (Boolean) wsdlInfo.getProperty("inlineSchema"); if (associatedSchema != null && inlineSchema != null && inlineSchema) { schemas.addAll(associatedSchema.getImportedSchemas()); } return wrap(schemas); } return super.get(key); } }