forgot to add...the changes in this commit were made by Glen :)
-- dims
On 28 Jan 2005 20:11:11 -0000, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> dims 2005/01/28 12:11:11
>
> Modified: java/src/org/apache/axis Constants.java
> java/src/org/apache/axis/encoding
> DefaultJAXRPC11TypeMappingImpl.java
> java/src/org/apache/axis/description JavaServiceDesc.java
> java/src/org/apache/axis/i18n resource.properties
> Log:
> - Fix for overloading methods for WS-I BP compliance.
> - Additional typemapping for jaxrpc11 compliance.
>
> Revision Changes Path
> 1.137 +3 -0 ws-axis/java/src/org/apache/axis/Constants.java
>
> Index: Constants.java
> ===================================================================
> RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/Constants.java,v
> retrieving revision 1.136
> retrieving revision 1.137
> diff -u -r1.136 -r1.137
> --- Constants.java 22 Nov 2004 17:57:07 -0000 1.136
> +++ Constants.java 28 Jan 2005 20:11:11 -0000 1.137
> @@ -98,6 +98,9 @@
> * The size of the buffer size for.
> */
> public static final int HTTP_TXR_BUFFER_SIZE = 8 * 1024;
> +
> + /** Basic Profile 1.1 compatibility flag */
> + public static final String WSIBP11_COMPAT_PROPERTY =
> "axis.ws-i.bp11.compatibility";
>
> /**
> * Returns true if the string is the SOAP_ENV Namespace.
>
> 1.3 +3 -0
> ws-axis/java/src/org/apache/axis/encoding/DefaultJAXRPC11TypeMappingImpl.java
>
> Index: DefaultJAXRPC11TypeMappingImpl.java
> ===================================================================
> RCS file:
> /home/cvs/ws-axis/java/src/org/apache/axis/encoding/DefaultJAXRPC11TypeMappingImpl.java,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -u -r1.2 -r1.3
> --- DefaultJAXRPC11TypeMappingImpl.java 21 Jan 2005 04:01:02 -0000
> 1.2
> +++ DefaultJAXRPC11TypeMappingImpl.java 28 Jan 2005 20:11:11 -0000
> 1.3
> @@ -54,8 +54,11 @@
> private void registerXSDTypes() {
> // Table 4-1 of the JAXRPC 1.1 spec
> myRegisterSimple(Constants.XSD_UNSIGNEDINT, long.class);
> + myRegisterSimple(Constants.XSD_UNSIGNEDINT, Long.class);
> myRegisterSimple(Constants.XSD_UNSIGNEDSHORT, int.class);
> + myRegisterSimple(Constants.XSD_UNSIGNEDSHORT, Integer.class);
> myRegisterSimple(Constants.XSD_UNSIGNEDBYTE, short.class);
> + myRegisterSimple(Constants.XSD_UNSIGNEDBYTE, Short.class);
> myRegister(Constants.XSD_DATETIME, java.util.Calendar.class,
> new DateSerializerFactory(java.util.Calendar.class,
> Constants.XSD_DATE),
>
> 1.20 +19 -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.19
> retrieving revision 1.20
> diff -u -r1.19 -r1.20
> --- JavaServiceDesc.java 19 Jan 2005 21:04:22 -0000 1.19
> +++ JavaServiceDesc.java 28 Jan 2005 20:11:11 -0000 1.20
> @@ -18,6 +18,7 @@
> import org.apache.axis.AxisServiceConfig;
> import org.apache.axis.Constants;
> import org.apache.axis.InternalException;
> +import org.apache.axis.AxisProperties;
> import org.apache.axis.components.logger.LogFactory;
> import org.apache.axis.encoding.*;
> import org.apache.axis.enum.Style;
> @@ -389,6 +390,10 @@
> if (overloads == null) {
> overloads = new ArrayList();
> name2OperationsMap.put(name, overloads);
> + } else if (JavaUtils.isTrue(
> +
> AxisProperties.getProperty(Constants.WSIBP11_COMPAT_PROPERTY)) &&
> + overloads.size() > 0) {
> + throw new
> RuntimeException(Messages.getMessage("noOverloadedOperations", name));
> }
> overloads.add(operation);
> }
> @@ -1173,9 +1178,21 @@
> }
> }
>
> + boolean isWSICompliant = JavaUtils.isTrue(
> +
> AxisProperties.getProperty(Constants.WSIBP11_COMPAT_PROPERTY));
> +
> // Make an OperationDesc, fill in common stuff
> OperationDesc operation = new OperationDesc();
> - operation.setName(method.getName());
> +
> + // If we're WS-I compliant, we can't have overloaded operation
> names.
> + // If we find duplicates, we generate unique names for them and map
> + // those names to the correct Method.
> + String name = method.getName();
> + if (isWSICompliant && name2OperationsMap != null) {
> + Collection methodNames = name2OperationsMap.keySet();
> + name = JavaUtils.getUniqueValue(methodNames, name);
> + }
> + operation.setName(name);
> String defaultNS = "";
> if (namespaceMappings != null && !namespaceMappings.isEmpty()) {
> // If we have a default namespace mapping, require callers to
> @@ -1185,7 +1202,7 @@
> if(defaultNS.length() == 0) {
> defaultNS =
> Namespaces.makeNamespace(method.getDeclaringClass().getName());
> }
> - operation.setElementQName(new QName(defaultNS, method.getName()));
> + operation.setElementQName(new QName(defaultNS, name));
> operation.setMethod(method);
>
> // If this is a MESSAGE style service, set up the OperationDesc
>
> 1.108 +2 -1
> ws-axis/java/src/org/apache/axis/i18n/resource.properties
>
> Index: resource.properties
> ===================================================================
> RCS file:
> /home/cvs/ws-axis/java/src/org/apache/axis/i18n/resource.properties,v
> retrieving revision 1.107
> retrieving revision 1.108
> diff -u -r1.107 -r1.108
> --- resource.properties 19 Jan 2005 21:04:22 -0000 1.107
> +++ resource.properties 28 Jan 2005 20:11:11 -0000 1.108
> @@ -1263,4 +1263,5 @@
> optionJaxrpc=Maps XML Schema types to Java types instead of the custom
> Axis types in org.apache.axis.types, according to JAX-RPC 1.1.
> handlerInfoChainNoClass00=''HandlerInfoChain'' class not found: ''{0}''
>
> -noDefaultTypeMapping00=Default TypeMapping has not been specified
> \ No newline at end of file
> +noDefaultTypeMapping00=Default TypeMapping has not been specified
> +noOverloadedOperations=WS-I Basic Profile disallows overloaded operations.
> Multiple definitions for operation ''{0}''!
>
>
--
Davanum Srinivas - http://webservices.apache.org/~dims/