axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bu...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava JavaDeployWriter.java JavaSkelWriter.java JavaStubWriter.java
Date Thu, 03 Oct 2002 20:11:20 GMT
butek       2002/10/03 13:11:20

  Modified:    java/src/org/apache/axis/wsdl/symbolTable Tag:
                        explicitHeaderWork BindingEntry.java Parameter.java
                        SymbolTable.java
               java/src/org/apache/axis/wsdl/toJava Tag: explicitHeaderWork
                        JavaDeployWriter.java JavaSkelWriter.java
                        JavaStubWriter.java
  Log:
  A bit more header work - distinguish between input and output headers.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.3.8.2   +28 -9     xml-axis/java/src/org/apache/axis/wsdl/symbolTable/BindingEntry.java
  
  Index: BindingEntry.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/symbolTable/BindingEntry.java,v
  retrieving revision 1.3.8.1
  retrieving revision 1.3.8.2
  diff -u -r1.3.8.1 -r1.3.8.2
  --- BindingEntry.java	2 Oct 2002 19:32:48 -0000	1.3.8.1
  +++ BindingEntry.java	3 Oct 2002 20:11:20 -0000	1.3.8.2
  @@ -213,20 +213,37 @@
       } // setMIMEType
   
       /**
  -     * Get the mime mapping for the given parameter name.
  -     * If there is none, this returns null.
  +     * Is this parameter an input header parameter?.
        */
  -    public boolean isHeaderParameter(String operationName,
  +    public boolean isInHeaderParameter(String operationName,
               String parameterName) {
  +        return (headerParameter(operationName, parameterName) & IN_HEADER) > 0;
  +    } // isInHeaderParameter
  +
  +    /**
  +     * Is this parameter an output header parameter?.
  +     */
  +    public boolean isOutHeaderParameter(String operationName,
  +            String parameterName) {
  +        return (headerParameter(operationName, parameterName) & OUT_HEADER) > 0;
  +    } // isInHeaderParameter
  +
  +    /**
  +     * Get the flag indicating what sort of header this parameter is.
  +     */
  +    public static final int NO_HEADER  = 0;
  +    public static final int IN_HEADER  = 1;
  +    public static final int OUT_HEADER = 2;
  +    private int headerParameter(String operationName, String parameterName) {
           Map opMap = (Map) headerParameters.get(operationName);
           if (opMap == null) {
  -            return false;
  +            return NO_HEADER;
           }
           else {
  -            Boolean bool = (Boolean) opMap.get(parameterName);
  -            return bool == null ? false : bool.booleanValue();
  +            Integer I = (Integer) opMap.get(parameterName);
  +            return I == null ? NO_HEADER : I.intValue();
           }
  -    } // isHeaderParameter
  +    } // headerParameter
   
       /**
        * Get the header parameter map.
  @@ -238,13 +255,15 @@
       /**
        * Set the header parameter mapping for the given parameter name.
        */
  -    public void setHeaderParameter(String operationName, String parameterName, boolean
isHeader) {
  +    public void setHeaderParameter(String operationName, String parameterName, int headerFlags)
{
           Map opMap = (Map) headerParameters.get(operationName);
           if (opMap == null) {
               opMap = new HashMap();
               headerParameters.put(operationName, opMap);
           }
  -        opMap.put(parameterName, new Boolean(isHeader));
  +        Integer I = (Integer) opMap.get(parameterName);
  +        int i = I == null ? headerFlags : (I.intValue() | headerFlags);
  +        opMap.put(parameterName, new Integer(i));
       } // setHeaderParameter
   
       /**
  
  
  
  1.3.8.2   +13 -3     xml-axis/java/src/org/apache/axis/wsdl/symbolTable/Parameter.java
  
  Index: Parameter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/symbolTable/Parameter.java,v
  retrieving revision 1.3.8.1
  retrieving revision 1.3.8.2
  diff -u -r1.3.8.1 -r1.3.8.2
  --- Parameter.java	2 Oct 2002 19:28:05 -0000	1.3.8.1
  +++ Parameter.java	3 Oct 2002 20:11:20 -0000	1.3.8.2
  @@ -80,13 +80,15 @@
       private byte mode = IN;
   
       private boolean inHeader = false;
  +    private boolean outHeader = false;
   
       public String toString() {
           return "(" + type
                   + (mimeType == null ? "" : "(" + mimeType + ")")
                   + ", " + getName() + ", "
                   + (mode == IN ? "IN)" : mode == INOUT ? "INOUT)" : "OUT)"
  -                + (inHeader ? "(soap:header)" : ""));
  +                + (inHeader ? "(IN soap:header)" : "")
  +                + (outHeader ? "(OUT soap:header)" : ""));
       } // toString
   
       public QName getQName() {
  @@ -134,11 +136,19 @@
           this.mode = mode;
       }
   
  -    public boolean inHeader() {
  +    public boolean isInHeader() {
           return inHeader;
  -    } // inHeader
  +    } // isInHeader
   
       public void setInHeader(boolean inHeader) {
           this.inHeader = inHeader;
       } // setInHeader
  +
  +    public boolean isOutHeader() {
  +        return outHeader;
  +    } // isOutHeader
  +
  +    public void setOutHeader(boolean outHeader) {
  +        this.outHeader = outHeader;
  +    } // setOutHeader
   } // class Parameter
  
  
  
  1.41.6.2  +16 -5     xml-axis/java/src/org/apache/axis/wsdl/symbolTable/SymbolTable.java
  
  Index: SymbolTable.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/symbolTable/SymbolTable.java,v
  retrieving revision 1.41.6.1
  retrieving revision 1.41.6.2
  diff -u -r1.41.6.1 -r1.41.6.2
  --- SymbolTable.java	2 Oct 2002 19:32:48 -0000	1.41.6.1
  +++ SymbolTable.java	3 Oct 2002 20:11:20 -0000	1.41.6.2
  @@ -1332,9 +1332,13 @@
                   setMIMEType(param, bindingEntry == null ? null :
                           bindingEntry.getMIMEType(opName, partName));
                   if (bindingEntry != null &&
  -                        bindingEntry.isHeaderParameter(opName, partName)) {
  +                        bindingEntry.isInHeaderParameter(opName, partName)) {
                       param.setInHeader(true);
                   }
  +                if (bindingEntry != null &&
  +                        bindingEntry.isOutHeaderParameter(opName, partName)) {
  +                    param.setOutHeader(true);
  +                }
   
                   v.add(param);
   
  @@ -1415,9 +1419,12 @@
                       p.setType(elem.getType());
                       setMIMEType(p, bindingEntry == null ? null :
                               bindingEntry.getMIMEType(opName, partName));
  -                    if (bindingEntry.isHeaderParameter(opName, partName)) {
  +                    if (bindingEntry.isInHeaderParameter(opName, partName)) {
                           p.setInHeader(true);
                       }
  +                    if (bindingEntry.isOutHeaderParameter(opName, partName)) {
  +                        p.setOutHeader(true);
  +                    }
                       v.add(p);
                   }
               } else {
  @@ -1433,9 +1440,12 @@
                   }
                   setMIMEType(param, bindingEntry == null ? null :
                           bindingEntry.getMIMEType(opName, partName));
  -                if (bindingEntry.isHeaderParameter(opName, partName)) {
  +                if (bindingEntry.isInHeaderParameter(opName, partName)) {
                       param.setInHeader(true);
                   }
  +                if (bindingEntry.isOutHeaderParameter(opName, partName)) {
  +                    param.setOutHeader(true);
  +                }
   
                   v.add(param);
               }
  @@ -1598,9 +1608,10 @@
                   // parts come from messages used in the portType's operation
                   // input/output clauses - it does not work for implicit
                   // headers - those whose parts come from messages not used in
  -                // the portType-s operation's input/output clauses.
  +                // the portType's operation's input/output clauses.  I don't
  +                // know what we're supposed to emit for implicit headers.
                   bEntry.setHeaderParameter(operation.getName(), header.getPart(),
  -                        true);
  +                        input ? BindingEntry.IN_HEADER : BindingEntry.OUT_HEADER);
               }
               else if (obj instanceof MIMEMultipartRelated) {
                   bEntry.setBodyType(operation,
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.65.4.2  +5 -11     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.65.4.1
  retrieving revision 1.65.4.2
  diff -u -r1.65.4.1 -r1.65.4.2
  --- JavaDeployWriter.java	2 Oct 2002 20:09:00 -0000	1.65.4.1
  +++ JavaDeployWriter.java	3 Oct 2002 20:11:20 -0000	1.65.4.2
  @@ -444,17 +444,11 @@
               }
   
               // Is this a header?
  -            // NOTE:  the symbol table will have to change eventually to distinguish
  -            // between the input and output aspects of INOUT parameters.  One COULD
  -            // be in the header while the other could be in the body.  Right now the
  -            // symbol table assumes it's all or nothing.
  -            if (param.inHeader()) {
  -                if (param.getMode() != Parameter.OUT) {
  -                    pw.print(" inHeader=\"true\"");
  -                }
  -                if (param.getMode() != Parameter.IN) {
  -                    pw.print(" outHeader=\"true\"");
  -                }
  +            if (param.isInHeader()) {
  +                pw.print(" inHeader=\"true\"");
  +            }
  +            if (param.isOutHeader()) {
  +                pw.print(" outHeader=\"true\"");
               }
   
               pw.println("/>");
  
  
  
  1.49.6.2  +2 -6      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaSkelWriter.java
  
  Index: JavaSkelWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaSkelWriter.java,v
  retrieving revision 1.49.6.1
  retrieving revision 1.49.6.2
  diff -u -r1.49.6.1 -r1.49.6.2
  --- JavaSkelWriter.java	2 Oct 2002 20:09:00 -0000	1.49.6.1
  +++ JavaSkelWriter.java	3 Oct 2002 20:11:20 -0000	1.49.6.2
  @@ -187,12 +187,8 @@
                       QName paramType = Utils.getXSIType(p);
   
                       // Is this parameter a header?
  -                    // NOTE:  the symbol table will have to change eventually to distinguish
  -                    // between the input and output aspects of INOUT parameters.  One COULD
  -                    // be in the header while the other could be in the body.  Right now
the
  -                    // symbol table assumes it's all or nothing.
  -                    String inHeader = p.inHeader() ? "true" : "false";
  -                    String outHeader = inHeader;
  +                    String inHeader = p.isInHeader() ? "true" : "false";
  +                    String outHeader = p.isOutHeader() ? "true" : "false";
                       pw.println("            " +
                           "new org.apache.axis.description.ParameterDesc(" +
                           Utils.getNewQName(paramName) +
  
  
  
  1.98.4.2  +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java
  
  Index: JavaStubWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
  retrieving revision 1.98.4.1
  retrieving revision 1.98.4.2
  diff -u -r1.98.4.1 -r1.98.4.2
  --- JavaStubWriter.java	2 Oct 2002 19:32:48 -0000	1.98.4.1
  +++ JavaStubWriter.java	3 Oct 2002 20:11:20 -0000	1.98.4.2
  @@ -517,7 +517,7 @@
   
               // Generate the addParameter call with the
               // name qname, typeQName, optional javaType, and mode
  -            if (p.getMode() != Parameter.OUT && p.inHeader()) {
  +            if (p.getMode() != Parameter.OUT && p.isInHeader()) {
                   pw.println("        _call.addParameterAsHeader(" + paramNameText + ", "
                              + paramTypeText + ", " 
                              + javaType + "javax.xml.rpc.ParameterMode.IN);");
  
  
  

Mime
View raw message