@Override public String getNamespace() { return this.wsdlInfo.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; }
@Override protected Map<String, Object> createModel() { Map<String, Object> model = super.createModel(); model.put("wsdl", this.wsdlInfo); String baseUri = this.baseUri; if (baseUri == null) { baseUri = "http://localhost:8080/"; //if the base uri isn't configured, we have to make something up. } model.put("baseUri", baseUri); SchemaInfo schema = context.getSchemas().get(wsdlInfo.getTargetNamespace()); if (schema != null) { model.put("isDefinedGlobally", new IsDefinedGloballyMethod(schema)); } model.put("accessorOverridesAnother", new AccessorOverridesAnotherMethod()); model.put("qnameForType", new QNameForTypeMethod(context)); return model; }
@Override protected Map<String, Object> createModel() { Map<String, Object> model = super.createModel(); model.put("wsdl", this.wsdlInfo); String baseUri = this.baseUri; if (baseUri == null) { baseUri = "http://localhost:8080/"; //if the base uri isn't configured, we have to make something up. } model.put("baseUri", baseUri); SchemaInfo schema = context.getSchemas().get(wsdlInfo.getTargetNamespace()); if (schema != null) { model.put("isDefinedGlobally", new IsDefinedGloballyMethod(schema)); } model.put("accessorOverridesAnother", new AccessorOverridesAnotherMethod()); model.put("qnameForType", new QNameForTypeMethod(context)); return model; }
/** * Get the imported namespaces used by this WSDL. * * @return The imported namespaces used by this WSDL. */ public Set<String> getImportedNamespaces() { Set<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/wsdl/soap12/"); importedNamespaces.add("http://schemas.xmlsoap.org/soap/encoding/"); importedNamespaces.add("http://www.w3.org/2001/XMLSchema"); for (EndpointInterface endpointInterface : endpointInterfaces) { importedNamespaces.addAll(endpointInterface.getReferencedNamespaces()); } if (isInlineSchema()) { SchemaInfo associatedSchema = getAssociatedSchema(); if (associatedSchema != null) { importedNamespaces.addAll(associatedSchema.getReferencedNamespaces()); } } return importedNamespaces; }
String defaultFilename = ns2prefix.get(wsdlInfo.getTargetNamespace()) + ".wsdl"; WsdlConfig explicitConfig = wsdlConfigs.get(wsdlInfo.getTargetNamespace());
String defaultFilename = ns2prefix.get(wsdlInfo.getTargetNamespace()) + ".wsdl"; WsdlConfig explicitConfig = wsdlConfigs.get(wsdlInfo.getTargetNamespace());