You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by to...@apache.org on 2005/04/29 18:41:36 UTC
cvs commit: ws-axis/java/src/org/apache/axis/wsdl/fromJava Emitter.java
tomj 2005/04/29 09:41:36
Modified: java/src/org/apache/axis/wsdl/fromJava Emitter.java
Log:
Put back in setDefaultTypeMapping() API to the Emitter since
a) it isn't nice to remove a public API
b) my product is *using* the public API, so it breaks :-)
Make sure it is depricated, but still does something sane.
Also fix a potential problem that the TypeMappingRegistry can be null
in the Emitter and dereferenced. Create a default registry.
Revision Changes Path
1.144 +21 -2 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.143
retrieving revision 1.144
diff -u -r1.143 -r1.144
--- Emitter.java 12 Apr 2005 22:18:15 -0000 1.143
+++ Emitter.java 29 Apr 2005 16:41:36 -0000 1.144
@@ -34,6 +34,7 @@
import org.apache.axis.description.ServiceDesc;
import org.apache.axis.encoding.TypeMapping;
import org.apache.axis.encoding.TypeMappingRegistry;
+import org.apache.axis.encoding.TypeMappingRegistryImpl;
import org.apache.axis.utils.ClassUtils;
import org.apache.axis.utils.JavaUtils;
import org.apache.axis.utils.Messages;
@@ -170,8 +171,8 @@
/** Field tm */
private TypeMapping tm = null; // Registered type mapping
- /** Field defaultTM */
- private TypeMappingRegistry tmr;
+ /** Field tmr */
+ private TypeMappingRegistry tmr = new TypeMappingRegistryImpl();
/** Field namespaces */
private Namespaces namespaces;
@@ -2525,6 +2526,24 @@
}
/**
+ * Returns the <code>defaultTypeMapping</code> used by the service
+ * @return the <code>defaultTypeMapping</code> used by the service
+ * @deprecated Use getTypeMappingRegistry instead
+ */
+ public TypeMapping getDefaultTypeMapping() {
+ return (TypeMapping) tmr.getDefaultTypeMapping();
+ }
+
+ /**
+ * Sets the <code>defaultTypeMapping</code> used by the service
+ * @param tm the <code>defaultTypeMapping</code> used by the service
+ * @deprecated Use setTypeMappingRegistry instead
+ */
+ public void setDefaultTypeMapping(TypeMapping tm) {
+ tmr.registerDefault(tm);
+ }
+
+ /**
* Set the TypeMappingRegistry for this Emitter.
*/
public void setTypeMappingRegistry(TypeMappingRegistry tmr) {