You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sc...@apache.org on 2002/10/14 19:36:19 UTC

cvs commit: xml-axis/java/src/org/apache/axis/wsdl/fromJava Emitter.java

scheu       2002/10/14 10:36:19

  Modified:    java/src/org/apache/axis/wsdl/fromJava Emitter.java
  Log:
  Add deprecated apis to emitter
  
  Revision  Changes    Path
  1.72      +77 -0     xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- Emitter.java	10 Oct 2002 19:56:45 -0000	1.71
  +++ Emitter.java	14 Oct 2002 17:36:19 -0000	1.72
  @@ -168,6 +168,13 @@
       private ServiceDesc serviceDesc2;
       private String soapAction = "DEFAULT";
   
  +    /** DEPRECATED - Indicates style=rpc use=encoded */
  +    public static final int MODE_RPC = 0;
  +    /** DEPRECATED - Indicates style=document use=literal */
  +    public static final int MODE_DOCUMENT = 1;
  +    /** DEPRECATED - Indicates style=wrapped use=literal */
  +    public static final int MODE_DOC_WRAPPED = 2;
  +
       /**
        * Construct Emitter.
        * Set the contextual information using set* methods
  @@ -1743,28 +1750,98 @@
           this.defaultTM = defaultTM;
       }
   
  +
  +         
  +
  +    /**
  +     * getStyle
  +     * @return Style setting (Style.RPC, Style.DOCUMENT, Style.WRAPPED, etc.)
  +     */
       public Style getStyle() {
           return style;
       }
   
  +    /**
  +     * setStyle
  +     * @param value String representing a style ("document", "rpc", "wrapped")
  +     * Note that the case of the string is not important. "document" and "DOCUMENT"
  +     * are both treated as document style.
  +     * If the value is not a know style, the default setting is used.
  +     * See org.apache.axis.enum.Style for a description of the interaction between
  +     * Style/Use
  +     */
       public void setStyle(String value) {
           style = Style.getStyle(value);
       }
   
  +    /**
  +     * setStyle
  +     * @param value Style setting
  +     */
       public void setStyle(Style value) {
           style = value;
       }
   
  +    /**
  +     * getUse
  +     * @return Use setting (Use.ENCODED, Use.LITERAL)
  +     */
       public Use getUse() {
           return use;
       }
   
  +    /**
  +     * setUse
  +     * @param value String representing a use ("literal", "encoded")
  +     * Note that the case of the string is not important. "literal" and "LITERAL"
  +     * are both treated as literal use.
  +     * If the value is not a know use, the default setting is used.
  +     * See org.apache.axis.enum.Style for a description of the interaction between
  +     * Style/Use
  +     */
       public void setUse(String value) {
           use = Use.getUse(value);
       }
   
  +    /**
  +     * setUse
  +     * @param value Use setting
  +     */
       public void setUse(Use value) {
           use = value;
  +    }
  +
  +    /**
  +     * setMode (sets style and use)
  +     * @deprecated (use setStyle and setUse)
  +     */
  +    public void setMode(int mode) {
  +        if (mode == MODE_RPC) {
  +            setStyle(Style.RPC);
  +            setUse(Use.ENCODED);
  +        } else if (mode == MODE_DOCUMENT) {
  +            setStyle(Style.DOCUMENT);
  +            setUse(Use.LITERAL);
  +        } else if (mode == MODE_DOC_WRAPPED) {
  +            setStyle(Style.WRAPPED);
  +            setUse(Use.LITERAL);
  +        }
  +    }
  +
  +    /** 
  +     * getMode (gets the mode based on the style setting)
  +     * @deprecated (use getStyle and getUse)
  +     * @return returns the mode (-1 if invalid)
  +     */
  +    public int getMode() {
  +        if (style == Style.RPC) {
  +            return MODE_RPC;
  +        } else if (style == Style.DOCUMENT) {
  +            return MODE_DOCUMENT;
  +        } else if (style == Style.WRAPPED) {
  +            return MODE_DOC_WRAPPED;
  +        }
  +        return -1;
       }
   
       public ServiceDesc getServiceDesc() {