gdaniels 02/04/28 11:10:57 Modified: java/src/org/apache/axis/deployment/wsdd WSDDService.java WSDDTypeMapping.java java/src/org/apache/axis/description FieldDesc.java java/src/org/apache/axis/encoding DefaultTypeMappingImpl.java java/src/org/apache/axis/encoding/ser BeanSerializer.java SimpleSerializer.java java/src/org/apache/axis/providers/java JavaProvider.java java/src/org/apache/axis/wsdl Java2WSDL.java java/src/org/apache/axis/wsdl/fromJava Emitter.java Types.java java/test/wsdl Java2WsdlAntTask.java Removed: java/src/org/apache/axis/wsdl/fromJava BaseRep.java BuilderBeanClassRep.java BuilderPortTypeClassRep.java ClassRep.java DefaultBuilderBeanClassRep.java DefaultBuilderPortTypeClassRep.java DefaultFactory.java ExceptionRep.java FieldRep.java Java2WSDLFactory.java MethodRep.java ParamRep.java Log: * Switch over to using BeanPropertyDescriptors/TypeDescs exclusively for generating WSDL. This resolves some naming issues/edge cases which manifested as bug #8584: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8584 * Remove *Rep and *Factory classes from wsdl.fromJava package, and references to them from Java2WSDL, Emitter, etc. * Remove unused bindingoperation argument from writeMessages() in fromJava.Emitter * Correctly default encodingStyle in WSDDTypeMapping (use attribute node instead of getAttribute() so we get null when the attribute isn't there) * Cleaned up comments in DefaultTypeMappingImpl to make a bit clearer * Code cleanup, remove dead code, optimize imports Revision Changes Path 1.61 +14 -5 xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java Index: WSDDService.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- WSDDService.java 24 Apr 2002 17:48:57 -0000 1.60 +++ WSDDService.java 28 Apr 2002 18:10:56 -0000 1.61 @@ -54,10 +54,20 @@ */ package org.apache.axis.deployment.wsdd; -import org.apache.axis.*; -import org.apache.axis.description.OperationDesc; +import org.apache.axis.AxisEngine; +import org.apache.axis.ConfigurationException; +import org.apache.axis.Constants; +import org.apache.axis.EngineConfiguration; +import org.apache.axis.FaultableHandler; +import org.apache.axis.Handler; +import org.apache.axis.MessageContext; import org.apache.axis.description.ServiceDesc; -import org.apache.axis.encoding.*; +import org.apache.axis.encoding.DeserializerFactory; +import org.apache.axis.encoding.SerializationContext; +import org.apache.axis.encoding.SerializerFactory; +import org.apache.axis.encoding.TypeMapping; +import org.apache.axis.encoding.TypeMappingRegistry; +import org.apache.axis.encoding.TypeMappingRegistryImpl; import org.apache.axis.encoding.ser.BaseDeserializerFactory; import org.apache.axis.encoding.ser.BaseSerializerFactory; import org.apache.axis.handlers.soap.SOAPService; @@ -69,7 +79,6 @@ import javax.xml.rpc.namespace.QName; import java.io.IOException; import java.util.ArrayList; -import java.util.Iterator; import java.util.StringTokenizer; import java.util.Vector; @@ -227,7 +236,7 @@ /** * Add a WSDDOperation to the Service. - * @param mapping. + * @param operation the operation to add **/ public void addOperation(WSDDOperation operation) { operations.add(operation); 1.27 +6 -2 xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTypeMapping.java Index: WSDDTypeMapping.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDTypeMapping.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- WSDDTypeMapping.java 19 Apr 2002 17:28:21 -0000 1.26 +++ WSDDTypeMapping.java 28 Apr 2002 18:10:56 -0000 1.27 @@ -59,6 +59,7 @@ import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.XMLUtils; import org.w3c.dom.Element; +import org.w3c.dom.Attr; import org.xml.sax.helpers.AttributesImpl; import javax.xml.rpc.namespace.QName; @@ -96,9 +97,12 @@ { serializer = e.getAttribute("serializer"); deserializer = e.getAttribute("deserializer"); - encodingStyle = e.getAttribute("encodingStyle"); - if (encodingStyle == null) { + Attr attrNode = e.getAttributeNode("encodingStyle"); + + if (attrNode == null) { encodingStyle = Constants.URI_CURRENT_SOAP_ENC; + } else { + encodingStyle = attrNode.getValue(); } String qnameStr = e.getAttribute("qname"); 1.2 +15 -0 xml-axis/java/src/org/apache/axis/description/FieldDesc.java Index: FieldDesc.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/description/FieldDesc.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- FieldDesc.java 8 Mar 2002 05:04:53 -0000 1.1 +++ FieldDesc.java 28 Apr 2002 18:10:56 -0000 1.2 @@ -70,6 +70,9 @@ private QName xmlName; /** The XML Type this field maps to/from */ private QName xmlType; + /** The Java type of this field */ + private Class javaType; + /** An indication of whether this should be an element or an attribute */ // Q : should this be a boolean, or just "instanceof ElementDesc", etc. private boolean _isElement = true; @@ -111,6 +114,14 @@ this.xmlName = xmlName; } + public Class getJavaType() { + return javaType; + } + + public void setJavaType(Class javaType) { + this.javaType = javaType; + } + /** * Check if this is an element or an attribute. * @@ -118,5 +129,9 @@ */ public boolean isElement() { return _isElement; + } + + public boolean isIndexed() { + return false; } } 1.22 +10 -12 xml-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java Index: DefaultTypeMappingImpl.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- DefaultTypeMappingImpl.java 16 Apr 2002 20:26:32 -0000 1.21 +++ DefaultTypeMappingImpl.java 28 Apr 2002 18:10:56 -0000 1.22 @@ -63,27 +63,25 @@ import java.util.List; /** - * @author Rich Scheuerle ([EMAIL PROTECTED]) - * * This is the implementation of the axis Default TypeMapping (which extends - * the JAX-RPC TypeMapping interface) for SOAP 1.1. If you want the JAX-RPC - * SOAP 1.2 Type Mapping the use DefaultJAXRPCTypeMapping. + * the JAX-RPC TypeMapping interface) for SOAP 1.1. * - * A TypeMapping is obtained from the singleton TypeMappingRegistry using - * the namespace of the webservice. The TypeMapping contains the tuples + * A TypeMapping contains tuples as follows: * {Java type, SerializerFactory, DeserializerFactory, Type QName) * - * So if you have a Web Service with the namespace "XYZ", you call - * the TypeMappingRegistry.getTypeMapping("XYZ"). + * In other words, it serves to map Java types to and from XML types using + * particular Serializers/Deserializers. Each TypeMapping is associated with + * one or more encodingStyle URIs. * * The wsdl in your web service will use a number of types. The tuple * information for each of these will be accessed via the TypeMapping. * - * Because every web service uses the soap, schema, wsdl primitives, we could - * pre-populate the TypeMapping with these standard tuples. Instead, if requested - * namespace/class matches is not found in the TypeMapping but matches one these - * known primitives, the request is delegated to this Default TypeMapping. + * This TypeMapping is the "default" one, which includes all the standard + * SOAP and schema XSD types. Individual TypeMappings (associated with + * AxisEngines and SOAPServices) will delegate to this one, so if you haven't + * overriden a default mapping we'll end up getting it from here. * + * @author Rich Scheuerle ([EMAIL PROTECTED]) */ public class DefaultTypeMappingImpl extends TypeMappingImpl { 1.29 +38 -46 xml-axis/java/src/org/apache/axis/encoding/ser/BeanSerializer.java Index: BeanSerializer.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/BeanSerializer.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- BeanSerializer.java 20 Apr 2002 00:22:24 -0000 1.28 +++ BeanSerializer.java 28 Apr 2002 18:10:56 -0000 1.29 @@ -57,16 +57,13 @@ import org.apache.axis.AxisFault; import org.apache.axis.Constants; -import org.apache.axis.InternalException; import org.apache.axis.description.FieldDesc; import org.apache.axis.description.TypeDesc; import org.apache.axis.encoding.SerializationContext; import org.apache.axis.encoding.Serializer; import org.apache.axis.utils.BeanPropertyDescriptor; -import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.BeanUtils; -import org.apache.axis.wsdl.fromJava.ClassRep; -import org.apache.axis.wsdl.fromJava.FieldRep; +import org.apache.axis.utils.JavaUtils; import org.apache.axis.wsdl.fromJava.Types; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -75,15 +72,11 @@ import org.xml.sax.helpers.AttributesImpl; import javax.xml.rpc.namespace.QName; -import java.beans.Introspector; -import java.beans.PropertyDescriptor; import java.io.IOException; import java.io.Serializable; import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.List; -import java.util.Vector; /** * General purpose serializer/deserializerFactory for an arbitrary java bean. @@ -128,9 +121,6 @@ Object value, SerializationContext context) throws IOException { - boolean isSOAP_ENC = Constants. - isSOAP_ENC(context.getMessageContext().getEncodingStyle()); - // Check for meta-data in the bean that will tell us if any of the // properties are actually attributes, add those to the element // attribute list @@ -268,51 +258,53 @@ Element all = types.createElement("sequence"); e.appendChild(all); - // Build a ClassRep that represents the bean class. This - // allows users to provide their own field mapping. - ClassRep clsRep = types.getBeanBuilder().build(javaType); - - // Map abstract classes to abstract attribute on complexType - if (Modifier.isAbstract(clsRep.getModifiers())) { + if (Modifier.isAbstract(javaType.getModifiers())) { complexType.setAttribute("abstract", "true"); } - - // Write out fields - Vector fields = clsRep.getFields(); - for (int i=0; i < fields.size(); i++) { - FieldRep field = (FieldRep) fields.elementAt(i); - - String name = field.getName(); + // Serialize each property + for (int i=0; i<propertyDescriptor.length; i++) { + String propName = propertyDescriptor[i].getName(); + if (propName.equals("class")) + continue; + + // If we have type metadata, check to see what we're doing + // with this field. If it's an attribute, skip it. If it's + // an element, use whatever qname is in there. If we can't + // find any of this info, use the default. if (typeDesc != null) { - FieldDesc fieldDesc = typeDesc.getFieldByName(field.getName()); - if (fieldDesc != null) { - if (!fieldDesc.isElement()) { - QName attrName = typeDesc.getAttributeNameForField( - field.getName()); - writeAttribute(types, attrName.getLocalPart(), - field.getType(), + FieldDesc field = typeDesc.getFieldByName(propName); + if (field != null) { + QName qname = field.getXmlName(); + if (qname != null) { + // FIXME! + // Check to see if this is in the right namespace - + // if it's not, we need to use an <element ref=""> + // to represent it!!! + + // Use the default... + propName = qname.getLocalPart(); + } + if (!field.isElement()) { + writeAttribute(types, + propName, + propertyDescriptor[i].getType(), complexType); - continue; } else { - QName xmlName = typeDesc.getElementNameForField( - field.getName()); - if (xmlName != null) { - if (xmlName.getNamespaceURI() != "") { - // Throw an exception until we can emit - // schema for this correctly? - } - name = xmlName.getLocalPart(); - writeField(types, name, field.getType(), - field.getIndexed(), all); - continue; - } + writeField(types, + propName, + propertyDescriptor[i].getType(), + propertyDescriptor[i].isIndexed(), all); } } + } else { + writeField(types, + propName, + propertyDescriptor[i].getType(), + propertyDescriptor[i].isIndexed(), all); } - - writeField(types, name, field.getType(), field.getIndexed(), all); } + // done return true; } 1.13 +38 -47 xml-axis/java/src/org/apache/axis/encoding/ser/SimpleSerializer.java Index: SimpleSerializer.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/SimpleSerializer.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- SimpleSerializer.java 20 Apr 2002 00:22:24 -0000 1.12 +++ SimpleSerializer.java 28 Apr 2002 18:10:56 -0000 1.13 @@ -63,11 +63,9 @@ import org.apache.axis.encoding.Serializer; import org.apache.axis.encoding.SimpleType; import org.apache.axis.utils.BeanPropertyDescriptor; +import org.apache.axis.utils.BeanUtils; import org.apache.axis.utils.JavaUtils; import org.apache.axis.utils.XMLUtils; -import org.apache.axis.utils.BeanUtils; -import org.apache.axis.wsdl.fromJava.ClassRep; -import org.apache.axis.wsdl.fromJava.FieldRep; import org.apache.axis.wsdl.fromJava.Types; import org.w3c.dom.Element; import org.xml.sax.Attributes; @@ -75,8 +73,6 @@ import javax.xml.rpc.namespace.QName; import java.io.IOException; -import java.lang.reflect.Method; -import java.util.Vector; /** * Serializer for primitives and anything simple whose value is obtained with toString() * @@ -256,9 +252,43 @@ // Get the base type from the "value" element of the bean String base = "string"; for (int i=0; i<propertyDescriptor.length; i++) { - if (! propertyDescriptor[i].getName().equals("value")) + String propName = propertyDescriptor[i].getName(); + if (!propName.equals("value")) { + if (typeDesc != null) { + FieldDesc field = typeDesc.getFieldByName(propName); + if (field != null) { + if (field.isElement()) { + // throw? + } + QName qname = field.getXmlName(); + if (qname == null) { + // Use the default... + propName = propName; + qname = new QName("", propName); + } + + // write attribute element + Class fieldType = propertyDescriptor[i].getType(); + + // Attribute must be a simple type. + if (!types.isSimpleSchemaType(fieldType)) + throw new AxisFault(JavaUtils.getMessage("AttrNotSimpleType00", + propName, + fieldType.getName())); + + // write attribute element + // TODO the attribute name needs to be preserved from the XML + String elementType = types.writeType(fieldType); + Element elem = types.createAttributeElement(propName, + elementType, + false, + extension.getOwnerDocument()); + extension.appendChild(elem); + } + } continue; - + } + BeanPropertyDescriptor bpd = propertyDescriptor[i]; Class type = bpd.getType(); // Attribute must extend a simple type. @@ -267,48 +297,9 @@ type.getName())); base = types.writeType(type); + extension.setAttribute("base", base); } - extension.setAttribute("base", base); - - // Build a ClassRep that represents the bean class. This - // allows users to provide their own field mapping. - ClassRep clsRep = types.getBeanBuilder().build(javaType); - - // Write out fields (only attributes are allowed) - if (typeDesc == null || !typeDesc.hasAttributes()) - return true; - Vector fields = clsRep.getFields(); - for (int i=0; i < fields.size(); i++) { - FieldRep field = (FieldRep) fields.elementAt(i); - - String fieldName = field.getName(); - - FieldDesc fieldDesc = typeDesc.getFieldByName(field.getName()); - if (fieldDesc == null || fieldDesc.isElement()) { - // Really, it's an error to have element descriptors in there! - continue; - } - - // write attribute element - Class fieldType = field.getType(); - - // Attribute must be a simple type. - if (!types.isSimpleSchemaType(fieldType)) - throw new AxisFault(JavaUtils.getMessage("AttrNotSimpleType00", - fieldName, - fieldType.getName())); - - // write attribute element - // TODO the attribute name needs to be preserved from the XML - String elementType = types.writeType(fieldType); - Element elem = types.createAttributeElement(fieldName, - elementType, - false, - extension.getOwnerDocument()); - extension.appendChild(elem); - } - // done return true; 1.49 +1 -1 xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java Index: JavaProvider.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/JavaProvider.java,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- JavaProvider.java 18 Apr 2002 21:15:17 -0000 1.48 +++ JavaProvider.java 28 Apr 2002 18:10:56 -0000 1.49 @@ -327,7 +327,7 @@ emitter.setAllowedMethods(allowedMethods); emitter.setIntfNamespace(url); emitter.setLocationUrl(url); - emitter.setServiceDesc(msgContext.getService().getServiceDescription()); + emitter.setServiceDesc(msgContext.getService().getInitializedServiceDesc(msgContext)); emitter.setTypeMapping((TypeMapping)msgContext.getTypeMappingRegistry(). getTypeMapping(Constants.URI_CURRENT_SOAP_ENC)); emitter.setDefaultTypeMapping((TypeMapping)msgContext.getTypeMappingRegistry(). 1.14 +0 -10 xml-axis/java/src/org/apache/axis/wsdl/Java2WSDL.java Index: Java2WSDL.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/Java2WSDL.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- Java2WSDL.java 15 Apr 2002 02:35:58 -0000 1.13 +++ Java2WSDL.java 28 Apr 2002 18:10:56 -0000 1.14 @@ -91,7 +91,6 @@ protected static final int LOCATION_IMPORT_OPT = 'L'; protected static final int METHODS_ALLOWED_OPT = 'm'; protected static final int INHERITED_CLASS_OPT = 'a'; - protected static final int FACTORY_CLASS_OPT = 'f'; protected static final int IMPL_CLASS_OPT = 'i'; protected static final int METHODS_NOTALLOWED_OPT = 'x'; protected static final int STOP_CLASSES_OPT = 'c'; @@ -163,10 +162,6 @@ CLOptionDescriptor.ARGUMENT_REQUIRED, OUTPUT_IMPL_OPT, JavaUtils.getMessage("j2woptoutputImpl00")), - new CLOptionDescriptor("factory", - CLOptionDescriptor.ARGUMENT_REQUIRED, - FACTORY_CLASS_OPT, - JavaUtils.getMessage("j2woptfactory00")), new CLOptionDescriptor("implClass", CLOptionDescriptor.ARGUMENT_REQUIRED, IMPL_CLASS_OPT, @@ -192,7 +187,6 @@ public static void main(String args[]) { String className = null; - String classDir = null; String wsdlFilename = null; String wsdlImplFilename = null; HashMap namespaceMap = new HashMap(); @@ -235,10 +229,6 @@ case INHERITED_CLASS_OPT: emitter.setUseInheritedMethods(true); - break; - - case FACTORY_CLASS_OPT: - emitter.setFactory(option.getArgument()); break; case IMPL_CLASS_OPT: 1.31 +6 -39 xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java Index: Emitter.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- Emitter.java 19 Apr 2002 14:03:14 -0000 1.30 +++ Emitter.java 28 Apr 2002 18:10:57 -0000 1.31 @@ -143,8 +143,6 @@ private ServiceDesc serviceDesc; - private Java2WSDLFactory factory; // Factory for obtaining user extensions - /** * Construct Emitter. * Set the contextual information using set* methods @@ -152,7 +150,6 @@ */ public Emitter () { namespaces = new Namespaces(); - factory = new DefaultFactory(); exceptionMsg = new HashMap(); } @@ -317,7 +314,7 @@ // Write interface header writeDefinitions(def, intfNS); types = new Types(def, tm, defaultTM, namespaces, - intfNS, factory, stopClasses); + intfNS, stopClasses); Binding binding = writeBinding(def, true); writePortType(def, binding); writeService(def, binding); @@ -341,7 +338,7 @@ // Write interface header writeDefinitions(def, intfNS); types = new Types(def, tm, defaultTM, namespaces, - intfNS, factory, stopClasses); + intfNS, stopClasses); Binding binding = writeBinding(def, true); writePortType(def, binding); return def; @@ -568,7 +565,7 @@ binding, thisOper); Operation oper = bindingOper.getOperation(); - writeMessages(def, oper, thisOper, bindingOper); + writeMessages(def, oper, thisOper); portType.addOperation(oper); } @@ -583,8 +580,9 @@ * @param oper * @throws Exception */ - private void writeMessages(Definition def, Operation oper, - OperationDesc desc, BindingOperation bindingOper) + private void writeMessages(Definition def, + Operation oper, + OperationDesc desc) throws Exception{ Input input = def.createInput(); @@ -1023,37 +1021,6 @@ catch (Exception ex) { ex.printStackTrace(); } - } - - /** - * Sets the <code>Java2WSDLFactory Class</code> to use - * @param className the name of the factory <code>Class</code> - */ - public void setFactory(String className) { - try { - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - factory = (Java2WSDLFactory) - Class.forName(className, true,cl).newInstance(); - } - catch (Exception ex) { - ex.printStackTrace(); - } - } - - /** - * Sets the <code>Java2WSDLFactory Class</code> to use - * @param factory is the factory Class - */ - public void setFactory(Java2WSDLFactory factory) { - this.factory = factory; - } - - /** - * Returns the <code>Java2WSDLFactory Class</code> - * @return the <code>Class</code> - */ - public Java2WSDLFactory getFactory() { - return factory; } /** 1.24 +18 -40 xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java Index: Types.java =================================================================== RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- Types.java 19 Apr 2002 14:03:14 -0000 1.23 +++ Types.java 28 Apr 2002 18:10:57 -0000 1.24 @@ -56,41 +56,28 @@ package org.apache.axis.wsdl.fromJava; -import org.apache.axis.Constants; import org.apache.axis.AxisFault; -import org.apache.axis.encoding.TypeMapping; +import org.apache.axis.Constants; import org.apache.axis.encoding.Serializer; import org.apache.axis.encoding.SerializerFactory; +import org.apache.axis.encoding.TypeMapping; import org.apache.axis.encoding.ser.BeanSerializerFactory; -import org.apache.axis.utils.XMLUtils; import org.apache.axis.utils.JavaUtils; - +import org.apache.axis.utils.XMLUtils; import org.w3c.dom.Attr; import org.w3c.dom.Document; -import org.w3c.dom.DocumentFragment; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; import org.w3c.dom.NodeList; - - -import java.lang.reflect.Modifier; -import java.lang.reflect.Method; +import javax.wsdl.Definition; +import javax.wsdl.QName; import java.lang.reflect.Field; +import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Vector; import java.util.List; -import javax.wsdl.Definition; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.QName; - -import com.ibm.wsdl.util.xml.DOMUtils; - /** * * <p>Description: </p> This class is used to recursively serializes a Java Class into @@ -112,7 +99,6 @@ HashMap schemaTypes = null; HashMap schemaElementNames = null; HashMap schemaUniqueElementNames = null; - BuilderBeanClassRep beanBuilder = null; List stopClasses = null; /** @@ -123,14 +109,12 @@ * @param defaultTM default TM * @param namespaces user defined or autogenerated namespace and prefix maps * @param targetNamespace targetNamespace of the document - * @param factory Java2WSDLFactory */ public Types(Definition def, TypeMapping tm, TypeMapping defaultTM, Namespaces namespaces, String targetNamespace, - Java2WSDLFactory factory, List stopClasses) { this.def = def; createDocumentFragment(); @@ -142,7 +126,6 @@ schemaElementNames = new HashMap(); schemaUniqueElementNames = new HashMap(); schemaTypes = new HashMap(); - beanBuilder = factory.getBuilderBeanClassRep(); } /** @@ -260,7 +243,7 @@ String lcl = getLocalNameFromFullName(javaType.getName()); String ns = namespaces.getCreate(pkg); - String pre = namespaces.getCreatePrefix(ns); + namespaces.getCreatePrefix(ns); String localPart = lcl.replace('$', '_'); qName = new javax.xml.rpc.namespace.QName(ns, localPart); } @@ -639,15 +622,17 @@ * @param qName the namespace for the generated element * @return elementname */ - private String generateUniqueElementName(QName qName) { - Integer count = (Integer)schemaUniqueElementNames.get(qName.getNamespaceURI()); - if (count == null) - count = new Integer(0); - else - count = new Integer(count.intValue() + 1); - schemaUniqueElementNames.put(qName.getNamespaceURI(), count); - return "el" + count.intValue(); - } +// *** NOT USED? *** +// +// private String generateUniqueElementName(QName qName) { +// Integer count = (Integer)schemaUniqueElementNames.get(qName.getNamespaceURI()); +// if (count == null) +// count = new Integer(0); +// else +// count = new Integer(count.intValue() + 1); +// schemaUniqueElementNames.put(qName.getNamespaceURI(), count); +// return "el" + count.intValue(); +// } /** * Add the type to an ArrayList and return true if the Schema node @@ -764,13 +749,6 @@ */ public List getStopClasses() { return stopClasses; - } - - /** - * Return the class rep that allows users to build their own beans - */ - public BuilderBeanClassRep getBeanBuilder() { - return beanBuilder; } /** 1.11 +0 -10 xml-axis/java/test/wsdl/Java2WsdlAntTask.java Index: Java2WsdlAntTask.java =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/Java2WsdlAntTask.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Java2WsdlAntTask.java 15 Apr 2002 02:35:58 -0000 1.10 +++ Java2WsdlAntTask.java 28 Apr 2002 18:10:57 -0000 1.11 @@ -58,7 +58,6 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; -import org.apache.axis.encoding.TypeMapping; import org.apache.axis.encoding.DefaultTypeMappingImpl; import org.apache.axis.encoding.DefaultSOAP12TypeMappingImpl; @@ -80,7 +79,6 @@ private String className = "." ; private String servicePortName = null ; private String implClass = null; - private String factory = null; private boolean useInheritedMethods = false; private String exclude = null; private String stopClasses = null; @@ -96,7 +94,6 @@ log("\toutput:" + output, Project.MSG_VERBOSE); log("\tclassName:" + className, Project.MSG_VERBOSE); log("\timplClass:" + implClass, Project.MSG_VERBOSE); - log("\tfactory:" + factory, Project.MSG_VERBOSE); log("\tinheritance:" + useInheritedMethods, Project.MSG_VERBOSE); log("\texcluded:" + exclude, Project.MSG_VERBOSE); log("\tstopClasses:" + stopClasses, Project.MSG_VERBOSE); @@ -114,8 +111,6 @@ emitter.setCls(className); if (implClass != null) emitter.setImplCls(implClass); - if (factory != null) - emitter.setFactory(factory); if (exclude != null) emitter.setDisallowedMethods(exclude); if (stopClasses != null) @@ -157,11 +152,6 @@ // The setter for the "implClass" attribute public void setImplClass(String parameter) { this.implClass = parameter; - } - - // The setter for the "factory" attribute - public void setFactory(String parameter) { - this.factory = parameter; } // The setter for the "servicePortName" attribute