org.codehaus.enunciate.config.WsdlInfo.getTargetNamespace()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(125)

本文整理了Java中org.codehaus.enunciate.config.WsdlInfo.getTargetNamespace()方法的一些代码示例,展示了WsdlInfo.getTargetNamespace()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WsdlInfo.getTargetNamespace()方法的具体详情如下:
包路径:org.codehaus.enunciate.config.WsdlInfo
类名称:WsdlInfo
方法名:getTargetNamespace

WsdlInfo.getTargetNamespace介绍

[英]The target namespace.
[中]目标命名空间。

代码示例

代码示例来源:origin: org.codehaus.enunciate/enunciate-core

/**
 * Get the schema associated with this WSDL.
 *
 * @return The schema associated with this WSDL.
 */
public SchemaInfo getAssociatedSchema() {
 return lookupSchema(getTargetNamespace());
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-full

/**
 * Get the schema associated with this WSDL.
 *
 * @return The schema associated with this WSDL.
 */
public SchemaInfo getAssociatedSchema() {
 return lookupSchema(getTargetNamespace());
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-full

/**
 * 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;
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-core

/**
 * 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;
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-core

/**
 * 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;
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-full

/**
 * 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;
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-full

String prefix = ns2prefix.get(wsdlInfo.getTargetNamespace());
if (prefix != null) {
 String file = prefix + ".wsdl";
wsdlArtifact.setDescription("WSDL file for namespace " + wsdl.getTargetNamespace());
getEnunciate().addArtifact(wsdlArtifact);

相关文章