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 di...@apache.org on 2005/02/08 19:44:38 UTC
cvs commit: ws-axis/java/tools/org/apache/axis/tools/ant/wsdl Wsdl2javaAntTask.java
dims 2005/02/08 10:44:38
Modified: java/src/org/apache/axis/encoding/ser ArraySerializer.java
java/src/org/apache/axis/wsdl/symbolTable BindingEntry.java
FaultInfo.java SymbolTable.java
java/src/org/apache/axis/message BodyBuilder.java
MessageElement.java RPCElement.java
java/src/org/apache/axis/client Call.java
java/src/org/apache/axis/wsdl/fromJava Emitter.java
Types.java
java/src/org/apache/axis/wsdl/toJava Emitter.java
JavaDeployWriter.java JavaFaultWriter.java
JavaStubWriter.java Utils.java
java/src/org/apache/axis/constants Scope.java Style.java
Use.java
java/test GenericLocalTest.java
java/src/org/apache/axis/providers/java JavaProvider.java
RPCProvider.java
java/src/org/apache/axis/transport/java JavaSender.java
java/src/org/apache/axis/description JavaServiceDesc.java
OperationDesc.java ServiceDesc.java
java/src/org/apache/axis/handlers JWSHandler.java
java/src/org/apache/axis MessageContext.java
java/test/wsdl/rpcParams RpcParamsBindingStub.java
java/src/org/apache/axis/enum Scope.java Style.java Use.java
java/src/org/apache/axis/encoding SerializationContext.java
java/src/org/apache/axis/handlers/soap SOAPService.java
java/src/org/apache/axis/client/async Status.java
java/test/faults TestBeans.java
java/test/holders TestBook.java
java/test/encoding TestGlobalTypeMappings.java
java/test/MSGDispatch TestMessageService.java
java/test/soap12 TestRPC.java
java/test/wsdl/soap12/additional
WhiteMesaSoap12AddTestSvcTestCase.java
java/test/wsdl/soap12/assertion
WhiteMesaSoap12TestSvcTestCase.java
java/src/org/apache/axis/deployment/wsdd WSDDService.java
java/src/org/apache/axis/wsdl WSDL2Java.java
java/tools/org/apache/axis/tools/ant/wsdl
Wsdl2javaAntTask.java
Added: java/src/org/apache/axis/constants Enum.java
Removed: java/src/org/apache/axis/enum Enum.java
Log:
enum package is now deprecated. Please use constants package from now on. we still have wrapper classes in enum package that extend the ones in constants. But they are marked deprecated.
Revision Changes Path
1.64 +1 -1 ws-axis/java/src/org/apache/axis/encoding/ser/ArraySerializer.java
Index: ArraySerializer.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/ser/ArraySerializer.java,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- ArraySerializer.java 11 Jan 2005 16:44:53 -0000 1.63
+++ ArraySerializer.java 8 Feb 2005 18:44:35 -0000 1.64
@@ -19,7 +19,7 @@
import org.apache.axis.AxisEngine;
import org.apache.axis.Constants;
import org.apache.axis.MessageContext;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Use;
import org.apache.axis.components.logger.LogFactory;
import org.apache.axis.encoding.SerializationContext;
import org.apache.axis.encoding.Serializer;
1.14 +2 -2 ws-axis/java/src/org/apache/axis/wsdl/symbolTable/BindingEntry.java
Index: BindingEntry.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/symbolTable/BindingEntry.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- BindingEntry.java 25 Feb 2004 14:02:50 -0000 1.13
+++ BindingEntry.java 8 Feb 2005 18:44:35 -0000 1.14
@@ -15,8 +15,8 @@
*/
package org.apache.axis.wsdl.symbolTable;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import javax.wsdl.Binding;
import javax.wsdl.Operation;
1.12 +1 -1 ws-axis/java/src/org/apache/axis/wsdl/symbolTable/FaultInfo.java
Index: FaultInfo.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/symbolTable/FaultInfo.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- FaultInfo.java 3 Feb 2005 14:00:18 -0000 1.11
+++ FaultInfo.java 8 Feb 2005 18:44:35 -0000 1.12
@@ -15,7 +15,7 @@
*/
package org.apache.axis.wsdl.symbolTable;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Use;
import org.apache.axis.utils.Messages;
import javax.wsdl.Fault;
1.113 +2 -2 ws-axis/java/src/org/apache/axis/wsdl/symbolTable/SymbolTable.java
Index: SymbolTable.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/symbolTable/SymbolTable.java,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -r1.112 -r1.113
--- SymbolTable.java 25 Jan 2005 18:47:35 -0000 1.112
+++ SymbolTable.java 8 Feb 2005 18:44:35 -0000 1.113
@@ -16,8 +16,8 @@
package org.apache.axis.wsdl.symbolTable;
import org.apache.axis.Constants;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import org.apache.axis.utils.Messages;
import org.apache.axis.utils.URLHashSet;
import org.apache.axis.utils.XMLUtils;
1.64 +1 -1 ws-axis/java/src/org/apache/axis/message/BodyBuilder.java
Index: BodyBuilder.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/message/BodyBuilder.java,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- BodyBuilder.java 29 Jul 2004 21:40:27 -0000 1.63
+++ BodyBuilder.java 8 Feb 2005 18:44:36 -0000 1.64
@@ -27,7 +27,7 @@
import org.apache.axis.components.logger.LogFactory;
import org.apache.axis.description.OperationDesc;
import org.apache.axis.encoding.DeserializationContext;
-import org.apache.axis.enum.Style;
+import org.apache.axis.constants.Style;
import org.apache.axis.soap.SOAPConstants;
import org.apache.axis.utils.Messages;
import org.apache.commons.logging.Log;
1.194 +1 -1 ws-axis/java/src/org/apache/axis/message/MessageElement.java
Index: MessageElement.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/message/MessageElement.java,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -r1.193 -r1.194
--- MessageElement.java 4 Feb 2005 03:42:45 -0000 1.193
+++ MessageElement.java 8 Feb 2005 18:44:36 -0000 1.194
@@ -24,7 +24,7 @@
import org.apache.axis.encoding.Deserializer;
import org.apache.axis.encoding.SerializationContext;
import org.apache.axis.encoding.TextSerializationContext;
-import org.apache.axis.enum.Style;
+import org.apache.axis.constants.Style;
import org.apache.axis.soap.SOAPConstants;
import org.apache.axis.utils.Mapping;
import org.apache.axis.utils.Messages;
1.100 +2 -2 ws-axis/java/src/org/apache/axis/message/RPCElement.java
Index: RPCElement.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/message/RPCElement.java,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- RPCElement.java 15 Nov 2004 05:32:06 -0000 1.99
+++ RPCElement.java 8 Feb 2005 18:44:36 -0000 1.100
@@ -25,8 +25,8 @@
import org.apache.axis.description.ServiceDesc;
import org.apache.axis.encoding.DeserializationContext;
import org.apache.axis.encoding.SerializationContext;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.soap.SOAPConstants;
import org.apache.axis.utils.JavaUtils;
1.239 +2 -2 ws-axis/java/src/org/apache/axis/client/Call.java
Index: Call.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/client/Call.java,v
retrieving revision 1.238
retrieving revision 1.239
diff -u -r1.238 -r1.239
--- Call.java 27 Jan 2005 16:00:00 -0000 1.238
+++ Call.java 8 Feb 2005 18:44:36 -0000 1.239
@@ -38,8 +38,8 @@
import org.apache.axis.encoding.XMLType;
import org.apache.axis.encoding.ser.BaseDeserializerFactory;
import org.apache.axis.encoding.ser.BaseSerializerFactory;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.message.RPCElement;
import org.apache.axis.message.RPCHeaderParam;
1.137 +4 -4 ws-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java
Index: Emitter.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -r1.136 -r1.137
--- Emitter.java 19 Jan 2005 21:04:22 -0000 1.136
+++ Emitter.java 8 Feb 2005 18:44:36 -0000 1.137
@@ -35,8 +35,8 @@
import org.apache.axis.encoding.TypeMapping;
import org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl;
import org.apache.axis.encoding.DefaultJAXRPC11TypeMappingImpl;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import org.apache.axis.utils.ClassUtils;
import org.apache.axis.utils.JavaUtils;
import org.apache.axis.utils.Messages;
@@ -2574,7 +2574,7 @@
* 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
+ * See org.apache.axis.constants.Style for a description of the interaction between
* Style/Use
* <br>NOTE: If style is specified as "wrapped", use is set to literal.
*/
@@ -2612,7 +2612,7 @@
* 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
+ * See org.apache.axis.constants.Style for a description of the interaction between
* Style/Use
*/
public void setUse(String value) {
1.109 +1 -1 ws-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java
Index: Types.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- Types.java 18 Jan 2005 14:49:46 -0000 1.108
+++ Types.java 8 Feb 2005 18:44:36 -0000 1.109
@@ -26,7 +26,7 @@
import org.apache.axis.encoding.DefaultJAXRPC11TypeMappingImpl;
import org.apache.axis.encoding.ser.BeanSerializerFactory;
import org.apache.axis.encoding.ser.EnumSerializerFactory;
-import org.apache.axis.enum.Style;
+import org.apache.axis.constants.Style;
import org.apache.axis.utils.JavaUtils;
import org.apache.axis.utils.Messages;
import org.apache.axis.utils.XMLUtils;
1.79 +1 -1 ws-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java
Index: Emitter.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- Emitter.java 20 Jan 2005 14:18:05 -0000 1.78
+++ Emitter.java 8 Feb 2005 18:44:36 -0000 1.79
@@ -19,7 +19,7 @@
import org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl;
import org.apache.axis.encoding.DefaultTypeMappingImpl;
import org.apache.axis.encoding.TypeMapping;
-import org.apache.axis.enum.Scope;
+import org.apache.axis.constants.Scope;
import org.apache.axis.i18n.Messages;
import org.apache.axis.utils.ClassUtils;
import org.apache.axis.utils.JavaUtils;
1.89 +3 -3 ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaDeployWriter.java
Index: JavaDeployWriter.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaDeployWriter.java,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- JavaDeployWriter.java 21 Jan 2005 15:57:05 -0000 1.88
+++ JavaDeployWriter.java 8 Feb 2005 18:44:36 -0000 1.89
@@ -17,9 +17,9 @@
import org.apache.axis.Constants;
import org.apache.axis.deployment.wsdd.WSDDConstants;
-import org.apache.axis.enum.Scope;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Scope;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import org.apache.axis.utils.JavaUtils;
import org.apache.axis.utils.Messages;
import org.apache.axis.wsdl.symbolTable.BindingEntry;
1.23 +1 -1 ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaFaultWriter.java
Index: JavaFaultWriter.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaFaultWriter.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- JavaFaultWriter.java 25 Feb 2004 14:02:52 -0000 1.22
+++ JavaFaultWriter.java 8 Feb 2005 18:44:36 -0000 1.23
@@ -15,7 +15,7 @@
*/
package org.apache.axis.wsdl.toJava;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Use;
import org.apache.axis.wsdl.symbolTable.FaultInfo;
import org.apache.axis.wsdl.symbolTable.Parameter;
import org.apache.axis.wsdl.symbolTable.SymbolTable;
1.142 +2 -2 ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java
Index: JavaStubWriter.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -r1.141 -r1.142
--- JavaStubWriter.java 28 Jan 2005 09:39:03 -0000 1.141
+++ JavaStubWriter.java 8 Feb 2005 18:44:36 -0000 1.142
@@ -17,8 +17,8 @@
import org.apache.axis.Constants;
import org.apache.axis.components.logger.LogFactory;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import org.apache.axis.utils.Messages;
import org.apache.axis.wsdl.symbolTable.BindingEntry;
import org.apache.axis.wsdl.symbolTable.DefinedType;
1.92 +2 -2 ws-axis/java/src/org/apache/axis/wsdl/toJava/Utils.java
Index: Utils.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/Utils.java,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- Utils.java 7 Feb 2005 18:37:15 -0000 1.91
+++ Utils.java 8 Feb 2005 18:44:36 -0000 1.92
@@ -17,8 +17,8 @@
import org.apache.axis.Constants;
import org.apache.axis.components.logger.LogFactory;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import org.apache.axis.utils.JavaUtils;
import org.apache.axis.utils.Messages;
import org.apache.axis.wsdl.symbolTable.*;
1.2 +85 -3 ws-axis/java/src/org/apache/axis/constants/Scope.java
Index: Scope.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/constants/Scope.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Scope.java 28 Oct 2004 14:04:35 -0000 1.1
+++ Scope.java 8 Feb 2005 18:44:37 -0000 1.2
@@ -16,9 +16,91 @@
package org.apache.axis.constants;
+
+
+
/**
- * Simple wrapper around org.apache.axis.enum.Scope
- * @author dims@yahoo.com
+ * @author rsitze
*/
-public class Scope extends org.apache.axis.enum.Scope {
+public class Scope extends Enum {
+ private static final Type type = new Type();
+
+ public static final String REQUEST_STR = "Request";
+ public static final String APPLICATION_STR = "Application";
+ public static final String SESSION_STR = "Session";
+ public static final String FACTORY_STR = "Factory";
+
+ public static final Scope REQUEST = type.getScope(REQUEST_STR);
+ public static final Scope APPLICATION = type.getScope(APPLICATION_STR);
+ public static final Scope SESSION = type.getScope(SESSION_STR);
+ public static final Scope FACTORY = type.getScope(FACTORY_STR);
+
+ public static final Scope DEFAULT = REQUEST;
+
+ static { type.setDefault(DEFAULT); }
+
+ // public int getValue();
+ // public String getName();
+ // public Type getType();
+
+ public static Scope getDefault() { return (Scope)type.getDefault(); }
+
+ public static final Scope getScope(int scope) {
+ return type.getScope(scope);
+ }
+
+ public static final Scope getScope(String scope) {
+ return type.getScope(scope);
+ }
+
+ public static final Scope getScope(String scope, Scope dephault) {
+ return type.getScope(scope, dephault);
+ }
+
+ public static final boolean isValid(String scope) {
+ return type.isValid(scope);
+ }
+
+ public static final int size() {
+ return type.size();
+ }
+
+ public static final String[] getScopes() {
+ return type.getEnumNames();
+ }
+
+ private Object readResolve() throws java.io.ObjectStreamException {
+ return type.getScope(value);
+ }
+ public static class Type extends Enum.Type {
+ private Type() {
+ super("scope", new Enum[] {
+ new Scope(0, REQUEST_STR),
+ new Scope(1, APPLICATION_STR),
+ new Scope(2, SESSION_STR),
+ new Scope(3, FACTORY_STR)
+ });
+ }
+
+ public final Scope getScope(int scope) {
+ return (Scope)this.getEnum(scope);
+ }
+
+ public final Scope getScope(String scope) {
+ return (Scope)this.getEnum(scope);
+ }
+
+ public final Scope getScope(String scope, Scope dephault) {
+ return (Scope)this.getEnum(scope, dephault);
+ }
+
+ }
+
+ private Scope(int value, String name) {
+ super(type, value, name);
+ }
+
+ protected Scope() {
+ super(type, DEFAULT.getValue(), DEFAULT.getName());
+ }
}
1.2 +146 -3 ws-axis/java/src/org/apache/axis/constants/Style.java
Index: Style.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/constants/Style.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Style.java 28 Oct 2004 14:04:35 -0000 1.1
+++ Style.java 8 Feb 2005 18:44:37 -0000 1.2
@@ -20,9 +20,152 @@
import javax.xml.namespace.QName;
+
/**
- * Simple wrapper around org.apache.axis.enum.Style
- * @author dims@yahoo.com
+ * Description of the different styles
+ * <br>
+ * <b>style=rpc, use=encoded</b><br>
+ * First element of the SOAP body is the
+ * operation. The operation contains
+ * elements describing the parameters, which
+ * are serialized as encoded (possibly multi-ref)
+ * <pre>
+ * <soap:body>
+ * <operation>
+ * <arg1>...</arg1>
+ * <arg2>...</arg2>
+ * </operation>
+ * </pre>
+ * <br>
+ * <b>style=RPC, use=literal</b><br>
+ * First element of the SOAP body is the
+ * operation. The operation contains elements
+ * describing the parameters, which are serialized
+ * as encoded (no multi-ref)\
+ * <pre>
+ * <soap:body>
+ * <operation>
+ * <arg1>...</arg1>
+ * <arg2>...</arg2>
+ * </operation>
+ * </pre>
+ * <br>
+ * <b>style=document, use=literal</b><br>
+ * Elements of the SOAP body are the names of the parameters
+ * (there is no wrapper operation...no multi-ref)
+ * <pre>
+ * <soap:body>
+ * <arg1>...</arg1>
+ * <arg2>...</arg2>
+ * </pre>
+ * <br>
+ * <b>style=wrapped</b><br>
+ * Special case of DOCLIT where there is only one parameter
+ * and it has the same qname as the operation. In
+ * such cases, there is no actual type with the name...the
+ * elements are treated as parameters to the operation
+ * <pre>
+ * <soap:body>
+ * <one-arg-same-name-as-operation>
+ * <elemofarg1>...</elemofarg1>
+ * <elemofarg2>...</elemofarg2>
+ * </pre>
+ * <br>
+ * <b>style=document, use=encoded</b><br>
+ * There is not an enclosing operation name element, but
+ * the parmeterss are encoded using SOAP encoding
+ * This mode is not (well?) supported by Axis.
+ *
+ * @author Richard Sitze
*/
-public class Style extends org.apache.axis.enum.Style {
+public class Style extends Enum {
+
+ private static final Type type = new Type();
+
+ public static final String RPC_STR = "rpc";
+ public static final String DOCUMENT_STR = "document";
+ public static final String WRAPPED_STR = "wrapped";
+ public static final String MESSAGE_STR = "message";
+
+
+ public static final Style RPC = type.getStyle(RPC_STR);
+ public static final Style DOCUMENT = type.getStyle(DOCUMENT_STR);
+ public static final Style WRAPPED = type.getStyle(WRAPPED_STR);
+ public static final Style MESSAGE = type.getStyle(MESSAGE_STR);
+
+ public static final Style DEFAULT = RPC;
+
+ static { type.setDefault(DEFAULT); }
+
+
+ private QName provider;
+
+ public static Style getDefault() { return (Style)type.getDefault(); }
+
+ public final QName getProvider() { return provider; }
+
+ public static final Style getStyle(int style) {
+ return type.getStyle(style);
+ }
+
+ public static final Style getStyle(String style) {
+ return type.getStyle(style);
+ }
+
+ public static final Style getStyle(String style, Style dephault) {
+ return type.getStyle(style, dephault);
+ }
+
+ public static final boolean isValid(String style) {
+ return type.isValid(style);
+ }
+
+ public static final int size() {
+ return type.size();
+ }
+
+ public static final String[] getStyles() {
+ return type.getEnumNames();
+ }
+
+ private Object readResolve() throws java.io.ObjectStreamException {
+ return type.getStyle(value);
+ }
+
+ public static class Type extends Enum.Type {
+ private Type() {
+ super("style", new Enum[] {
+ new Style(0, RPC_STR,
+ WSDDConstants.QNAME_JAVARPC_PROVIDER),
+ new Style(1, DOCUMENT_STR,
+ WSDDConstants.QNAME_JAVARPC_PROVIDER),
+ new Style(2, WRAPPED_STR,
+ WSDDConstants.QNAME_JAVARPC_PROVIDER),
+ new Style(3, MESSAGE_STR,
+ WSDDConstants.QNAME_JAVAMSG_PROVIDER),
+ });
+ }
+
+ public final Style getStyle(int style) {
+ return (Style)this.getEnum(style);
+ }
+
+ public final Style getStyle(String style) {
+ return (Style)this.getEnum(style);
+ }
+
+ public final Style getStyle(String style, Style dephault) {
+ return (Style)this.getEnum(style, dephault);
+ }
+ }
+
+ private Style(int value, String name, QName provider) {
+ super(type, value, name);
+ this.provider = provider;
+ }
+
+ protected Style() {
+ super(type, DEFAULT.getValue(), DEFAULT.getName());
+ this.provider = DEFAULT.getProvider();
+ }
}
1.2 +91 -4 ws-axis/java/src/org/apache/axis/constants/Use.java
Index: Use.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/constants/Use.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Use.java 28 Oct 2004 14:04:35 -0000 1.1
+++ Use.java 8 Feb 2005 18:44:37 -0000 1.2
@@ -16,9 +16,96 @@
package org.apache.axis.constants;
+import org.apache.axis.Constants;
+
+
/**
- * Simple wrapper around org.apache.axis.enum.Use
- * @author dims@yahoo.com
+ * Use enum description
+ * @author Richard Scheuerle
*/
-public class Use extends org.apache.axis.enum.Use {
-};
+public class Use extends Enum {
+
+ /**
+ * See Style.java for a description of the combination
+ * of style and use.
+ */
+
+ private static final Type type = new Type();
+
+ public static final String ENCODED_STR = "encoded";
+ public static final String LITERAL_STR = "literal";
+
+ public static final Use ENCODED = type.getUse(ENCODED_STR);
+ public static final Use LITERAL = type.getUse(LITERAL_STR);
+
+ public static final Use DEFAULT = ENCODED;
+
+ static { type.setDefault(DEFAULT); }
+ private String encoding;
+
+ public static Use getDefault() { return (Use)type.getDefault(); }
+
+ public final String getEncoding() { return encoding; }
+
+ public static final Use getUse(int style) {
+ return type.getUse(style);
+ }
+
+ public static final Use getUse(String style) {
+ return type.getUse(style);
+ }
+
+ public static final Use getUse(String style, Use dephault) {
+ return type.getUse(style, dephault);
+ }
+
+ public static final boolean isValid(String style) {
+ return type.isValid(style);
+ }
+
+ public static final int size() {
+ return type.size();
+ }
+
+ public static final String[] getUses() {
+ return type.getEnumNames();
+ }
+
+ private Object readResolve() throws java.io.ObjectStreamException {
+ return type.getUse(value);
+ }
+
+ public static class Type extends Enum.Type {
+ private Type() {
+ super("style", new Enum[] {
+ new Use(0, ENCODED_STR,
+ Constants.URI_DEFAULT_SOAP_ENC),
+ new Use(1, LITERAL_STR,
+ Constants.URI_LITERAL_ENC),
+ });
+ }
+
+ public final Use getUse(int style) {
+ return (Use)this.getEnum(style);
+ }
+
+ public final Use getUse(String style) {
+ return (Use)this.getEnum(style);
+ }
+
+ public final Use getUse(String style, Use dephault) {
+ return (Use)this.getEnum(style, dephault);
+ }
+
+ }
+
+ private Use(int value, String name, String encoding) {
+ super(type, value, name);
+ this.encoding = encoding;
+ }
+
+ protected Use() {
+ super(type, DEFAULT.getValue(), DEFAULT.getName());
+ this.encoding = DEFAULT.getEncoding();
+ }
+}
1.1 ws-axis/java/src/org/apache/axis/constants/Enum.java
Index: Enum.java
===================================================================
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.axis.constants;
import org.apache.axis.components.logger.LogFactory;
import org.apache.axis.utils.Messages;
import org.apache.commons.logging.Log;
import java.util.Hashtable;
/**
* General support for 'enumerated' data types.
* Name searches are case insensitive.
*
* @author Richard Sitze (rsitze@apache.org)
*/
public abstract class Enum implements java.io.Serializable {
private static final Hashtable types = new Hashtable(13);
protected static Log log =
LogFactory.getLog(Enum.class.getName());
private final Type type;
public final int value;
public final String name;
protected Enum(Type type, int value, String name) {
this.type = type;
this.value = value;
this.name = name.intern();
}
public final int getValue() { return value; }
public final String getName() { return name; }
public final Type getType() { return type; }
public String toString() {
return name;
}
public final boolean equals(Object obj) {
return (obj != null && obj instanceof Enum)
? _equals((Enum)obj)
: false;
}
public int hashCode() {
return value;
}
public final boolean equals(Enum obj) {
return (obj != null) ? _equals(obj) : false;
}
/**
* The 'equals' logic assumes that there is a one-to-one
* relationship between value & name. If this isn't true,
* then expect to be confused when using this class with
* Collections.
*/
private final boolean _equals(Enum obj) {
return (//obj.name == name && // names are internalized
obj.type == type &&
obj.value == value);
}
public abstract static class Type implements java.io.Serializable {
private final String name;
private final Enum[] enums;
private Enum dephault = null;
protected Type(String name, Enum[] enums) {
this.name = name.intern();
this.enums = enums;
synchronized (types) {
types.put(name, this);
}
}
public void setDefault(Enum dephault) {
this.dephault = dephault;
}
public Enum getDefault() {
return dephault;
}
public final String getName() {
return name;
}
public final boolean isValid(String enumName) {
for (int enumElt = 0; enumElt < enums.length; enumElt++) {
if (enums[enumElt].getName().equalsIgnoreCase(enumName))
return true;
}
return false;
}
public final int size() {
return enums.length;
}
/**
* Returns array of names for enumerated values
*/
public final String[] getEnumNames() {
String[] nms = new String[ size() ];
for (int idx = 0; idx < enums.length; idx++)
nms[idx] = enums[idx].getName();
return nms;
}
/**
* Returns name of enumerated value
*/
public final Enum getEnum(int enumElt) {
return (enumElt >= 0 && enumElt < enums.length) ? enums[enumElt] : null;
}
/**
* Returns enumerated value of name
*/
public final Enum getEnum(String enumName) {
Enum e = getEnum(enumName, null);
if (e == null) {
log.error(Messages.getMessage("badEnum02", name, enumName));
}
return e;
}
/**
* Returns enumerated value of name
*
* For large sets of enumerated values, a HashMap could
* be used to retrieve. It's not clear if there is any
* benefit for small (3 to 4) sets, as used now.
*/
public final Enum getEnum(String enumName, Enum dephault) {
if (enumName != null && enumName.length() > 0) {
for (int enumElt = 0; enumElt < enums.length; enumElt++) {
Enum e = enums[enumElt];
if (e.getName().equalsIgnoreCase(enumName))
return e;
}
}
return dephault;
}
private Object readResolve() throws java.io.ObjectStreamException {
Object type = types.get(name);
if (type == null) {
type = this;
types.put(name, type);
}
return type;
}
}
}
1.8 +2 -2 ws-axis/java/test/GenericLocalTest.java
Index: GenericLocalTest.java
===================================================================
RCS file: /home/cvs/ws-axis/java/test/GenericLocalTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- GenericLocalTest.java 5 Feb 2005 21:14:00 -0000 1.7
+++ GenericLocalTest.java 8 Feb 2005 18:44:37 -0000 1.8
@@ -20,8 +20,8 @@
import org.apache.axis.client.Service;
import org.apache.axis.configuration.BasicServerConfig;
import org.apache.axis.configuration.SimpleProvider;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.providers.java.RPCProvider;
import org.apache.axis.server.AxisServer;
1.114 +1 -1 ws-axis/java/src/org/apache/axis/providers/java/JavaProvider.java
Index: JavaProvider.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/providers/java/JavaProvider.java,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -r1.113 -r1.114
--- JavaProvider.java 22 Jun 2004 16:58:23 -0000 1.113
+++ JavaProvider.java 8 Feb 2005 18:44:37 -0000 1.114
@@ -25,7 +25,7 @@
import org.apache.axis.components.logger.LogFactory;
import org.apache.axis.description.JavaServiceDesc;
import org.apache.axis.description.OperationDesc;
-import org.apache.axis.enum.Scope;
+import org.apache.axis.constants.Scope;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.message.SOAPEnvelope;
import org.apache.axis.providers.BasicProvider;
1.120 +1 -1 ws-axis/java/src/org/apache/axis/providers/java/RPCProvider.java
Index: RPCProvider.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/providers/java/RPCProvider.java,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -r1.119 -r1.120
--- RPCProvider.java 25 Oct 2004 15:45:52 -0000 1.119
+++ RPCProvider.java 8 Feb 2005 18:44:37 -0000 1.120
@@ -23,7 +23,7 @@
import org.apache.axis.description.OperationDesc;
import org.apache.axis.description.ParameterDesc;
import org.apache.axis.description.ServiceDesc;
-import org.apache.axis.enum.Style;
+import org.apache.axis.constants.Style;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.message.RPCElement;
import org.apache.axis.message.RPCHeaderParam;
1.7 +1 -1 ws-axis/java/src/org/apache/axis/transport/java/JavaSender.java
Index: JavaSender.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/transport/java/JavaSender.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- JavaSender.java 25 Feb 2004 14:02:46 -0000 1.6
+++ JavaSender.java 8 Feb 2005 18:44:37 -0000 1.7
@@ -21,7 +21,7 @@
import org.apache.axis.client.Call;
import org.apache.axis.components.logger.LogFactory;
import org.apache.axis.description.OperationDesc;
-import org.apache.axis.enum.Scope;
+import org.apache.axis.constants.Scope;
import org.apache.axis.handlers.BasicHandler;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.providers.java.MsgProvider;
1.22 +2 -2 ws-axis/java/src/org/apache/axis/description/JavaServiceDesc.java
Index: JavaServiceDesc.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/description/JavaServiceDesc.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- JavaServiceDesc.java 7 Feb 2005 07:54:03 -0000 1.21
+++ JavaServiceDesc.java 8 Feb 2005 18:44:37 -0000 1.22
@@ -21,8 +21,8 @@
import org.apache.axis.AxisProperties;
import org.apache.axis.components.logger.LogFactory;
import org.apache.axis.encoding.*;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import org.apache.axis.message.SOAPBodyElement;
import org.apache.axis.message.SOAPEnvelope;
import org.apache.axis.utils.JavaUtils;
1.42 +2 -2 ws-axis/java/src/org/apache/axis/description/OperationDesc.java
Index: OperationDesc.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/description/OperationDesc.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- OperationDesc.java 5 Jan 2005 06:15:13 -0000 1.41
+++ OperationDesc.java 8 Feb 2005 18:44:37 -0000 1.42
@@ -16,8 +16,8 @@
package org.apache.axis.description;
import org.apache.axis.components.logger.LogFactory;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import org.apache.commons.logging.Log;
import javax.xml.namespace.QName;
1.87 +2 -2 ws-axis/java/src/org/apache/axis/description/ServiceDesc.java
Index: ServiceDesc.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/description/ServiceDesc.java,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- ServiceDesc.java 8 Jun 2004 16:47:17 -0000 1.86
+++ ServiceDesc.java 8 Feb 2005 18:44:37 -0000 1.87
@@ -17,8 +17,8 @@
import org.apache.axis.encoding.TypeMapping;
import org.apache.axis.encoding.TypeMappingRegistry;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import javax.xml.namespace.QName;
import java.util.ArrayList;
1.44 +1 -1 ws-axis/java/src/org/apache/axis/handlers/JWSHandler.java
Index: JWSHandler.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/handlers/JWSHandler.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- JWSHandler.java 29 Oct 2004 21:03:23 -0000 1.43
+++ JWSHandler.java 8 Feb 2005 18:44:37 -0000 1.44
@@ -23,7 +23,7 @@
import org.apache.axis.components.compiler.CompilerError;
import org.apache.axis.components.compiler.CompilerFactory;
import org.apache.axis.components.logger.LogFactory;
-import org.apache.axis.enum.Scope;
+import org.apache.axis.constants.Scope;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.providers.java.RPCProvider;
import org.apache.axis.utils.ClassUtils;
1.145 +2 -2 ws-axis/java/src/org/apache/axis/MessageContext.java
Index: MessageContext.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/MessageContext.java,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -r1.144 -r1.145
--- MessageContext.java 11 Jun 2004 19:09:07 -0000 1.144
+++ MessageContext.java 8 Feb 2005 18:44:37 -0000 1.145
@@ -23,8 +23,8 @@
import org.apache.axis.description.ServiceDesc;
import org.apache.axis.encoding.TypeMapping;
import org.apache.axis.encoding.TypeMappingRegistry;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.schema.SchemaVersion;
import org.apache.axis.session.Session;
1.2 +4 -4 ws-axis/java/test/wsdl/rpcParams/RpcParamsBindingStub.java
Index: RpcParamsBindingStub.java
===================================================================
RCS file: /home/cvs/ws-axis/java/test/wsdl/rpcParams/RpcParamsBindingStub.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RpcParamsBindingStub.java 9 Jul 2003 18:50:22 -0000 1.1
+++ RpcParamsBindingStub.java 8 Feb 2005 18:44:37 -0000 1.2
@@ -127,8 +127,8 @@
operation.setReturnType(new QName("urn:rpcParams.wsdl.test", "EchoStruct"));
operation.setReturnClass(EchoStruct.class);
operation.setReturnQName(new QName("", "echoReturn"));
- operation.setStyle(org.apache.axis.enum.Style.RPC);
- operation.setUse(org.apache.axis.enum.Use.ENCODED);
+ operation.setStyle(org.apache.axis.constants.Style.RPC);
+ operation.setUse(org.apache.axis.constants.Use.ENCODED);
org.apache.axis.client.Call _call = createCall();
_call.setOperation(operation);
@@ -183,8 +183,8 @@
operation.setReturnType(new QName("urn:rpcParams.wsdl.test", "EchoStruct"));
operation.setReturnClass(EchoStruct.class);
operation.setReturnQName(new QName("", "echoReturn"));
- operation.setStyle(org.apache.axis.enum.Style.RPC);
- operation.setUse(org.apache.axis.enum.Use.ENCODED);
+ operation.setStyle(org.apache.axis.constants.Style.RPC);
+ operation.setUse(org.apache.axis.constants.Use.ENCODED);
org.apache.axis.client.Call _call = createCall();
_call.setOperation(operation);
1.13 +4 -85 ws-axis/java/src/org/apache/axis/enum/Scope.java
Index: Scope.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/enum/Scope.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Scope.java 16 Jan 2005 23:38:05 -0000 1.12
+++ Scope.java 8 Feb 2005 18:44:37 -0000 1.13
@@ -16,91 +16,10 @@
package org.apache.axis.enum;
-
-
-
/**
- * @author rsitze
+ * Simple wrapper around org.apache.axis.constants.Scope
+ * @author dims@yahoo.com
+ * @deprecated please use org.apache.axis.constants.Scope
*/
-public class Scope extends Enum {
- private static final Type type = new Type();
-
- public static final String REQUEST_STR = "Request";
- public static final String APPLICATION_STR = "Application";
- public static final String SESSION_STR = "Session";
- public static final String FACTORY_STR = "Factory";
-
- public static final Scope REQUEST = type.getScope(REQUEST_STR);
- public static final Scope APPLICATION = type.getScope(APPLICATION_STR);
- public static final Scope SESSION = type.getScope(SESSION_STR);
- public static final Scope FACTORY = type.getScope(FACTORY_STR);
-
- public static final Scope DEFAULT = REQUEST;
-
- static { type.setDefault(DEFAULT); }
-
- // public int getValue();
- // public String getName();
- // public Type getType();
-
- public static Scope getDefault() { return (Scope)type.getDefault(); }
-
- public static final Scope getScope(int scope) {
- return type.getScope(scope);
- }
-
- public static final Scope getScope(String scope) {
- return type.getScope(scope);
- }
-
- public static final Scope getScope(String scope, Scope dephault) {
- return type.getScope(scope, dephault);
- }
-
- public static final boolean isValid(String scope) {
- return type.isValid(scope);
- }
-
- public static final int size() {
- return type.size();
- }
-
- public static final String[] getScopes() {
- return type.getEnumNames();
- }
-
- private Object readResolve() throws java.io.ObjectStreamException {
- return type.getScope(value);
- }
- public static class Type extends Enum.Type {
- private Type() {
- super("scope", new Enum[] {
- new Scope(0, REQUEST_STR),
- new Scope(1, APPLICATION_STR),
- new Scope(2, SESSION_STR),
- new Scope(3, FACTORY_STR)
- });
- }
-
- public final Scope getScope(int scope) {
- return (Scope)this.getEnum(scope);
- }
-
- public final Scope getScope(String scope) {
- return (Scope)this.getEnum(scope);
- }
-
- public final Scope getScope(String scope, Scope dephault) {
- return (Scope)this.getEnum(scope, dephault);
- }
-
- }
-
- private Scope(int value, String name) {
- super(type, value, name);
- }
-
- protected Scope() {
- super(type, DEFAULT.getValue(), DEFAULT.getName());
- }
+public class Scope extends org.apache.axis.constants.Scope {
}
1.13 +4 -146 ws-axis/java/src/org/apache/axis/enum/Style.java
Index: Style.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/enum/Style.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Style.java 16 Jan 2005 23:38:05 -0000 1.12
+++ Style.java 8 Feb 2005 18:44:37 -0000 1.13
@@ -20,152 +20,10 @@
import javax.xml.namespace.QName;
-
/**
- * Description of the different styles
- * <br>
- * <b>style=rpc, use=encoded</b><br>
- * First element of the SOAP body is the
- * operation. The operation contains
- * elements describing the parameters, which
- * are serialized as encoded (possibly multi-ref)
- * <pre>
- * <soap:body>
- * <operation>
- * <arg1>...</arg1>
- * <arg2>...</arg2>
- * </operation>
- * </pre>
- * <br>
- * <b>style=RPC, use=literal</b><br>
- * First element of the SOAP body is the
- * operation. The operation contains elements
- * describing the parameters, which are serialized
- * as encoded (no multi-ref)\
- * <pre>
- * <soap:body>
- * <operation>
- * <arg1>...</arg1>
- * <arg2>...</arg2>
- * </operation>
- * </pre>
- * <br>
- * <b>style=document, use=literal</b><br>
- * Elements of the SOAP body are the names of the parameters
- * (there is no wrapper operation...no multi-ref)
- * <pre>
- * <soap:body>
- * <arg1>...</arg1>
- * <arg2>...</arg2>
- * </pre>
- * <br>
- * <b>style=wrapped</b><br>
- * Special case of DOCLIT where there is only one parameter
- * and it has the same qname as the operation. In
- * such cases, there is no actual type with the name...the
- * elements are treated as parameters to the operation
- * <pre>
- * <soap:body>
- * <one-arg-same-name-as-operation>
- * <elemofarg1>...</elemofarg1>
- * <elemofarg2>...</elemofarg2>
- * </pre>
- * <br>
- * <b>style=document, use=encoded</b><br>
- * There is not an enclosing operation name element, but
- * the parmeterss are encoded using SOAP encoding
- * This mode is not (well?) supported by Axis.
- *
- * @author Richard Sitze
+ * Simple wrapper around org.apache.axis.constants.Style
+ * @author dims@yahoo.com
+ * @deprecated please use org.apache.axis.constants.Scope
*/
-public class Style extends Enum {
-
- private static final Type type = new Type();
-
- public static final String RPC_STR = "rpc";
- public static final String DOCUMENT_STR = "document";
- public static final String WRAPPED_STR = "wrapped";
- public static final String MESSAGE_STR = "message";
-
-
- public static final Style RPC = type.getStyle(RPC_STR);
- public static final Style DOCUMENT = type.getStyle(DOCUMENT_STR);
- public static final Style WRAPPED = type.getStyle(WRAPPED_STR);
- public static final Style MESSAGE = type.getStyle(MESSAGE_STR);
-
- public static final Style DEFAULT = RPC;
-
- static { type.setDefault(DEFAULT); }
-
-
- private QName provider;
-
- public static Style getDefault() { return (Style)type.getDefault(); }
-
- public final QName getProvider() { return provider; }
-
- public static final Style getStyle(int style) {
- return type.getStyle(style);
- }
-
- public static final Style getStyle(String style) {
- return type.getStyle(style);
- }
-
- public static final Style getStyle(String style, Style dephault) {
- return type.getStyle(style, dephault);
- }
-
- public static final boolean isValid(String style) {
- return type.isValid(style);
- }
-
- public static final int size() {
- return type.size();
- }
-
- public static final String[] getStyles() {
- return type.getEnumNames();
- }
-
- private Object readResolve() throws java.io.ObjectStreamException {
- return type.getStyle(value);
- }
-
- public static class Type extends Enum.Type {
- private Type() {
- super("style", new Enum[] {
- new Style(0, RPC_STR,
- WSDDConstants.QNAME_JAVARPC_PROVIDER),
- new Style(1, DOCUMENT_STR,
- WSDDConstants.QNAME_JAVARPC_PROVIDER),
- new Style(2, WRAPPED_STR,
- WSDDConstants.QNAME_JAVARPC_PROVIDER),
- new Style(3, MESSAGE_STR,
- WSDDConstants.QNAME_JAVAMSG_PROVIDER),
- });
- }
-
- public final Style getStyle(int style) {
- return (Style)this.getEnum(style);
- }
-
- public final Style getStyle(String style) {
- return (Style)this.getEnum(style);
- }
-
- public final Style getStyle(String style, Style dephault) {
- return (Style)this.getEnum(style, dephault);
- }
- }
-
- private Style(int value, String name, QName provider) {
- super(type, value, name);
- this.provider = provider;
- }
-
- protected Style() {
- super(type, DEFAULT.getValue(), DEFAULT.getName());
- this.provider = DEFAULT.getProvider();
- }
+public class Style extends org.apache.axis.constants.Style {
}
1.10 +5 -91 ws-axis/java/src/org/apache/axis/enum/Use.java
Index: Use.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/enum/Use.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Use.java 16 Jan 2005 23:38:05 -0000 1.9
+++ Use.java 8 Feb 2005 18:44:37 -0000 1.10
@@ -16,96 +16,10 @@
package org.apache.axis.enum;
-import org.apache.axis.Constants;
-
-
/**
- * Use enum description
- * @author Richard Scheuerle
+ * Simple wrapper around org.apache.axis.constants.Use
+ * @author dims@yahoo.com
+ * @deprecated please use org.apache.axis.constants.Scope
*/
-public class Use extends Enum {
-
- /**
- * See Style.java for a description of the combination
- * of style and use.
- */
-
- private static final Type type = new Type();
-
- public static final String ENCODED_STR = "encoded";
- public static final String LITERAL_STR = "literal";
-
- public static final Use ENCODED = type.getUse(ENCODED_STR);
- public static final Use LITERAL = type.getUse(LITERAL_STR);
-
- public static final Use DEFAULT = ENCODED;
-
- static { type.setDefault(DEFAULT); }
- private String encoding;
-
- public static Use getDefault() { return (Use)type.getDefault(); }
-
- public final String getEncoding() { return encoding; }
-
- public static final Use getUse(int style) {
- return type.getUse(style);
- }
-
- public static final Use getUse(String style) {
- return type.getUse(style);
- }
-
- public static final Use getUse(String style, Use dephault) {
- return type.getUse(style, dephault);
- }
-
- public static final boolean isValid(String style) {
- return type.isValid(style);
- }
-
- public static final int size() {
- return type.size();
- }
-
- public static final String[] getUses() {
- return type.getEnumNames();
- }
-
- private Object readResolve() throws java.io.ObjectStreamException {
- return type.getUse(value);
- }
-
- public static class Type extends Enum.Type {
- private Type() {
- super("style", new Enum[] {
- new Use(0, ENCODED_STR,
- Constants.URI_DEFAULT_SOAP_ENC),
- new Use(1, LITERAL_STR,
- Constants.URI_LITERAL_ENC),
- });
- }
-
- public final Use getUse(int style) {
- return (Use)this.getEnum(style);
- }
-
- public final Use getUse(String style) {
- return (Use)this.getEnum(style);
- }
-
- public final Use getUse(String style, Use dephault) {
- return (Use)this.getEnum(style, dephault);
- }
-
- }
-
- private Use(int value, String name, String encoding) {
- super(type, value, name);
- this.encoding = encoding;
- }
-
- protected Use() {
- super(type, DEFAULT.getValue(), DEFAULT.getName());
- this.encoding = DEFAULT.getEncoding();
- }
-}
+public class Use extends org.apache.axis.constants.Use {
+};
1.102 +1 -1 ws-axis/java/src/org/apache/axis/encoding/SerializationContext.java
Index: SerializationContext.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/SerializationContext.java,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -r1.101 -r1.102
--- SerializationContext.java 3 Feb 2005 03:24:36 -0000 1.101
+++ SerializationContext.java 8 Feb 2005 18:44:37 -0000 1.102
@@ -44,7 +44,7 @@
import org.apache.axis.description.OperationDesc;
import org.apache.axis.description.TypeDesc;
import org.apache.axis.encoding.ser.BaseSerializerFactory;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Use;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.schema.SchemaVersion;
import org.apache.axis.soap.SOAPConstants;
1.124 +2 -2 ws-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java
Index: SOAPService.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- SOAPService.java 19 Jan 2005 21:04:22 -0000 1.123
+++ SOAPService.java 8 Feb 2005 18:44:37 -0000 1.124
@@ -29,8 +29,8 @@
import org.apache.axis.description.ServiceDesc;
import org.apache.axis.encoding.TypeMappingRegistry;
import org.apache.axis.encoding.TypeMapping;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import org.apache.axis.handlers.HandlerChainImpl;
import org.apache.axis.handlers.HandlerInfoChainFactory;
import org.apache.axis.message.SOAPEnvelope;
1.3 +1 -1 ws-axis/java/src/org/apache/axis/client/async/Status.java
Index: Status.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/client/async/Status.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Status.java 25 Feb 2004 14:02:31 -0000 1.2
+++ Status.java 8 Feb 2005 18:44:38 -0000 1.3
@@ -15,7 +15,7 @@
*/
package org.apache.axis.client.async;
-import org.apache.axis.enum.Enum;
+import org.apache.axis.constants.Enum;
/**
* Status of the async request
1.2 +1 -1 ws-axis/java/test/faults/TestBeans.java
Index: TestBeans.java
===================================================================
RCS file: /home/cvs/ws-axis/java/test/faults/TestBeans.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestBeans.java 5 Feb 2005 00:14:32 -0000 1.1
+++ TestBeans.java 8 Feb 2005 18:44:38 -0000 1.2
@@ -20,7 +20,7 @@
import org.apache.axis.encoding.TypeMapping;
import org.apache.axis.encoding.ser.BeanDeserializerFactory;
import org.apache.axis.encoding.ser.BeanSerializerFactory;
-import org.apache.axis.enum.Style;
+import org.apache.axis.constants.Style;
import org.apache.axis.Constants;
import org.apache.axis.AxisFault;
import test.GenericLocalTest;
1.2 +2 -2 ws-axis/java/test/holders/TestBook.java
Index: TestBook.java
===================================================================
RCS file: /home/cvs/ws-axis/java/test/holders/TestBook.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestBook.java 5 Feb 2005 21:14:00 -0000 1.1
+++ TestBook.java 8 Feb 2005 18:44:38 -0000 1.2
@@ -19,8 +19,8 @@
import org.apache.axis.encoding.TypeMapping;
import org.apache.axis.encoding.ser.BeanDeserializerFactory;
import org.apache.axis.encoding.ser.BeanSerializerFactory;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import test.GenericLocalTest;
import javax.xml.namespace.QName;
1.5 +1 -1 ws-axis/java/test/encoding/TestGlobalTypeMappings.java
Index: TestGlobalTypeMappings.java
===================================================================
RCS file: /home/cvs/ws-axis/java/test/encoding/TestGlobalTypeMappings.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TestGlobalTypeMappings.java 25 Feb 2004 14:02:54 -0000 1.4
+++ TestGlobalTypeMappings.java 8 Feb 2005 18:44:38 -0000 1.5
@@ -20,7 +20,7 @@
import org.apache.axis.encoding.TypeMapping;
import org.apache.axis.encoding.ser.BeanDeserializerFactory;
import org.apache.axis.encoding.ser.BeanSerializerFactory;
-import org.apache.axis.enum.Style;
+import org.apache.axis.constants.Style;
import test.GenericLocalTest;
import javax.xml.namespace.QName;
1.7 +1 -1 ws-axis/java/test/MSGDispatch/TestMessageService.java
Index: TestMessageService.java
===================================================================
RCS file: /home/cvs/ws-axis/java/test/MSGDispatch/TestMessageService.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TestMessageService.java 25 Feb 2004 14:02:53 -0000 1.6
+++ TestMessageService.java 8 Feb 2005 18:44:38 -0000 1.7
@@ -21,7 +21,7 @@
import org.apache.axis.client.Service;
import org.apache.axis.configuration.SimpleProvider;
import org.apache.axis.configuration.BasicServerConfig;
-import org.apache.axis.enum.Style;
+import org.apache.axis.constants.Style;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.message.SOAPBodyElement;
import org.apache.axis.message.SOAPEnvelope;
1.8 +1 -1 ws-axis/java/test/soap12/TestRPC.java
Index: TestRPC.java
===================================================================
RCS file: /home/cvs/ws-axis/java/test/soap12/TestRPC.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TestRPC.java 19 Jan 2005 21:04:22 -0000 1.7
+++ TestRPC.java 8 Feb 2005 18:44:38 -0000 1.8
@@ -4,7 +4,7 @@
import org.apache.axis.AxisFault;
import org.apache.axis.Message;
import org.apache.axis.MessageContext;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Use;
import org.apache.axis.configuration.SimpleProvider;
import org.apache.axis.description.ServiceDesc;
import org.apache.axis.handlers.soap.SOAPService;
1.12 +2 -2 ws-axis/java/test/wsdl/soap12/additional/WhiteMesaSoap12AddTestSvcTestCase.java
Index: WhiteMesaSoap12AddTestSvcTestCase.java
===================================================================
RCS file: /home/cvs/ws-axis/java/test/wsdl/soap12/additional/WhiteMesaSoap12AddTestSvcTestCase.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- WhiteMesaSoap12AddTestSvcTestCase.java 13 Dec 2003 20:43:02 -0000 1.11
+++ WhiteMesaSoap12AddTestSvcTestCase.java 8 Feb 2005 18:44:38 -0000 1.12
@@ -13,8 +13,8 @@
import org.apache.axis.client.Call;
import org.apache.axis.encoding.ser.BeanDeserializerFactory;
import org.apache.axis.encoding.ser.BeanSerializerFactory;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import org.apache.axis.message.*;
import org.apache.axis.soap.SOAP12Constants;
import org.apache.axis.soap.SOAPConstants;
1.6 +1 -1 ws-axis/java/test/wsdl/soap12/assertion/WhiteMesaSoap12TestSvcTestCase.java
Index: WhiteMesaSoap12TestSvcTestCase.java
===================================================================
RCS file: /home/cvs/ws-axis/java/test/wsdl/soap12/assertion/WhiteMesaSoap12TestSvcTestCase.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- WhiteMesaSoap12TestSvcTestCase.java 13 Dec 2003 20:43:02 -0000 1.5
+++ WhiteMesaSoap12TestSvcTestCase.java 8 Feb 2005 18:44:38 -0000 1.6
@@ -13,7 +13,7 @@
import org.apache.axis.MessageContext;
import org.apache.axis.AxisFault;
import org.apache.axis.soap.SOAPConstants;
-import org.apache.axis.enum.Style;
+import org.apache.axis.constants.Style;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
1.109 +2 -2 ws-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java
Index: WSDDService.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- WSDDService.java 20 Jan 2005 14:18:06 -0000 1.108
+++ WSDDService.java 8 Feb 2005 18:44:38 -0000 1.109
@@ -38,8 +38,8 @@
import org.apache.axis.encoding.TypeMappingRegistryImpl;
import org.apache.axis.encoding.ser.BaseDeserializerFactory;
import org.apache.axis.encoding.ser.BaseSerializerFactory;
-import org.apache.axis.enum.Style;
-import org.apache.axis.enum.Use;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
import org.apache.axis.handlers.HandlerInfoChainFactory;
import org.apache.axis.handlers.soap.SOAPService;
import org.apache.axis.providers.java.JavaProvider;
1.55 +1 -1 ws-axis/java/src/org/apache/axis/wsdl/WSDL2Java.java
Index: WSDL2Java.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/WSDL2Java.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- WSDL2Java.java 18 Jan 2005 03:38:03 -0000 1.54
+++ WSDL2Java.java 8 Feb 2005 18:44:38 -0000 1.55
@@ -15,7 +15,7 @@
*/
package org.apache.axis.wsdl;
-import org.apache.axis.enum.Scope;
+import org.apache.axis.constants.Scope;
import org.apache.axis.utils.CLOption;
import org.apache.axis.utils.CLOptionDescriptor;
import org.apache.axis.utils.ClassUtils;
1.28 +1 -1 ws-axis/java/tools/org/apache/axis/tools/ant/wsdl/Wsdl2javaAntTask.java
Index: Wsdl2javaAntTask.java
===================================================================
RCS file: /home/cvs/ws-axis/java/tools/org/apache/axis/tools/ant/wsdl/Wsdl2javaAntTask.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- Wsdl2javaAntTask.java 29 Jan 2005 03:00:54 -0000 1.27
+++ Wsdl2javaAntTask.java 8 Feb 2005 18:44:38 -0000 1.28
@@ -22,7 +22,7 @@
import java.util.HashMap;
import java.util.List;
-import org.apache.axis.enum.Scope;
+import org.apache.axis.constants.Scope;
import org.apache.axis.utils.DefaultAuthenticator;
import org.apache.axis.utils.ClassUtils;
import org.apache.axis.wsdl.toJava.Emitter;