butek 02/03/27 12:24:06 Modified: java TODO.txt java/src/javax/xml/rpc JAXRPCException.java ParameterMode.java ServiceException.java java/src/javax/xml/rpc/encoding TypeMapping.java TypeMappingRegistry.java java/src/org/apache/axis/client Call.java java/src/org/apache/axis/encoding TypeMappingRegistryImpl.java Log: Updated TypeMapping and TypeMappingRegistry interfaces (still have to make sure our implementation is updated with these). Since we voted to just get rid of old stuff, rather than keep them around and deprecating them, I've also removed a few of the deprecation leftovers I already added. Revision Changes Path 1.32 +1 -3 xml-axis/java/TODO.txt Index: TODO.txt =================================================================== RCS file: /home/cvs/xml-axis/java/TODO.txt,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- TODO.txt 27 Mar 2002 18:36:47 -0000 1.31 +++ TODO.txt 27 Mar 2002 20:24:06 -0000 1.32 @@ -21,9 +21,7 @@ ! <> Implement generated Services' getCalls() method. ! <> Implement Service.getHandlerRegistry() method. ! <> Implement ServiceFactory.createService methods. -! <> Remove standard property constants from org.apache.axis.client.Call after beta2. -! <> Remove ParameterMode.PARAM_MODE_* constants after beta2. -! <> Remove ServiceException/JAXRPCException getCause methods after beta2. +! <> Implement TypeMapping and TypeMappingRegistry ala JAX-RPC 0.8 SOAP 1.2 SUPPORT ---------------- 1.9 +0 -7 xml-axis/java/src/javax/xml/rpc/JAXRPCException.java Index: JAXRPCException.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/javax/xml/rpc/JAXRPCException.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- JAXRPCException.java 27 Mar 2002 18:36:47 -0000 1.8 +++ JAXRPCException.java 27 Mar 2002 20:24:06 -0000 1.9 @@ -107,13 +107,6 @@ public Throwable getLinkedCause() { return cause; } - - /** - * @deprecated Use getLinkedCause instead. - */ - public Throwable getCause() { - return cause; - } } 1.3 +0 -14 xml-axis/java/src/javax/xml/rpc/ParameterMode.java Index: ParameterMode.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/javax/xml/rpc/ParameterMode.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ParameterMode.java 27 Mar 2002 16:46:56 -0000 1.2 +++ ParameterMode.java 27 Mar 2002 20:24:06 -0000 1.3 @@ -65,20 +65,6 @@ public static final ParameterMode INOUT = new ParameterMode("INOUT"); public static final ParameterMode OUT = new ParameterMode("OUT"); - /** - * @deprecated Use ParameterMode.IN instead. - */ -// public static final ParameterMode PARAM_MODE_IN = IN; - /** - * @deprecated Use ParameterMode.INOUT instead. - */ -// public static final ParameterMode PARAM_MODE_INOUT = INOUT; - /** - * @deprecated Use ParameterMode.OUT instead. - */ -// public static final ParameterMode PARAM_MODE_OUT = OUT; - - private ParameterMode(String mode) { this.mode = mode; } // ctor 1.3 +0 -7 xml-axis/java/src/javax/xml/rpc/ServiceException.java Index: ServiceException.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/javax/xml/rpc/ServiceException.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ServiceException.java 27 Mar 2002 18:36:47 -0000 1.2 +++ ServiceException.java 27 Mar 2002 20:24:06 -0000 1.3 @@ -107,13 +107,6 @@ public Throwable getLinkedCause() { return cause; } - - /** - * @deprecated Use getLinkedCause instead. - */ - public Throwable getCause() { - return cause; - } } 1.9 +8 -27 xml-axis/java/src/javax/xml/rpc/encoding/TypeMapping.java Index: TypeMapping.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/javax/xml/rpc/encoding/TypeMapping.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- TypeMapping.java 1 Feb 2002 22:08:25 -0000 1.8 +++ TypeMapping.java 27 Mar 2002 20:24:06 -0000 1.9 @@ -109,9 +109,8 @@ * * @throws JAXRPCException - If any error during the registration */ - public void register( - Class javaType, QName xmlType, SerializerFactory sf, - DeserializerFactory dsf) throws JAXRPCException; + public void register(Class javaType, QName xmlType, SerializerFactory sf, + DeserializerFactory dsf); /** * Gets the SerializerFactory registered for the specified pair @@ -120,15 +119,9 @@ * @param javaType - Class of the Java type * @param xmlType - Qualified name of the XML data type * - * @return Registered SerializerFactory - * - * @throws JAXRPCException - If there is no registered SerializerFactory - * for this pair of Java type and XML data type - * java.lang.IllegalArgumentException - If invalid or unsupported - * XML/Java type is specified + * @return Registered SerializerFactory or null if there is no registered factory. */ - public SerializerFactory getSerializer(Class javaType, QName xmlType) - throws JAXRPCException; + public SerializerFactory getSerializer(Class javaType, QName xmlType); /** * Gets the DeserializerFactory registered for the specified pair @@ -137,15 +130,9 @@ * @param javaType - Class of the Java type * @param xmlType - Qualified name of the XML data type * - * @return Registered DeserializerFactory - * - * @throws JAXRPCException - If there is no registered DeserializerFactory - * for this pair of Java type and XML data type - * java.lang.IllegalArgumentException - - * If invalid or unsupported XML/Java type is specified + * @return Registered DeserializerFactory or null if there is no registered factory. */ - public DeserializerFactory getDeserializer(Class javaType, QName xmlType) - throws JAXRPCException; + public DeserializerFactory getDeserializer(Class javaType, QName xmlType); /** * Removes the SerializerFactory registered for the specified @@ -156,11 +143,8 @@ * * @throws JAXRPCException - If there is error * in removing the registered SerializerFactory - * java.lang.IllegalArgumentException - - * If invalid or unsupported XML/Java type is specified */ - public void removeSerializer(Class javaType, QName xmlType) - throws JAXRPCException; + public void removeSerializer(Class javaType, QName xmlType); /** * Removes the DeserializerFactory registered for the specified @@ -171,11 +155,8 @@ * * @throws JAXRPCException - If there is error in removing * the registered DeserializerFactory - * java.lang.IllegalArgumentException - - * If invalid or unsupported XML/Java type is specified */ - public void removeDeserializer(Class javaType, QName xmlType) - throws JAXRPCException; + public void removeDeserializer(Class javaType, QName xmlType); } 1.11 +47 -29 xml-axis/java/src/javax/xml/rpc/encoding/TypeMappingRegistry.java Index: TypeMappingRegistry.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/javax/xml/rpc/encoding/TypeMappingRegistry.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- TypeMappingRegistry.java 1 Feb 2002 22:08:25 -0000 1.10 +++ TypeMappingRegistry.java 27 Mar 2002 20:24:06 -0000 1.11 @@ -68,69 +68,87 @@ public interface TypeMappingRegistry extends java.io.Serializable { /** - * The method register adds a TypeMapping instance for a specific - * namespace + * Registers a TypeMapping instance with the TypeMappingRegistry. This + * method replaces any existing registered TypeMapping instance for the + * specified namespaceURI. + * + * @param namespaceURI - An encoding style or XML schema namespace specified + * as an URI. An example is + * "http://schemas.xmlsoap.org/soap/encoding/" + * @param mapping - TypeMapping instance * - * @param namespaceURI - * @param mapping - TypeMapping for specific type namespaces + * @return Previous TypeMapping associated with the specified namespaceURI, + * or null if there was no TypeMapping associated with the specified namespaceURI * * @throws JAXRPCException - If there is any error in the registration * of the TypeMapping for the specified namespace URI - * java.lang.IllegalArgumentException - if an invalid namespace URI is specified */ - public void register(String namespace, TypeMapping maping) - throws JAXRPCException; + public TypeMapping register(String namespace, TypeMapping mapping); /** - * The method register adds a default TypeMapping instance. If a specific - * TypeMapping is not found, the default TypeMapping is used. + * Registers the TypeMapping instance that is default for all encoding + * styles and XML schema namespaces supported by the TypeMappingRegistry. A + * default TypeMapping should include serializers and deserializers that are + * independent of and usable with any encoding style or XML namespaces. The + * successive invocations of the registerDefault method replace any existing + * default TypeMapping instance. + * <p> + * If the default TypeMapping is registered, any other TypeMapping instances + * registered through the TypeMappingRegistry.register method (for a set of + * namespace URIs) override the default TypeMapping. * - * @param mapping - TypeMapping for specific type namespaces + * @param mapping - TypeMapping instance * * @throws JAXRPCException - If there is any error in the registration * of the TypeMapping for the specified namespace URI - * java.lang.IllegalArgumentException - if an invalid namespace URI is specified */ - public void registerDefault(TypeMapping mapping) - throws JAXRPCException; + public void registerDefault(TypeMapping mapping); /** - * Return the default TypeMapping + * Return the registered default TypeMapping instance * @return TypeMapping or null **/ - public javax.xml.rpc.encoding.TypeMapping getDefaultTypeMapping(); + public TypeMapping getDefaultTypeMapping(); /** - * Gets the TypeMapping namespace. If not found, the default TypeMapping - * is returned. + * Returns the registered TypeMapping for the specified namespace URI. If + * there is no registered TypeMapping for the specified namespaceURI, this + * method returns null. * - * @param namespaceURI - The namespace URI - * @return The registered TypeMapping (which may be the default TypeMapping) or null. + * @param namespaceURI - Encoding style or XML schema namespace specified + * as an URI + * @return TypeMapping for the specified namespace URI or null */ public TypeMapping getTypeMapping(String namespaceURI); /** - * Unregisters the TypeMapping for the namespace. + * Unregisters a TypeMapping instance, if present, from the specified + * namespaceURI. * - * @param namespaceURI - The namespace URI + * @param namespaceURI - Encoding style or XML schema namespace specified + * as an URI * @return The registered TypeMapping or null. */ public TypeMapping unregisterTypeMapping(String namespaceURI); /** - * Remove TypeMapping by unregistering it from all namespaces. + * Removes a TypeMapping from the TypeMappingRegistry. A TypeMapping is + * associated with 1 or more namespaceURIs. This method unregisters the + * specified TypeMapping instance from all associated namespaceURIs and then + * removes this TypeMapping instance from the registry. * - * @param mapping - The mapping to remove - * @return true if found and removed. false if not found + * @param mapping - TypeMapping to remove + * @return true if specified TypeMapping is removed from the TypeMappingRegistry; + * false if the specified TypeMapping was not in the TypeMappingRegistry */ - public boolean removeTypeMapping(TypeMapping namespaceURI); + public boolean removeTypeMapping(TypeMapping mapping); /** - * Creates a new empty TypeMapping object for the specified encoding style or XML schema namespace. + * Creates a new empty TypeMapping object. * - * @return An empty generic TypeMapping object + * @return TypeMapping instance. */ public TypeMapping createTypeMapping(); @@ -143,9 +161,9 @@ /** - * Removes all registered TypeMappings from the registery + * Removes all TypeMappings and namespaceURIs from this TypeMappingRegistry. */ - public void clear(String namespaceURI); + public void clear(); } 1.111 +1 -39 xml-axis/java/src/org/apache/axis/client/Call.java Index: Call.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Call.java,v retrieving revision 1.110 retrieving revision 1.111 diff -u -r1.110 -r1.111 --- Call.java 27 Mar 2002 20:16:25 -0000 1.110 +++ Call.java 27 Mar 2002 20:24:06 -0000 1.111 @@ -122,8 +122,7 @@ * It can be prefilled by a WSDL document (on the constructor to the Service * object) or you can fill in the data yourself. * <pre> - * Standard properties defined by JAX-RPC (NOTE! These have been deprecated - * and will be going away in favor of the javax.xml.rpc.Call constants: + * Standard properties defined by in JAX-RPC's javax..xml.rpc.Call interface: * USERNAME_PROPERTY - User name for authentication * PASSWORD_PROPERTY - Password for authentication * SESSION_PROPERTY - Participate in a session with the endpoint? @@ -187,43 +186,6 @@ public static final String SEND_TYPE_ATTR = "send_type_attr" ; public static final String TRANSPORT_NAME = "transport_name" ; public static final String TRANSPORT_PROPERTY= "java.protocol.handler.pkgs"; - - // Constants for the standard properties - /** - * @deprecated Use javax.xml.rpc.Call.USERNAME_PROPERTY instead. - */ - public static final String USERNAME_PROPERTY = - javax.xml.rpc.Call.USERNAME_PROPERTY; - /** - * @deprecated Use javax.xml.rpc.Call.PASSWORD_PROPERTY instead. - */ - public static final String PASSWORD_PROPERTY = - javax.xml.rpc.Call.PASSWORD_PROPERTY; - /** - * @deprecated Use javax.xml.rpc.Call.SESSION_MAINTAIN_PROPERTY instead. - */ - public static final String SESSION_PROPERTY = - javax.xml.rpc.Call.SESSION_MAINTAIN_PROPERTY; - /** - * @deprecated Use javax.xml.rpc.Call.OPERATION_STYLE_PROPERTY instead. - */ - public static final String OPERATION_STYLE_PROPERTY = - javax.xml.rpc.Call.OPERATION_STYLE_PROPERTY; - /** - * @deprecated Use javax.xml.rpc.Call.SOAPACTION_USE_PROPERTY instead. - */ - public static final String SOAPACTION_USE_PROPERTY = - javax.xml.rpc.Call.SOAPACTION_USE_PROPERTY; - /** - * @deprecated Use javax.xml.rpc.Call.SOAPACTION_URI_PROPERTY instead. - */ - public static final String SOAPACTION_URI_PROPERTY = - javax.xml.rpc.Call.SOAPACTION_URI_PROPERTY; - /** - * @deprecated Use javax.xml.rpc.Call.ENCODINGSTYLE_URI_PROPERTY instead. - */ - public static final String ENCODING_STYLE_PROPERTY = - javax.xml.rpc.Call.ENCODINGSTYLE_URI_PROPERTY; /** * A Hashtable mapping protocols (Strings) to Transports (classes) 1.7 +8 -7 xml-axis/java/src/org/apache/axis/encoding/TypeMappingRegistryImpl.java Index: TypeMappingRegistryImpl.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/TypeMappingRegistryImpl.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- TypeMappingRegistryImpl.java 27 Feb 2002 13:41:27 -0000 1.6 +++ TypeMappingRegistryImpl.java 27 Mar 2002 20:24:06 -0000 1.7 @@ -238,14 +238,14 @@ * @param namespaceURI * @param mapping - TypeMapping for specific namespaces * + * @return Previous TypeMapping associated with the specified namespaceURI, + * or null if there was no TypeMapping associated with the specified namespaceURI + * * @throws JAXRPCException - If there is any error in the registration * of the TypeMapping for the specified namespace URI - * java.lang.IllegalArgumentException - - * if an invalid namespace URI is specified */ - public void register(String namespaceURI, - javax.xml.rpc.encoding.TypeMapping mapping) - throws JAXRPCException { + public javax.xml.rpc.encoding.TypeMapping register(String namespaceURI, + javax.xml.rpc.encoding.TypeMapping mapping) { // namespaceURI = ""; if (mapping == null || !(mapping instanceof TypeMapping)) { @@ -264,6 +264,7 @@ } else { del.setDelegate((TypeMapping) mapping); } + return null; // Needs works } /** @@ -377,9 +378,9 @@ /** - * Removes all registered TypeMappings from the registery + * Removes all TypeMappings and namespaceURIs from this TypeMappingRegistry. */ - public void clear(String namespaceURI) { + public void clear() { mapTM.clear(); }