scheu       02/02/13 13:07:15

  Modified:    java/src/org/apache/axis/utils Admin.java
               java/src/org/apache/axis/wsdl/toJava Emitter.java
                        JavaDeployWriter.java SymbolTable.java
  Log:
  Changes to fix a wsdl problem related to the redefinition of Map.
  
  Other minor/cosmetic changes.
  
  Revision  Changes    Path
  1.99      +1 -1      xml-axis/java/src/org/apache/axis/utils/Admin.java
  
  Index: Admin.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/Admin.java,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- Admin.java        10 Feb 2002 15:10:31 -0000      1.98
  +++ Admin.java        13 Feb 2002 21:07:15 -0000      1.99
  @@ -503,7 +503,7 @@
                   null, null );
   
           WSDDService serv = new WSDDService();
  -        
  +
           serv.setName(name);
           
           if ( request != null && !"".equals(request) ) {
  
  
  
  1.18      +13 -1     xml-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Emitter.java      8 Feb 2002 23:18:53 -0000       1.17
  +++ Emitter.java      13 Feb 2002 21:07:15 -0000      1.18
  @@ -122,6 +122,7 @@
       protected HashMap delaySetMap = null;
       protected WriterFactory writerFactory = null;
       protected SymbolTable symbolTable = null;
  +    protected String currentWSDLURI = null;
   
       /**
        * Default constructor.
  @@ -148,6 +149,7 @@
        * @param Document doc This is the XML Document containing the WSDL.
        */
       public void emit(String context, Document doc) throws IOException, 
WSDLException {
  +        currentWSDLURI = context;
           WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
           reader.setFeature("javax.wsdl.verbose", bVerbose);
           def = reader.readWSDL(context, doc);
  @@ -181,6 +183,7 @@
           // outside of the recursive emit method.
           Writer writer = writerFactory.getWriter(def, symbolTable);
           writer.write();
  +        currentWSDLURI = null;
       } // emit
   
       private void emit(Definition def, Document doc) throws IOException, 
WSDLException {
  @@ -358,7 +361,12 @@
       public void setNamespaceMap(HashMap map) {
           delaySetMap = map;
       }
  -
  +    /**
  +     * Get the map of namespace -> Java package names
  +     */ 
  +    public HashMap getNamespaceMap() {
  +        return delaySetMap;
  +    }
   
       /**
        * Set the output directory to use in emitted source files
  @@ -471,6 +479,10 @@
       public Namespaces getNamespaces() {
           return namespaces;
       } // getNamespaces
  +
  +    public String getWSDLURI() {
  +        return currentWSDLURI;
  +    }
   
       //
       // Utility methods
  
  
  
  1.17      +6 -6      
xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaDeployWriter.java
  
  Index: JavaDeployWriter.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaDeployWriter.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JavaDeployWriter.java     6 Feb 2002 16:55:54 -0000       1.16
  +++ JavaDeployWriter.java     13 Feb 2002 21:07:15 -0000      1.17
  @@ -77,8 +77,8 @@
   * This is Wsdl2java's deploy Writer.  It writes the deploy.java file.
   */
   public class JavaDeployWriter extends JavaWriter {
  -    private Definition definition;
  -    private SymbolTable symbolTable;
  +    protected Definition definition;
  +    protected SymbolTable symbolTable;
   
       /**
        * Constructor.
  @@ -112,7 +112,7 @@
       /**
        * Write out deployment and undeployment instructions for each WSDL service
        */
  -    private void writeDeployServices() throws IOException {
  +    protected void writeDeployServices() throws IOException {
           //deploy the ports on each service
           Map serviceMap = definition.getServices();
           for (Iterator mapIterator = serviceMap.values().iterator(); 
mapIterator.hasNext();) {
  @@ -140,7 +140,7 @@
       /**
        * Write out bean mappings for each type
        */
  -    private void writeDeployTypes() throws IOException {
  +    protected void writeDeployTypes() throws IOException {
           Vector types = symbolTable.getTypes();
   
           pw.println();
  @@ -174,7 +174,7 @@
       /**
        * Write out deployment and undeployment instructions for given WSDL port
        */
  -    private void writeDeployPort(Port port) throws IOException {
  +    protected void writeDeployPort(Port port) throws IOException {
           Binding binding = port.getBinding();
           BindingEntry bEntry = symbolTable.getBindingEntry(binding.getQName());
           String serviceName = port.getName();
  @@ -195,7 +195,7 @@
       /**
        * Write out deployment instructions for given WSDL binding
        */
  -    private void writeDeployBinding(Binding binding) throws IOException {
  +    protected void writeDeployBinding(Binding binding) throws IOException {
           BindingEntry bEntry = symbolTable.getBindingEntry(binding.getQName());
           String className = bEntry.getName();
           if (emitter.getDeploySkeleton())
  
  
  
  1.30      +7 -0      xml-axis/java/src/org/apache/axis/wsdl/toJava/SymbolTable.java
  
  Index: SymbolTable.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/SymbolTable.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- SymbolTable.java  12 Feb 2002 18:33:56 -0000      1.29
  +++ SymbolTable.java  13 Feb 2002 21:07:15 -0000      1.30
  @@ -583,6 +583,13 @@
           // Get the QName of the node's name attribute value
           qName = Utils.getNodeNameQName(node);
           if (qName != null) {
  +
  +            // If the qname is already registered as a base type,
  +            // don't create a defining type/element.
  +            if (!isElement && btm.getBaseName(qName)!=null) {
  +                return;
  +            }
  +
               // If the node has a type or ref attribute, get the 
               // qname representing the type
               BooleanHolder forElement = new BooleanHolder();
  
  
  


Reply via email to