Tom :

I can't really believe that I'm hearing that we need redundant definitions of data values. Where is the benefit? How would it out weigh issues of maintainability (if we extend scope)?

If you desire a 'local' copy in Emitter, fine - but they should be initialized with 'master' values defined elsewhere.

I'm looking at using the 'Enum' object class, introduced earlier in the day, for the 'scope' data type (and others). In this case it might make even more sense to introduce a 'local' copy to emitter.


*******************************************
Richard A. Sitze [EMAIL PROTECTED]
CORBA Interoperability & WebServices
IBM WebSphere Development
Tom Jordahl <[EMAIL PROTECTED]>




          Tom Jordahl <[EMAIL PROTECTED]>

          06/07/2002 10:38 AM
          Please respond to axis-dev



To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject: RE: cvs commit: xml-axis/java/src/org/apache/axis/deployment/wsdd WSDDDeployableItem.java WSDDConstants.java




I agree with Russell. I am -0 bordering on -1 to this change.
The Emitter API should have any argument types it needs in Emitter.

+1 to change this back.

--
Tom Jordahl
Macromedia
      -----Original Message-----
      From:
      Russell Butek [mailto:[EMAIL PROTECTED]]
      Sent:
      Thursday, June 06, 2002 9:11 AM
      To:
      [EMAIL PROTECTED]
      Subject:
      Re: cvs commit: xml-axis/java/src/org/apache/axis/deployment/wsdd WSDDDeployableItem.java WSDDConstants.java

      I don't like the Emitter constants moved out of Emitter. There's occasional talk of moving the tooling to a separate project. Forcing the Emitter to use runtime constants just tightens the grip the AXIS runtime has on the tooling.

      I won't veto this because unfortunately we already have dependencies, but if we DO at some point move WSDL2Java outside, then this will just be one more thing we'll have to put back the way it was.

      Russell Butek
      [EMAIL PROTECTED]

      Please respond to [EMAIL PROTECTED]

      To: [EMAIL PROTECTED]
      cc:
      Subject:
      cvs commit: xml-axis/java/src/org/apache/axis/deployment/wsdd WSDDDeployableItem.java WSDDConstants.java



      rsitze      2002/06/05 16:24:35

          Modified:    java/src/org/apache/axis/wsdl WSDL2Java.java
          java/src/org/apache/axis/wsdl/toJava Emitter.java
                          JavaDeployWriter.java
                          java/src/org/apache/axis/deployment/wsdd
          WSDDDeployableItem.java WSDDConstants.java
          Log:
          Moved WSDDConstants for 'scope' to ...axis.providers.java.JavaProvider
          Also moved related emitter constants to same.


          Revision  Changes    Path
          1.35      +10 -6     xml-axis/java/src/org/apache/axis/wsdl/WSDL2Java.java


          Index: WSDL2Java.java
          ===================================================================
          RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/WSDL2Java.java,v
          retrieving revision 1.34
          retrieving revision 1.35
          diff -u -r1.34 -r1.35
          --- WSDL2Java.java 17 May 2002 19:00:25 -0000 1.34
          +++ WSDL2Java.java 5 Jun 2002 23:24:35 -0000 1.35
          @@ -60,11 +60,15 @@
          import org.apache.axis.utils.CLUtil;
          import org.apache.axis.utils.JavaUtils;


          +import org.apache.axis.providers.java.JavaProvider;
          +
          import org.apache.axis.wsdl.gen.Parser;
          import org.apache.axis.wsdl.gen.WSDL2;


          import org.apache.axis.wsdl.toJava.Emitter;


          +import org.apache.axis.deployment.wsdd.WSDDConstants;
          +
          /**
          * Command line interface to the WSDL2Java utility
          *
          @@ -221,14 +225,14 @@
                          case SCOPE_OPT:
                          String scope = option.getArgument();
          -                if ("Application".equals(scope)) {
          -                    emitter.setScope(emitter.APPLICATION_SCOPE);
          +                if (JavaProvider.OPTION_SCOPE_APPLICATION.equals(scope)) {
          +                    emitter.setScope(JavaProvider.BYTE_SCOPE_APPLICATION);
          }
          -                else if ("Request".equals(scope)) {
          -                    emitter.setScope(emitter.REQUEST_SCOPE);
          +                else if (JavaProvider.OPTION_SCOPE_REQUEST.equals(scope)) {
          +                    emitter.setScope(JavaProvider.BYTE_SCOPE_REQUEST);
          }
          -                else if ("Session".equals(scope)) {
          -                    emitter.setScope(emitter.SESSION_SCOPE);
          +                else if (JavaProvider.OPTION_SCOPE_SESSION.equals(scope)) {
          +                    emitter.setScope(JavaProvider.BYTE_SCOPE_SESSION);
                              }
                              else {
                                      System.err.println(

          1.39      +3 -7      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.38
          retrieving revision 1.39
          diff -u -r1.38 -r1.39
          --- Emitter.java 10 May 2002 14:45:04 -0000 1.38
          +++ Emitter.java 5 Jun 2002 23:24:35 -0000 1.39
          @@ -71,6 +71,8 @@
          import org.apache.axis.encoding.DefaultTypeMappingImpl;
          import org.apache.axis.encoding.TypeMapping;


          +import org.apache.axis.providers.java.JavaProvider;
          +
          import org.apache.axis.utils.JavaUtils;


          import org.apache.axis.wsdl.gen.GeneratorFactory;
          @@ -91,12 +93,6 @@
          */
          public class Emitter extends Parser {


          -    // Scope constants
          -    public static final byte NO_EXPLICIT_SCOPE = 0x00;
          -    public static final byte APPLICATION_SCOPE = 0x01;
          -    public static final byte REQUEST_SCOPE     = 0x10;
          -    public static final byte SESSION_SCOPE     = 0x11;
          -
              protected HashMap namespaceMap = new HashMap();
              protected String typeMappingVersion = "1.2";
              protected BaseTypeMapping baseTypeMapping = null;
          @@ -110,7 +106,7 @@
          private boolean bGenerateAll = false;
          private boolean bHelperGeneration = false;
          private String packageName = null;
          -    private byte scope = NO_EXPLICIT_SCOPE;
          +    private byte scope = JavaProvider.BYTE_SCOPE_NOT_EXPLICIT;
              private GeneratedFileInfo fileInfo = new GeneratedFileInfo();
              private HashMap delayedNamespacesMap = new HashMap();
              private String outputDir = null;


          1.46      +4 -3      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.45
          retrieving revision 1.46
          diff -u -r1.45 -r1.46
          --- JavaDeployWriter.java 3 Jun 2002 02:15:53 -0000 1.45
          +++ JavaDeployWriter.java 5 Jun 2002 23:24:35 -0000 1.46
          @@ -56,6 +56,7 @@


          import org.apache.axis.Constants;
          import org.apache.axis.deployment.wsdd.WSDDConstants;
          +import org.apache.axis.providers.java.JavaProvider;
          import org.apache.axis.utils.JavaUtils;
          import org.apache.axis.wsdl.symbolTable.BindingEntry;
          import org.apache.axis.wsdl.symbolTable.CollectionType;
          @@ -326,13 +327,13 @@
          pw.println(methodList.substring(1) + "\"/>");
                      }
          -        if (emitter.getScope() == Emitter.APPLICATION_SCOPE) {
          +        if (emitter.getScope() == JavaProvider.BYTE_SCOPE_APPLICATION) {
                      pw.println("      <parameter name=\"scope\" value=\"Application\"/>");
                      }
          -        else if (emitter.getScope() == Emitter.REQUEST_SCOPE) {
          +        else if (emitter.getScope() == JavaProvider.BYTE_SCOPE_REQUEST) {
                      pw.println("      <parameter name=\"scope\" value=\"Request\"/>");
                      }
          -        else if (emitter.getScope() == Emitter.SESSION_SCOPE) {
          +        else if (emitter.getScope() == JavaProvider.BYTE_SCOPE_SESSION) {
                      pw.println("      <parameter name=\"scope\" value=\"Session\"/>");
                      }
              } //writeDeployBinding

          1.33      +4 -3      xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDDeployableItem.java

          Index: WSDDDeployableItem.java
          ===================================================================
          RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDDeployableItem.java,v
          retrieving revision 1.32
          retrieving revision 1.33
          diff -u -r1.32 -r1.33
          --- WSDDDeployableItem.java 5 Jun 2002 21:49:20 -0000 1.32
          +++ WSDDDeployableItem.java 5 Jun 2002 23:24:35 -0000 1.33
          @@ -62,6 +62,7 @@
          import org.apache.axis.deployment.DeployableItem;
          import org.apache.axis.deployment.DeploymentRegistry;
          import org.apache.axis.deployment.DeploymentException;
          +import org.apache.axis.providers.java.JavaProvider;
          import org.apache.axis.utils.LockableHashtable;
          import org.apache.axis.utils.JavaUtils;
          import org.apache.axis.utils.XMLUtils;
          @@ -145,7 +146,7 @@
          // Figure out our scope - right now if a non-recognized scope
          // attribute appears, we will ignore it and use the default
          // scope.  Is this right, or should we throw an error?
          -        String scopeStr = e.getAttribute(ATTR_SCOPE);
          +        String scopeStr = e.getAttribute(JavaProvider.OPTION_SCOPE);
                      if (scopeStr != null) {
                      for (int i = 0; i < scopeStrings.length; i++) {
          if (scopeStr.equals(scopeStrings[i])) {
          @@ -343,11 +344,11 @@
                              try{
                              h.init();
          }catch(Exception e){
          -                    String msg=e + NL + JavaUtils.stackToString(e);
          +                    String msg=e + JavaUtils.LS + JavaUtils.stackToString(e);
                                      log.debug(msg);
                                      throw new ConfigurationException(e);
          }catch(Error e){
          -                    String msg=e + NL + JavaUtils.stackToString(e);
          +                    String msg=e + JavaUtils.LS + JavaUtils.stackToString(e);
                                      log.debug(msg);
                                      throw new ConfigurationException(msg);
                              }

          1.18      +0 -17     xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDConstants.java

          Index: WSDDConstants.java
          ===================================================================
          RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDConstants.java,v
          retrieving revision 1.17
          retrieving revision 1.18
          diff -u -r1.17 -r1.18
          --- WSDDConstants.java 31 May 2002 19:08:06 -0000 1.17
          +++ WSDDConstants.java 5 Jun 2002 23:24:35 -0000 1.18
          @@ -151,7 +151,6 @@
              public static final String ATTR_QNAME = "qname";
              public static final String ATTR_NAME = "name";
              public static final String ATTR_TYPE = "type";
          -    public static final String ATTR_SCOPE = "scope";
          public static final String ATTR_VALUE = "value";
          public static final String ATTR_LOCKED = "locked";
          public static final String ATTR_RETQNAME = "returnQName";
          @@ -164,20 +163,4 @@
          public static final String ATTR_SERIALIZER = "serializer";
          public static final String ATTR_DESERIALIZER = "deserializer";
          public static final String ATTR_ENCSTYLE = "encodingStyle";
          -
          -    public static final String ATTR_SCOPE_REQUEST = "Request";
          -    public static final String ATTR_SCOPE_APPLICATION = "Application";
          -    public static final String ATTR_SCOPE_SESSION = "Session";
          -
          -
          -    public static boolean isValidScope(String scope)
          -    {
          -        return scope == null  ||
          -               scope.length() == 0  ||
          -               scope.equalsIgnoreCase(ATTR_SCOPE_REQUEST)  ||
          -               scope.equalsIgnoreCase(ATTR_SCOPE_APPLICATION)  ||
          -               scope.equalsIgnoreCase(ATTR_SCOPE_SESSION);
          -    }
          -
          -    public static final String NL = System.getProperty("line.separator");
          }


Reply via email to