/** * Get the schema associated with this WSDL. * * @return The schema associated with this WSDL. */ public SchemaInfo getAssociatedSchema() { return lookupSchema(getTargetNamespace()); }
/** * Get the schema associated with this WSDL. * * @return The schema associated with this WSDL. */ public SchemaInfo getAssociatedSchema() { return lookupSchema(getTargetNamespace()); }
/** * The list of imported schemas. * * @return The list of imported schemas. */ public List<SchemaInfo> getImportedSchemas() { Set<String> importedNamespaces = getImportedNamespaces(); importedNamespaces.remove(getTargetNamespace()); //the "associated" schema is either inlined or included, but not imported. List<SchemaInfo> schemas = new ArrayList<SchemaInfo>(); for (String ns : importedNamespaces) { SchemaInfo schema = lookupSchema(ns); if (schema != null) { schemas.add(schema); } } return schemas; }
/** * The list of imported schemas. * * @return The list of imported schemas. */ public List<SchemaInfo> getImportedSchemas() { Set<String> importedNamespaces = getImportedNamespaces(); importedNamespaces.remove(getTargetNamespace()); //the "associated" schema is either inlined or included, but not imported. List<SchemaInfo> schemas = new ArrayList<SchemaInfo>(); for (String ns : importedNamespaces) { SchemaInfo schema = lookupSchema(ns); if (schema != null) { schemas.add(schema); } } return schemas; }
/** * Get the imported namespaces used by this WSDL. * * @return The imported namespaces used by this WSDL. */ public Set<String> getImportedNamespaces() { Collection<EndpointInterface> endpointInterfaces = getEndpointInterfaces(); if ((endpointInterfaces == null) || (endpointInterfaces.size() == 0)) { throw new IllegalStateException("WSDL for " + getTargetNamespace() + " has no endpoint interfaces!"); } HashSet<String> importedNamespaces = new HashSet<String>(); //always import the list of known namespaces. importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/"); importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/http/"); importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/mime/"); importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/soap/"); importedNamespaces.add("http://schemas.xmlsoap.org/soap/encoding/"); importedNamespaces.add("http://www.w3.org/2001/XMLSchema"); for (EndpointInterface endpointInterface : endpointInterfaces) { importedNamespaces.addAll(endpointInterface.getReferencedNamespaces()); } return importedNamespaces; }
/** * Get the imported namespaces used by this WSDL. * * @return The imported namespaces used by this WSDL. */ public Set<String> getImportedNamespaces() { Collection<EndpointInterface> endpointInterfaces = getEndpointInterfaces(); if ((endpointInterfaces == null) || (endpointInterfaces.size() == 0)) { throw new IllegalStateException("WSDL for " + getTargetNamespace() + " has no endpoint interfaces!"); } HashSet<String> importedNamespaces = new HashSet<String>(); //always import the list of known namespaces. importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/"); importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/http/"); importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/mime/"); importedNamespaces.add("http://schemas.xmlsoap.org/wsdl/soap/"); importedNamespaces.add("http://schemas.xmlsoap.org/soap/encoding/"); importedNamespaces.add("http://www.w3.org/2001/XMLSchema"); for (EndpointInterface endpointInterface : endpointInterfaces) { importedNamespaces.addAll(endpointInterface.getReferencedNamespaces()); } return importedNamespaces; }
String prefix = ns2prefix.get(wsdlInfo.getTargetNamespace()); if (prefix != null) { String file = prefix + ".wsdl"; wsdlArtifact.setDescription("WSDL file for namespace " + wsdl.getTargetNamespace()); getEnunciate().addArtifact(wsdlArtifact);