axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/wsdl/toJava JavaServiceImplWriter.java
Date Fri, 15 Oct 2004 16:34:13 GMT
dims        2004/10/15 09:34:13

  Modified:    java/src/org/apache/axis/wsdl/toJava
                        JavaServiceImplWriter.java
  Log:
  Fix for AXIS-1578 - Cannot customize configuration as wsdl2java generates serviceLocator
classes without constructor
  slightly modified version of patch from Ashutosh Shahi (ashutosh.shahi@gmail.com )
  
  Revision  Changes    Path
  1.40      +24 -0     ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java
  
  Index: JavaServiceImplWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- JavaServiceImplWriter.java	8 Jul 2004 15:12:08 -0000	1.39
  +++ JavaServiceImplWriter.java	15 Oct 2004 16:34:13 -0000	1.40
  @@ -105,6 +105,9 @@
           Map portMap = service.getPorts();
           Iterator portIterator = portMap.values().iterator();
   
  +        //Write the constructor for <servicename>Locator
  +        writeConstructors(pw);
  +        
           // write a get method for each of the ports with a SOAP binding
           while (portIterator.hasNext()) {
               Port p = (Port) portIterator.next();
  @@ -255,6 +258,27 @@
           writeGetPorts(pw, sEntry.getQName().getNamespaceURI(), getPortPortXmlNames);
           writeSetEndpointAddress(pw, getPortPortNames);
       }    // writeFileBody
  +
  +    /**
  +     * write Constructors
  +     *
  +     * @param pw
  +     */
  +    protected void writeConstructors(PrintWriter pw) {
  +        //Write the default constructor
  +        pw.println();
  +        pw.println("    public " + Utils.getJavaLocalName(sEntry.getName())
  +                + "Locator() {");
  +        pw.println("    }");
  +        pw.println();
  +    	
  +        //Write a constructor that accepts an Engine Configuration 
  +        pw.println();
  +        pw.println("    public " + Utils.getJavaLocalName(sEntry.getName())
  +                + "Locator(org.apache.axis.EngineConfiguration config) {");
  +        pw.println("        super(config);");
  +        pw.println("    }");
  +    }
   
       /**
        * Write the private address field for this port and the public getter for it.
  
  
  

Mime
View raw message