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 Glen Daniels <gl...@thoughtcraft.com> on 2005/01/20 20:15:28 UTC
Re: cvs commit: ws-axis/java/src/org/apache/axis/deployment/wsdd
WSDDService.java
Hi dims:
I am pretty uncomfortable with this. First off, "typemappingVersion=1.3"
doesn't really mean anything, whereas "jaxrpc11Compliance" is pretty clear
as to what's intended. Second, is it really true that the ONLY thing that
we will need to do for JAX-RPC compliance is affect the typemapping?
I'd still greatly prefer the "JAX-RPC mode" flag, settable via command line
options on the tools and also via WSDD for the engines.
Sorry I haven't had time to look into these latest changes more deeply - we
have another full day of WSDL meetings today in Melbourne, and I've got a
lunch meeting too, but I'll try to start looking into this on the plane to
Sydney tonight.
--Glen
----- Original Message -----
From: <di...@apache.org>
To: <ws...@apache.org>
Sent: Friday, January 21, 2005 1:18 AM
Subject: cvs commit: ws-axis/java/src/org/apache/axis/deployment/wsdd
WSDDService.java
> dims 2005/01/20 06:18:06
>
> Modified: java/src/org/apache/axis AxisEngine.java
> java/src/org/apache/axis/encoding
> DefaultTypeMappingImpl.java
> TypeMappingRegistryImpl.java
> java/src/org/apache/axis/wsdl/toJava Emitter.java
> JavaDeployWriter.java JavaServiceImplWriter.java
> java/src/org/apache/axis/wsdl Java2WSDL.java
> java/src/org/apache/axis/client Service.java
> java/src/org/apache/axis/deployment/wsdd WSDDService.java
> Log:
> - Eliminate the axis.jaxrpc11Compliance flag
> - Support typeMappingVersion setting per service
> - At codegen time, add more information in deploy.wsdd and Locator for
> setting typemappingversion
>
> Notes:
> - Glen/Tom, PLEASE review the code.
> - Still check/need to fix wrong xsi:types at runtime for JAXRPC11
> - Need to run TCK.
>
> Revision Changes Path
> 1.118 +0 -13 ws-axis/java/src/org/apache/axis/AxisEngine.java
>
> Index: AxisEngine.java
> ===================================================================
> RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/AxisEngine.java,v
> retrieving revision 1.117
> retrieving revision 1.118
> diff -u -r1.117 -r1.118
> --- AxisEngine.java 10 Jan 2005 19:02:30 -0000 1.117
> +++ AxisEngine.java 20 Jan 2005 14:18:05 -0000 1.118
> @@ -120,19 +120,6 @@
> */
> private ArrayList actorURIs = new ArrayList();
>
> - /** Are we in JAX-RPC 1.1 compatibility mode? */
> - public static boolean jaxrpc11Compliance = false;
> - static {
> - try {
> - // We check a system property, but we can use use switches
> - // to control this in WSDL2Java and at runtime.
> - jaxrpc11Compliance =
> - System.getProperty("axis.jaxrpc11Compliance",
> "false")
> - .equalsIgnoreCase("true");
> - } catch (Throwable t) {
> - }
> - }
> -
> /**
> * Thread local storage used for locating the active message
> context.
> * This information is only valid for the lifetime of this request.
>
>
>
> 1.86 +3 -8
> ws-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java
>
> Index: DefaultTypeMappingImpl.java
> ===================================================================
> RCS file:
> /home/cvs/ws-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java,v
> retrieving revision 1.85
> retrieving revision 1.86
> diff -u -r1.85 -r1.86
> --- DefaultTypeMappingImpl.java 18 Jan 2005 03:38:02 -0000 1.85
> +++ DefaultTypeMappingImpl.java 20 Jan 2005 14:18:05 -0000 1.86
> @@ -17,7 +17,6 @@
> package org.apache.axis.encoding;
>
> import org.apache.axis.Constants;
> -import org.apache.axis.AxisEngine;
> import org.apache.axis.attachments.OctetStream;
> import org.apache.axis.encoding.ser.ArrayDeserializerFactory;
> import org.apache.axis.encoding.ser.ArraySerializerFactory;
> @@ -27,6 +26,8 @@
> import org.apache.axis.encoding.ser.BeanSerializerFactory;
> import org.apache.axis.encoding.ser.DateDeserializerFactory;
> import org.apache.axis.encoding.ser.DateSerializerFactory;
> +import org.apache.axis.encoding.ser.DocumentDeserializerFactory;
> +import org.apache.axis.encoding.ser.DocumentSerializerFactory;
> import org.apache.axis.encoding.ser.ElementDeserializerFactory;
> import org.apache.axis.encoding.ser.ElementSerializerFactory;
> import org.apache.axis.encoding.ser.HexDeserializerFactory;
> @@ -41,8 +42,6 @@
> import org.apache.axis.encoding.ser.SimpleSerializerFactory;
> import org.apache.axis.encoding.ser.VectorDeserializerFactory;
> import org.apache.axis.encoding.ser.VectorSerializerFactory;
> -import org.apache.axis.encoding.ser.DocumentDeserializerFactory;
> -import org.apache.axis.encoding.ser.DocumentSerializerFactory;
> import org.apache.axis.schema.SchemaVersion;
> import org.apache.axis.types.HexBinary;
> import org.apache.axis.utils.JavaUtils;
> @@ -82,11 +81,7 @@
> */
> public static synchronized TypeMapping getSingleton() {
> if (tm == null) {
> - if(AxisEngine.jaxrpc11Compliance) {
> - tm = new DefaultJAXRPC11TypeMappingImpl();
> - } else {
> - tm = new DefaultTypeMappingImpl();
> - }
> + tm = new DefaultTypeMappingImpl();
> }
> return tm;
> }
>
>
>
> 1.27 +9 -1
> ws-axis/java/src/org/apache/axis/encoding/TypeMappingRegistryImpl.java
>
> Index: TypeMappingRegistryImpl.java
> ===================================================================
> RCS file:
> /home/cvs/ws-axis/java/src/org/apache/axis/encoding/TypeMappingRegistryImpl.java,v
> retrieving revision 1.26
> retrieving revision 1.27
> diff -u -r1.26 -r1.27
> --- TypeMappingRegistryImpl.java 25 Feb 2004 14:02:36 -0000 1.26
> +++ TypeMappingRegistryImpl.java 20 Jan 2005 14:18:05 -0000 1.27
> @@ -130,7 +130,15 @@
> private HashMap mapTM; // Type Mappings keyed with
> Namespace URI
> private TypeMapping defaultDelTM; // Delegate to default Type
> Mapping
>
> -
> + /**
> + * Construct TypeMappingRegistry
> + * @param tm
> + */
> + public TypeMappingRegistryImpl(TypeMapping tm) {
> + mapTM = new HashMap();
> + defaultDelTM = tm;
> + register(Constants.URI_SOAP11_ENC, new
> DefaultSOAPEncodingTypeMappingImpl());
> + }
>
> /**
> * Construct TypeMappingRegistry
>
>
>
> 1.78 +10 -3
> 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.77
> retrieving revision 1.78
> diff -u -r1.77 -r1.78
> --- Emitter.java 18 Jan 2005 03:38:03 -0000 1.77
> +++ Emitter.java 20 Jan 2005 14:18:05 -0000 1.78
> @@ -15,12 +15,11 @@
> */
> package org.apache.axis.wsdl.toJava;
>
> +import org.apache.axis.encoding.DefaultJAXRPC11TypeMappingImpl;
> import org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl;
> -import org.apache.axis.encoding.TypeMapping;
> import org.apache.axis.encoding.DefaultTypeMappingImpl;
> -import org.apache.axis.encoding.DefaultJAXRPC11TypeMappingImpl;
> +import org.apache.axis.encoding.TypeMapping;
> import org.apache.axis.enum.Scope;
> -import org.apache.axis.enum.Use;
> import org.apache.axis.i18n.Messages;
> import org.apache.axis.utils.ClassUtils;
> import org.apache.axis.utils.JavaUtils;
> @@ -749,6 +748,13 @@
> } // getNStoPkgFromPropsFile
>
> /**
> + * Get the typemapping version
> + */
> + public String getTypeMappingVersion() {
> + return typeMappingVersion;
> + }
> +
> + /**
> * Method setTypeMappingVersion
> *
> * @param typeMappingVersion
> @@ -766,6 +772,7 @@
> } else {
> throw new
> RuntimeException(org.apache.axis.utils.Messages.getMessage("j2wBadTypeMapping00"));
> }
> + this.typeMappingVersion = typeMappingVersion;
> setDefaultTypeMapping(defaultTM);
> }
> baseTypeMapping = new BaseTypeMapping() {
>
>
>
> 1.87 +10 -2
> 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.86
> retrieving revision 1.87
> diff -u -r1.86 -r1.87
> --- JavaDeployWriter.java 6 Jul 2004 23:19:40 -0000 1.86
> +++ JavaDeployWriter.java 20 Jan 2005 14:18:05 -0000 1.87
> @@ -47,11 +47,11 @@
> import java.io.PrintWriter;
> import java.util.ArrayList;
> import java.util.Collection;
> +import java.util.HashMap;
> import java.util.HashSet;
> import java.util.Iterator;
> import java.util.Map;
> import java.util.Vector;
> -import java.util.HashMap;
>
> /**
> * This is Wsdl2java's deploy Writer. It writes the deploy.wsdd file.
> @@ -64,6 +64,9 @@
> /** Field symbolTable */
> protected SymbolTable symbolTable;
>
> + /** Field emitter */
> + protected Emitter emitter;
> +
> /**
> * Constructor.
> *
> @@ -75,7 +78,8 @@
> SymbolTable symbolTable) {
>
> super(emitter, "deploy");
> -
> +
> + this.emitter = emitter;
> this.definition = definition;
> this.symbolTable = symbolTable;
> } // ctor
> @@ -400,6 +404,10 @@
>
> pw.println(" <parameter name=\"className\" value=\"" +
> className
> + "\"/>");
> +
> + pw.println(" <parameter name=\"typeMappingVersion\"
> value=\""
> + + emitter.getTypeMappingVersion() + "\"/>");
> +
> pw.println(" <parameter name=\"wsdlPortType\" value=\""
> + binding.getPortType().getQName().getLocalPart() +
> "\"/>");
>
>
>
>
> 1.43 +3 -2
> ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java
>
> Index: JavaServiceImplWriter.java
> ===================================================================
> RCS file:
> /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java,v
> retrieving revision 1.42
> retrieving revision 1.43
> diff -u -r1.42 -r1.43
> --- JavaServiceImplWriter.java 21 Dec 2004 20:17:01 -0000 1.42
> +++ JavaServiceImplWriter.java 20 Jan 2005 14:18:05 -0000 1.43
> @@ -27,8 +27,6 @@
> import javax.wsdl.Port;
> import javax.wsdl.Service;
> import javax.xml.namespace.QName;
> -import javax.xml.rpc.ServiceException;
> -
> import java.io.IOException;
> import java.io.PrintWriter;
> import java.net.MalformedURLException;
> @@ -278,6 +276,7 @@
> pw.println();
> pw.println(" public " +
> Utils.getJavaLocalName(sEntry.getName())
> + "Locator() {");
> + pw.println(" setTypeMappingVersion(\"" +
> emitter.getTypeMappingVersion() + "\");");
> pw.println(" }");
> pw.println();
>
> @@ -286,6 +285,7 @@
> pw.println(" public " +
> Utils.getJavaLocalName(sEntry.getName())
> + "Locator(org.apache.axis.EngineConfiguration config)
> {");
> pw.println(" super(config);");
> + pw.println(" setTypeMappingVersion(\"" +
> emitter.getTypeMappingVersion() + "\");");
> pw.println(" }");
>
> //Write a constructor that accepts String wsdl location +
> Service QName
> @@ -294,6 +294,7 @@
> + "Locator(java.lang.String wsdlLoc,
> javax.xml.namespace.QName sName) "
> + "throws " +
> javax.xml.rpc.ServiceException.class.getName() + " {");
> pw.println(" super(wsdlLoc, sName);");
> + pw.println(" setTypeMappingVersion(\"" +
> emitter.getTypeMappingVersion() + "\");");
> pw.println(" }");
> }
>
>
>
>
> 1.47 +0 -3 ws-axis/java/src/org/apache/axis/wsdl/Java2WSDL.java
>
> Index: Java2WSDL.java
> ===================================================================
> RCS file:
> /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/Java2WSDL.java,v
> retrieving revision 1.46
> retrieving revision 1.47
> diff -u -r1.46 -r1.47
> --- Java2WSDL.java 18 Jan 2005 03:38:03 -0000 1.46
> +++ Java2WSDL.java 20 Jan 2005 14:18:05 -0000 1.47
> @@ -15,9 +15,6 @@
> */
> package org.apache.axis.wsdl;
>
> -import org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl;
> -import org.apache.axis.encoding.DefaultTypeMappingImpl;
> -import org.apache.axis.encoding.DefaultJAXRPC11TypeMappingImpl;
> import org.apache.axis.utils.CLArgsParser;
> import org.apache.axis.utils.CLOption;
> import org.apache.axis.utils.CLOptionDescriptor;
>
>
>
> 1.102 +48 -26 ws-axis/java/src/org/apache/axis/client/Service.java
>
> Index: Service.java
> ===================================================================
> RCS file:
> /home/cvs/ws-axis/java/src/org/apache/axis/client/Service.java,v
> retrieving revision 1.101
> retrieving revision 1.102
> diff -u -r1.101 -r1.102
> --- Service.java 24 Nov 2004 17:09:29 -0000 1.101
> +++ Service.java 20 Jan 2005 14:18:06 -0000 1.102
> @@ -16,19 +16,21 @@
>
> package org.apache.axis.client;
>
> -import java.io.InputStream;
> -import java.io.Serializable;
> -import java.lang.reflect.Constructor;
> -import java.lang.reflect.Proxy;
> -import java.net.MalformedURLException;
> -import java.net.URL;
> -import java.rmi.Remote;
> -import java.util.HashMap;
> -import java.util.Hashtable;
> -import java.util.Iterator;
> -import java.util.List;
> -import java.util.Map;
> -import java.util.Vector;
> +import org.apache.axis.AxisEngine;
> +import org.apache.axis.EngineConfiguration;
> +import org.apache.axis.configuration.EngineConfigurationFactoryFinder;
> +import org.apache.axis.encoding.DefaultJAXRPC11TypeMappingImpl;
> +import org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl;
> +import org.apache.axis.encoding.DefaultTypeMappingImpl;
> +import org.apache.axis.utils.ClassUtils;
> +import org.apache.axis.utils.Messages;
> +import org.apache.axis.utils.WSDLUtils;
> +import org.apache.axis.utils.XMLUtils;
> +import org.apache.axis.wsdl.gen.Parser;
> +import org.apache.axis.wsdl.symbolTable.BindingEntry;
> +import org.apache.axis.wsdl.symbolTable.ServiceEntry;
> +import org.apache.axis.wsdl.symbolTable.SymbolTable;
> +import org.w3c.dom.Document;
>
> import javax.naming.Reference;
> import javax.naming.Referenceable;
> @@ -40,21 +42,22 @@
> import javax.wsdl.extensions.soap.SOAPAddress;
> import javax.xml.namespace.QName;
> import javax.xml.rpc.ServiceException;
> +import javax.xml.rpc.encoding.TypeMapping;
> import javax.xml.rpc.encoding.TypeMappingRegistry;
> import javax.xml.rpc.handler.HandlerRegistry;
> -
> -import org.apache.axis.AxisEngine;
> -import org.apache.axis.EngineConfiguration;
> -import org.apache.axis.configuration.EngineConfigurationFactoryFinder;
> -import org.apache.axis.utils.ClassUtils;
> -import org.apache.axis.utils.Messages;
> -import org.apache.axis.utils.WSDLUtils;
> -import org.apache.axis.utils.XMLUtils;
> -import org.apache.axis.wsdl.gen.Parser;
> -import org.apache.axis.wsdl.symbolTable.BindingEntry;
> -import org.apache.axis.wsdl.symbolTable.ServiceEntry;
> -import org.apache.axis.wsdl.symbolTable.SymbolTable;
> -import org.w3c.dom.Document;
> +import java.io.InputStream;
> +import java.io.Serializable;
> +import java.lang.reflect.Constructor;
> +import java.lang.reflect.Proxy;
> +import java.net.MalformedURLException;
> +import java.net.URL;
> +import java.rmi.Remote;
> +import java.util.HashMap;
> +import java.util.Hashtable;
> +import java.util.Iterator;
> +import java.util.List;
> +import java.util.Map;
> +import java.util.Vector;
>
> /**
> * Axis' JAXRPC Dynamic Invoation Interface implementation of the
> Service
> @@ -898,4 +901,23 @@
> return (Transport) transportImpls.get(url.toString());
> }
>
> + /**
> + * Set the typemapping version
> + * @param version
> + */
> + public void setTypeMappingVersion(String version) {
> + TypeMapping tm = null;
> + if (version.equals("1.0")) {
> + tm = DefaultSOAPEncodingTypeMappingImpl.create();
> + } else if (version.equals("1.1")) {
> + tm = DefaultTypeMappingImpl.getSingleton();
> + } else if (version.equals("1.2")) {
> + tm =
> DefaultSOAPEncodingTypeMappingImpl.createWithDelegate();
> + } else if (version.equals("1.3")) {
> + tm = DefaultJAXRPC11TypeMappingImpl.createWithDelegate();
> + } else {
> + throw new
> RuntimeException(org.apache.axis.utils.Messages.getMessage("j2wBadTypeMapping00"));
> + }
> + getTypeMappingRegistry().registerDefault(tm);
> + }
> }
>
>
>
> 1.108 +26 -3
> 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.107
> retrieving revision 1.108
> diff -u -r1.107 -r1.108
> --- WSDDService.java 25 May 2004 19:41:44 -0000 1.107
> +++ WSDDService.java 20 Jan 2005 14:18:06 -0000 1.108
> @@ -27,6 +27,9 @@
> import org.apache.axis.attachments.AttachmentsImpl;
> import org.apache.axis.description.JavaServiceDesc;
> import org.apache.axis.description.ServiceDesc;
> +import org.apache.axis.encoding.DefaultJAXRPC11TypeMappingImpl;
> +import org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl;
> +import org.apache.axis.encoding.DefaultTypeMappingImpl;
> import org.apache.axis.encoding.DeserializerFactory;
> import org.apache.axis.encoding.SerializationContext;
> import org.apache.axis.encoding.SerializerFactory;
> @@ -48,9 +51,9 @@
> import javax.xml.namespace.QName;
> import java.io.IOException;
> import java.util.ArrayList;
> +import java.util.List;
> import java.util.StringTokenizer;
> import java.util.Vector;
> -import java.util.List;
>
> /**
> * A service represented in WSDD.
> @@ -240,7 +243,7 @@
> // If not created, construct a tmr
> // and populate it with the type mappings.
> if (tmr == null) {
> - tmr = new TypeMappingRegistryImpl();
> + createTMR();
> for (int i=0; i<typeMappings.size(); i++) {
> deployTypeMapping((WSDDTypeMapping)
> typeMappings.get(i));
> @@ -248,6 +251,26 @@
> }
> }
>
> + private void createTMR() {
> + String version = getParameter("typeMappingVersion");
> + if(version != null) {
> + TypeMapping tm = null;
> + if (version.equals("1.0")) {
> + tm = DefaultSOAPEncodingTypeMappingImpl.create();
> + } else if (version.equals("1.1")) {
> + tm = DefaultTypeMappingImpl.getSingleton();
> + } else if (version.equals("1.2")) {
> + tm =
> DefaultSOAPEncodingTypeMappingImpl.createWithDelegate();
> + } else if (version.equals("1.3")) {
> + tm =
> DefaultJAXRPC11TypeMappingImpl.createWithDelegate();
> + } else {
> + throw new
> RuntimeException(org.apache.axis.utils.Messages.getMessage("j2wBadTypeMapping00"));
> + }
> + tmr = new TypeMappingRegistryImpl(tm);
> + } else {
> + tmr = new TypeMappingRegistryImpl();
> + }
> + }
>
> /**
> * This method can be used for dynamic deployment using new
> WSDDService()
> @@ -500,7 +523,7 @@
> typeMappings.add(mapping);
> }
> if (tmr == null) {
> - tmr = new TypeMappingRegistryImpl();
> + createTMR();
> }
> try {
> // Get the encoding style from the mapping, if it isn't set
>
>
>
>
>
Re: cvs commit: ws-axis/java/src/org/apache/axis/deployment/wsdd WSDDService.java
Posted by Davanum Srinivas <da...@gmail.com>.
Glen,
Please run the test/wsdl/schema2 test case through tcpmon. I don't
think we are finished making changes for jaxrp compliance...there are
xsi:types getting added when they should not be. Let's make all the
necessary changes and then fix how to set the switches.
thanks,
dims
On Fri, 21 Jan 2005 06:15:28 +1100, Glen Daniels <gl...@thoughtcraft.com> wrote:
> Hi dims:
>
> I am pretty uncomfortable with this. First off, "typemappingVersion=1.3"
> doesn't really mean anything, whereas "jaxrpc11Compliance" is pretty clear
> as to what's intended. Second, is it really true that the ONLY thing that
> we will need to do for JAX-RPC compliance is affect the typemapping?
>
> I'd still greatly prefer the "JAX-RPC mode" flag, settable via command line
> options on the tools and also via WSDD for the engines.
>
> Sorry I haven't had time to look into these latest changes more deeply - we
> have another full day of WSDL meetings today in Melbourne, and I've got a
> lunch meeting too, but I'll try to start looking into this on the plane to
> Sydney tonight.
>
> --Glen
>
> ----- Original Message -----
> From: <di...@apache.org>
> To: <ws...@apache.org>
> Sent: Friday, January 21, 2005 1:18 AM
> Subject: cvs commit: ws-axis/java/src/org/apache/axis/deployment/wsdd
> WSDDService.java
>
> > dims 2005/01/20 06:18:06
> >
> > Modified: java/src/org/apache/axis AxisEngine.java
> > java/src/org/apache/axis/encoding
> > DefaultTypeMappingImpl.java
> > TypeMappingRegistryImpl.java
> > java/src/org/apache/axis/wsdl/toJava Emitter.java
> > JavaDeployWriter.java JavaServiceImplWriter.java
> > java/src/org/apache/axis/wsdl Java2WSDL.java
> > java/src/org/apache/axis/client Service.java
> > java/src/org/apache/axis/deployment/wsdd WSDDService.java
> > Log:
> > - Eliminate the axis.jaxrpc11Compliance flag
> > - Support typeMappingVersion setting per service
> > - At codegen time, add more information in deploy.wsdd and Locator for
> > setting typemappingversion
> >
> > Notes:
> > - Glen/Tom, PLEASE review the code.
> > - Still check/need to fix wrong xsi:types at runtime for JAXRPC11
> > - Need to run TCK.
> >
> > Revision Changes Path
> > 1.118 +0 -13 ws-axis/java/src/org/apache/axis/AxisEngine.java
> >
> > Index: AxisEngine.java
> > ===================================================================
> > RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/AxisEngine.java,v
> > retrieving revision 1.117
> > retrieving revision 1.118
> > diff -u -r1.117 -r1.118
> > --- AxisEngine.java 10 Jan 2005 19:02:30 -0000 1.117
> > +++ AxisEngine.java 20 Jan 2005 14:18:05 -0000 1.118
> > @@ -120,19 +120,6 @@
> > */
> > private ArrayList actorURIs = new ArrayList();
> >
> > - /** Are we in JAX-RPC 1.1 compatibility mode? */
> > - public static boolean jaxrpc11Compliance = false;
> > - static {
> > - try {
> > - // We check a system property, but we can use use switches
> > - // to control this in WSDL2Java and at runtime.
> > - jaxrpc11Compliance =
> > - System.getProperty("axis.jaxrpc11Compliance",
> > "false")
> > - .equalsIgnoreCase("true");
> > - } catch (Throwable t) {
> > - }
> > - }
> > -
> > /**
> > * Thread local storage used for locating the active message
> > context.
> > * This information is only valid for the lifetime of this request.
> >
> >
> >
> > 1.86 +3 -8
> > ws-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java
> >
> > Index: DefaultTypeMappingImpl.java
> > ===================================================================
> > RCS file:
> > /home/cvs/ws-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java,v
> > retrieving revision 1.85
> > retrieving revision 1.86
> > diff -u -r1.85 -r1.86
> > --- DefaultTypeMappingImpl.java 18 Jan 2005 03:38:02 -0000 1.85
> > +++ DefaultTypeMappingImpl.java 20 Jan 2005 14:18:05 -0000 1.86
> > @@ -17,7 +17,6 @@
> > package org.apache.axis.encoding;
> >
> > import org.apache.axis.Constants;
> > -import org.apache.axis.AxisEngine;
> > import org.apache.axis.attachments.OctetStream;
> > import org.apache.axis.encoding.ser.ArrayDeserializerFactory;
> > import org.apache.axis.encoding.ser.ArraySerializerFactory;
> > @@ -27,6 +26,8 @@
> > import org.apache.axis.encoding.ser.BeanSerializerFactory;
> > import org.apache.axis.encoding.ser.DateDeserializerFactory;
> > import org.apache.axis.encoding.ser.DateSerializerFactory;
> > +import org.apache.axis.encoding.ser.DocumentDeserializerFactory;
> > +import org.apache.axis.encoding.ser.DocumentSerializerFactory;
> > import org.apache.axis.encoding.ser.ElementDeserializerFactory;
> > import org.apache.axis.encoding.ser.ElementSerializerFactory;
> > import org.apache.axis.encoding.ser.HexDeserializerFactory;
> > @@ -41,8 +42,6 @@
> > import org.apache.axis.encoding.ser.SimpleSerializerFactory;
> > import org.apache.axis.encoding.ser.VectorDeserializerFactory;
> > import org.apache.axis.encoding.ser.VectorSerializerFactory;
> > -import org.apache.axis.encoding.ser.DocumentDeserializerFactory;
> > -import org.apache.axis.encoding.ser.DocumentSerializerFactory;
> > import org.apache.axis.schema.SchemaVersion;
> > import org.apache.axis.types.HexBinary;
> > import org.apache.axis.utils.JavaUtils;
> > @@ -82,11 +81,7 @@
> > */
> > public static synchronized TypeMapping getSingleton() {
> > if (tm == null) {
> > - if(AxisEngine.jaxrpc11Compliance) {
> > - tm = new DefaultJAXRPC11TypeMappingImpl();
> > - } else {
> > - tm = new DefaultTypeMappingImpl();
> > - }
> > + tm = new DefaultTypeMappingImpl();
> > }
> > return tm;
> > }
> >
> >
> >
> > 1.27 +9 -1
> > ws-axis/java/src/org/apache/axis/encoding/TypeMappingRegistryImpl.java
> >
> > Index: TypeMappingRegistryImpl.java
> > ===================================================================
> > RCS file:
> > /home/cvs/ws-axis/java/src/org/apache/axis/encoding/TypeMappingRegistryImpl.java,v
> > retrieving revision 1.26
> > retrieving revision 1.27
> > diff -u -r1.26 -r1.27
> > --- TypeMappingRegistryImpl.java 25 Feb 2004 14:02:36 -0000 1.26
> > +++ TypeMappingRegistryImpl.java 20 Jan 2005 14:18:05 -0000 1.27
> > @@ -130,7 +130,15 @@
> > private HashMap mapTM; // Type Mappings keyed with
> > Namespace URI
> > private TypeMapping defaultDelTM; // Delegate to default Type
> > Mapping
> >
> > -
> > + /**
> > + * Construct TypeMappingRegistry
> > + * @param tm
> > + */
> > + public TypeMappingRegistryImpl(TypeMapping tm) {
> > + mapTM = new HashMap();
> > + defaultDelTM = tm;
> > + register(Constants.URI_SOAP11_ENC, new
> > DefaultSOAPEncodingTypeMappingImpl());
> > + }
> >
> > /**
> > * Construct TypeMappingRegistry
> >
> >
> >
> > 1.78 +10 -3
> > 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.77
> > retrieving revision 1.78
> > diff -u -r1.77 -r1.78
> > --- Emitter.java 18 Jan 2005 03:38:03 -0000 1.77
> > +++ Emitter.java 20 Jan 2005 14:18:05 -0000 1.78
> > @@ -15,12 +15,11 @@
> > */
> > package org.apache.axis.wsdl.toJava;
> >
> > +import org.apache.axis.encoding.DefaultJAXRPC11TypeMappingImpl;
> > import org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl;
> > -import org.apache.axis.encoding.TypeMapping;
> > import org.apache.axis.encoding.DefaultTypeMappingImpl;
> > -import org.apache.axis.encoding.DefaultJAXRPC11TypeMappingImpl;
> > +import org.apache.axis.encoding.TypeMapping;
> > import org.apache.axis.enum.Scope;
> > -import org.apache.axis.enum.Use;
> > import org.apache.axis.i18n.Messages;
> > import org.apache.axis.utils.ClassUtils;
> > import org.apache.axis.utils.JavaUtils;
> > @@ -749,6 +748,13 @@
> > } // getNStoPkgFromPropsFile
> >
> > /**
> > + * Get the typemapping version
> > + */
> > + public String getTypeMappingVersion() {
> > + return typeMappingVersion;
> > + }
> > +
> > + /**
> > * Method setTypeMappingVersion
> > *
> > * @param typeMappingVersion
> > @@ -766,6 +772,7 @@
> > } else {
> > throw new
> > RuntimeException(org.apache.axis.utils.Messages.getMessage("j2wBadTypeMapping00"));
> > }
> > + this.typeMappingVersion = typeMappingVersion;
> > setDefaultTypeMapping(defaultTM);
> > }
> > baseTypeMapping = new BaseTypeMapping() {
> >
> >
> >
> > 1.87 +10 -2
> > 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.86
> > retrieving revision 1.87
> > diff -u -r1.86 -r1.87
> > --- JavaDeployWriter.java 6 Jul 2004 23:19:40 -0000 1.86
> > +++ JavaDeployWriter.java 20 Jan 2005 14:18:05 -0000 1.87
> > @@ -47,11 +47,11 @@
> > import java.io.PrintWriter;
> > import java.util.ArrayList;
> > import java.util.Collection;
> > +import java.util.HashMap;
> > import java.util.HashSet;
> > import java.util.Iterator;
> > import java.util.Map;
> > import java.util.Vector;
> > -import java.util.HashMap;
> >
> > /**
> > * This is Wsdl2java's deploy Writer. It writes the deploy.wsdd file.
> > @@ -64,6 +64,9 @@
> > /** Field symbolTable */
> > protected SymbolTable symbolTable;
> >
> > + /** Field emitter */
> > + protected Emitter emitter;
> > +
> > /**
> > * Constructor.
> > *
> > @@ -75,7 +78,8 @@
> > SymbolTable symbolTable) {
> >
> > super(emitter, "deploy");
> > -
> > +
> > + this.emitter = emitter;
> > this.definition = definition;
> > this.symbolTable = symbolTable;
> > } // ctor
> > @@ -400,6 +404,10 @@
> >
> > pw.println(" <parameter name=\"className\" value=\"" +
> > className
> > + "\"/>");
> > +
> > + pw.println(" <parameter name=\"typeMappingVersion\"
> > value=\""
> > + + emitter.getTypeMappingVersion() + "\"/>");
> > +
> > pw.println(" <parameter name=\"wsdlPortType\" value=\""
> > + binding.getPortType().getQName().getLocalPart() +
> > "\"/>");
> >
> >
> >
> >
> > 1.43 +3 -2
> > ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java
> >
> > Index: JavaServiceImplWriter.java
> > ===================================================================
> > RCS file:
> > /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java,v
> > retrieving revision 1.42
> > retrieving revision 1.43
> > diff -u -r1.42 -r1.43
> > --- JavaServiceImplWriter.java 21 Dec 2004 20:17:01 -0000 1.42
> > +++ JavaServiceImplWriter.java 20 Jan 2005 14:18:05 -0000 1.43
> > @@ -27,8 +27,6 @@
> > import javax.wsdl.Port;
> > import javax.wsdl.Service;
> > import javax.xml.namespace.QName;
> > -import javax.xml.rpc.ServiceException;
> > -
> > import java.io.IOException;
> > import java.io.PrintWriter;
> > import java.net.MalformedURLException;
> > @@ -278,6 +276,7 @@
> > pw.println();
> > pw.println(" public " +
> > Utils.getJavaLocalName(sEntry.getName())
> > + "Locator() {");
> > + pw.println(" setTypeMappingVersion(\"" +
> > emitter.getTypeMappingVersion() + "\");");
> > pw.println(" }");
> > pw.println();
> >
> > @@ -286,6 +285,7 @@
> > pw.println(" public " +
> > Utils.getJavaLocalName(sEntry.getName())
> > + "Locator(org.apache.axis.EngineConfiguration config)
> > {");
> > pw.println(" super(config);");
> > + pw.println(" setTypeMappingVersion(\"" +
> > emitter.getTypeMappingVersion() + "\");");
> > pw.println(" }");
> >
> > //Write a constructor that accepts String wsdl location +
> > Service QName
> > @@ -294,6 +294,7 @@
> > + "Locator(java.lang.String wsdlLoc,
> > javax.xml.namespace.QName sName) "
> > + "throws " +
> > javax.xml.rpc.ServiceException.class.getName() + " {");
> > pw.println(" super(wsdlLoc, sName);");
> > + pw.println(" setTypeMappingVersion(\"" +
> > emitter.getTypeMappingVersion() + "\");");
> > pw.println(" }");
> > }
> >
> >
> >
> >
> > 1.47 +0 -3 ws-axis/java/src/org/apache/axis/wsdl/Java2WSDL.java
> >
> > Index: Java2WSDL.java
> > ===================================================================
> > RCS file:
> > /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/Java2WSDL.java,v
> > retrieving revision 1.46
> > retrieving revision 1.47
> > diff -u -r1.46 -r1.47
> > --- Java2WSDL.java 18 Jan 2005 03:38:03 -0000 1.46
> > +++ Java2WSDL.java 20 Jan 2005 14:18:05 -0000 1.47
> > @@ -15,9 +15,6 @@
> > */
> > package org.apache.axis.wsdl;
> >
> > -import org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl;
> > -import org.apache.axis.encoding.DefaultTypeMappingImpl;
> > -import org.apache.axis.encoding.DefaultJAXRPC11TypeMappingImpl;
> > import org.apache.axis.utils.CLArgsParser;
> > import org.apache.axis.utils.CLOption;
> > import org.apache.axis.utils.CLOptionDescriptor;
> >
> >
> >
> > 1.102 +48 -26 ws-axis/java/src/org/apache/axis/client/Service.java
> >
> > Index: Service.java
> > ===================================================================
> > RCS file:
> > /home/cvs/ws-axis/java/src/org/apache/axis/client/Service.java,v
> > retrieving revision 1.101
> > retrieving revision 1.102
> > diff -u -r1.101 -r1.102
> > --- Service.java 24 Nov 2004 17:09:29 -0000 1.101
> > +++ Service.java 20 Jan 2005 14:18:06 -0000 1.102
> > @@ -16,19 +16,21 @@
> >
> > package org.apache.axis.client;
> >
> > -import java.io.InputStream;
> > -import java.io.Serializable;
> > -import java.lang.reflect.Constructor;
> > -import java.lang.reflect.Proxy;
> > -import java.net.MalformedURLException;
> > -import java.net.URL;
> > -import java.rmi.Remote;
> > -import java.util.HashMap;
> > -import java.util.Hashtable;
> > -import java.util.Iterator;
> > -import java.util.List;
> > -import java.util.Map;
> > -import java.util.Vector;
> > +import org.apache.axis.AxisEngine;
> > +import org.apache.axis.EngineConfiguration;
> > +import org.apache.axis.configuration.EngineConfigurationFactoryFinder;
> > +import org.apache.axis.encoding.DefaultJAXRPC11TypeMappingImpl;
> > +import org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl;
> > +import org.apache.axis.encoding.DefaultTypeMappingImpl;
> > +import org.apache.axis.utils.ClassUtils;
> > +import org.apache.axis.utils.Messages;
> > +import org.apache.axis.utils.WSDLUtils;
> > +import org.apache.axis.utils.XMLUtils;
> > +import org.apache.axis.wsdl.gen.Parser;
> > +import org.apache.axis.wsdl.symbolTable.BindingEntry;
> > +import org.apache.axis.wsdl.symbolTable.ServiceEntry;
> > +import org.apache.axis.wsdl.symbolTable.SymbolTable;
> > +import org.w3c.dom.Document;
> >
> > import javax.naming.Reference;
> > import javax.naming.Referenceable;
> > @@ -40,21 +42,22 @@
> > import javax.wsdl.extensions.soap.SOAPAddress;
> > import javax.xml.namespace.QName;
> > import javax.xml.rpc.ServiceException;
> > +import javax.xml.rpc.encoding.TypeMapping;
> > import javax.xml.rpc.encoding.TypeMappingRegistry;
> > import javax.xml.rpc.handler.HandlerRegistry;
> > -
> > -import org.apache.axis.AxisEngine;
> > -import org.apache.axis.EngineConfiguration;
> > -import org.apache.axis.configuration.EngineConfigurationFactoryFinder;
> > -import org.apache.axis.utils.ClassUtils;
> > -import org.apache.axis.utils.Messages;
> > -import org.apache.axis.utils.WSDLUtils;
> > -import org.apache.axis.utils.XMLUtils;
> > -import org.apache.axis.wsdl.gen.Parser;
> > -import org.apache.axis.wsdl.symbolTable.BindingEntry;
> > -import org.apache.axis.wsdl.symbolTable.ServiceEntry;
> > -import org.apache.axis.wsdl.symbolTable.SymbolTable;
> > -import org.w3c.dom.Document;
> > +import java.io.InputStream;
> > +import java.io.Serializable;
> > +import java.lang.reflect.Constructor;
> > +import java.lang.reflect.Proxy;
> > +import java.net.MalformedURLException;
> > +import java.net.URL;
> > +import java.rmi.Remote;
> > +import java.util.HashMap;
> > +import java.util.Hashtable;
> > +import java.util.Iterator;
> > +import java.util.List;
> > +import java.util.Map;
> > +import java.util.Vector;
> >
> > /**
> > * Axis' JAXRPC Dynamic Invoation Interface implementation of the
> > Service
> > @@ -898,4 +901,23 @@
> > return (Transport) transportImpls.get(url.toString());
> > }
> >
> > + /**
> > + * Set the typemapping version
> > + * @param version
> > + */
> > + public void setTypeMappingVersion(String version) {
> > + TypeMapping tm = null;
> > + if (version.equals("1.0")) {
> > + tm = DefaultSOAPEncodingTypeMappingImpl.create();
> > + } else if (version.equals("1.1")) {
> > + tm = DefaultTypeMappingImpl.getSingleton();
> > + } else if (version.equals("1.2")) {
> > + tm =
> > DefaultSOAPEncodingTypeMappingImpl.createWithDelegate();
> > + } else if (version.equals("1.3")) {
> > + tm = DefaultJAXRPC11TypeMappingImpl.createWithDelegate();
> > + } else {
> > + throw new
> > RuntimeException(org.apache.axis.utils.Messages.getMessage("j2wBadTypeMapping00"));
> > + }
> > + getTypeMappingRegistry().registerDefault(tm);
> > + }
> > }
> >
> >
> >
> > 1.108 +26 -3
> > 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.107
> > retrieving revision 1.108
> > diff -u -r1.107 -r1.108
> > --- WSDDService.java 25 May 2004 19:41:44 -0000 1.107
> > +++ WSDDService.java 20 Jan 2005 14:18:06 -0000 1.108
> > @@ -27,6 +27,9 @@
> > import org.apache.axis.attachments.AttachmentsImpl;
> > import org.apache.axis.description.JavaServiceDesc;
> > import org.apache.axis.description.ServiceDesc;
> > +import org.apache.axis.encoding.DefaultJAXRPC11TypeMappingImpl;
> > +import org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl;
> > +import org.apache.axis.encoding.DefaultTypeMappingImpl;
> > import org.apache.axis.encoding.DeserializerFactory;
> > import org.apache.axis.encoding.SerializationContext;
> > import org.apache.axis.encoding.SerializerFactory;
> > @@ -48,9 +51,9 @@
> > import javax.xml.namespace.QName;
> > import java.io.IOException;
> > import java.util.ArrayList;
> > +import java.util.List;
> > import java.util.StringTokenizer;
> > import java.util.Vector;
> > -import java.util.List;
> >
> > /**
> > * A service represented in WSDD.
> > @@ -240,7 +243,7 @@
> > // If not created, construct a tmr
> > // and populate it with the type mappings.
> > if (tmr == null) {
> > - tmr = new TypeMappingRegistryImpl();
> > + createTMR();
> > for (int i=0; i<typeMappings.size(); i++) {
> > deployTypeMapping((WSDDTypeMapping)
> > typeMappings.get(i));
> > @@ -248,6 +251,26 @@
> > }
> > }
> >
> > + private void createTMR() {
> > + String version = getParameter("typeMappingVersion");
> > + if(version != null) {
> > + TypeMapping tm = null;
> > + if (version.equals("1.0")) {
> > + tm = DefaultSOAPEncodingTypeMappingImpl.create();
> > + } else if (version.equals("1.1")) {
> > + tm = DefaultTypeMappingImpl.getSingleton();
> > + } else if (version.equals("1.2")) {
> > + tm =
> > DefaultSOAPEncodingTypeMappingImpl.createWithDelegate();
> > + } else if (version.equals("1.3")) {
> > + tm =
> > DefaultJAXRPC11TypeMappingImpl.createWithDelegate();
> > + } else {
> > + throw new
> > RuntimeException(org.apache.axis.utils.Messages.getMessage("j2wBadTypeMapping00"));
> > + }
> > + tmr = new TypeMappingRegistryImpl(tm);
> > + } else {
> > + tmr = new TypeMappingRegistryImpl();
> > + }
> > + }
> >
> > /**
> > * This method can be used for dynamic deployment using new
> > WSDDService()
> > @@ -500,7 +523,7 @@
> > typeMappings.add(mapping);
> > }
> > if (tmr == null) {
> > - tmr = new TypeMappingRegistryImpl();
> > + createTMR();
> > }
> > try {
> > // Get the encoding style from the mapping, if it isn't set
> >
> >
> >
> >
> >
>
--
Davanum Srinivas - http://webservices.apache.org/~dims/