Class NamespaceMapping

java.lang.Object
org.apache.ws.java2wsdl.NamespaceMapping
All Implemented Interfaces:
Mapper

public class NamespaceMapping extends Object implements Mapper
Used for nested package definitions. The file format used for storing mappings is a list of package=namespace
  • Field Details

  • Constructor Details

    • NamespaceMapping

      public NamespaceMapping()
      pass in the namespace to map to
  • Method Details

    • setNamespace

      public void setNamespace(String value)
      the namespace in the WSDL. Required.
      Parameters:
      value - new uri of the mapping
    • setPackage

      public void setPackage(String value)
      the Java package to bind to. Required.
      Parameters:
      value - java package name
    • setFile

      public void setFile(File file)
      name of a property file that contains mappings in package=namespace format
      Parameters:
      file - file to load
    • map

      protected void map(HashMap map, String packName, String nspace, boolean packageIsKey)
      map a namespace to a package
      Parameters:
      map - map to assign to
      packName - package name
      nspace - namespace
      packageIsKey - if the package is to be the key for the map
    • mapXmlReader

      protected void mapXmlReader(HashMap map, boolean packageIsKey) throws org.apache.tools.ant.BuildException
      Load a mapping xml reader and save it to the map
      Parameters:
      map - target map file
      packageIsKey - if the package is to be the key for the map
      Throws:
      org.apache.tools.ant.BuildException - if an IOException needed swallowing
    • mapXmlStream

      protected void mapXmlStream(HashMap map, boolean packageIsKey) throws org.apache.tools.ant.BuildException
      Load a mapping input stream and save it to the map
      Parameters:
      map - target map file
      packageIsKey - if the package is to be the key for the map
      Throws:
      org.apache.tools.ant.BuildException - if an IOException needed swallowing
    • mapFile

      protected void mapFile(HashMap map, boolean packageIsKey) throws org.apache.tools.ant.BuildException
      Load a mapping file and save it to the map
      Parameters:
      map - target map file
      packageIsKey - if the package is to be the key for the map
      Throws:
      org.apache.tools.ant.BuildException - if an IOException needed swallowing
    • execute

      public void execute(HashMap map, boolean packageIsKey) throws org.apache.tools.ant.BuildException
      execute the mapping
      Specified by:
      execute in interface Mapper
      Parameters:
      map - map to map to
      packageIsKey - if the package is to be the key for the map
      Throws:
      org.apache.tools.ant.BuildException - in case of emergency
    • getMapInputStream

      public InputStream getMapInputStream()
    • setMapInputStream

      public void setMapInputStream(InputStream mapInputStream)
    • getMappingFile

      public File getMappingFile()
    • setMappingFile

      public void setMappingFile(File mappingFile)
    • getXmlReader

      public XMLStreamReader getXmlReader()
    • setXmlReader

      public void setXmlReader(XMLStreamReader xmlReader)