Thomas,
I am unable to run the functional tests...Can you please cross-check with latest CVS? 
Also, please
run a "cvs diff -u" from xml-axis/java/src directory and post the output instead of 
zipping up the
whole file next time. Yes, you can zip up files that are not present currently in cvs.

Russell,
See enclosed cvs diff -u from the latest cvs....You would also need
AttributeSerializationContextImpl.java from Thomas's zip file.

Thanks,
dims

--- Thomas Sandholm <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I have been working on extending the doc/literal implementation in Axis to 
> handle the processing of arbitrary XML fragments defined as xsd:any 
> namespace="##any" in a more flexible manner. I would be grateful if someone 
> from the committer team could have a look at it and commit it to the Axis 
> code base. I have made my changes to a version of Axis checked out earlier 
> today, and I have run all the functional tests successfully with my patches 
> applied.
> 
> You can download the files I had to modify from here:
> http://www.mcs.anl.gov/~sandholm/axis/axis-literal-patch.zip
> 
> Please feel free to email me or call me if you need more details on why the 
> various changes had to be made.
> 
> (1) Summary of files modified:
> 
> org/apache/axis/wsdl/WSDL2Java.java
> org/apache/axis/wsdl/toJava/Emitter.java
> org/apache/axis/wsdl/toJava/JavaInterfaceWriter.java
> org/apache/axis/wsdl/toJava/JavaServiceIfaceWriter.java
> org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java
> org/apache/axis/wsdl/toJava/JavaStubWriter.java
> org/apache/axis/wsdl/toJava/JavaImplWriter.java
> org/apache/axis/wsdl/toJava/JavaSkelWriter.java
> org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java
> org/apache/axis/wsdl/toJava/JavaWriterFactory.java
> org/apache/axis/wsdl/toJava/SchemaUtils.java
> org/apache/axis/utils/resources.properties
> org/apache/axis/encoding/AttributeSerializationContextImpl.java
> org/apache/axis/encoding/ser/BeanSerializer.java
> org/apache/axis/encoding/ser/BeanDeserializer.java
> org/apache/axis/encoding/ser/ElementDeserializer.java
> org/apache/axis/encoding/ser/ElementSerializer.java
> org/apache/axis/message/RPCHandler.java
> 
> (2) Making client and service interface independent of encoding/binding 
> mechanism used
> 
> Section 6 JAX-RPC: "The JAX-RPC specification requires that the above 
> requirements based on the operation
> style should be hidden from the JAX-RPC programming model. A JAX-RPC
> implementation should take the responsibility for the appropriate 
> representation of a
> SOAP message based on the operation style."
> 
> My interpretation of this is that we would like to be able to use the same 
> proxy interface for both the doc/literal and the encoded model. This is not 
> possible if the Binding name is present in the interface, so I added a 
> switch to WSDL2Java to allow use of the PortType name for the interface 
> even in literal mode. I couldn't find anything in JAX-RPC saying that this 
> model was not allowed. And in fact we just moved our entire code base from 
> encoded to doc literal mode while maintaining the exact same interfaces, 
> thus making the move transparent to our users.
> 
> org/apache/axis/wsdl/
> -----------------------
> WSD2Java.java
> -added -m option to force usage of portType name for interface
> 
> org/apache/axis/wsdl/toJava/
> ----------------------------
> Emitter.java
> -added get/set maintainPortYpe variable
> 
> JavaInterfaceWriter.java
> -added check for emitter getMaintainPortType
> 
> JavaServiceIfaceWriter.java
> -added check for emitter getMaintainPortType
> 
> JavaServiceImplWriter.java
> -added check for emitter getMaintainPortType
> 
> JavaStubWriter.java
> -added check for emitter getMaintainPortType
> 
> JavaImplWriter.java
> -added check for emitter getMaintainPortType
> 
> JavaSkelWriter.java
> -added check for emitter getMaintainPortType
> 
> JavaTestCaseWriter.java
> -added check for emitter getMaintainPortType
> 
> JavaWriterFactory.java
> -added check for emitter getMaintainPortType
> 
> org/apache/axis/utils/
> -----------------------
> resources.properties
> -added optionMaintainPortType00 message
> 
> (3) Support of <xsd:any namespace="##any"/>
> 
> org/apache/axis/wsdl/toJava/
> ----------------------------
> SchemaUtils.java
> -added any support within sequence elements - generates java.lang.Object 
> member with name 'any' and empty namespace
> 
> org/apache/axis/encoding/ser/
> -----------------------------
> BeanSerializer.java
> -suppress any namespace="##any" element tags
> 
> BeanDeserializer.java
> -recognize xsd:any elements and try to desarialize them
> -must callonStartElement on simple attribute deserializer otherwise QName 
> deserializer will throw null pointer exception
> 
> ElementDeserializer.java
> -if BeanDeserializer failed to deserialize xsd:any property serialize the 
> whole xml element as is
> 
> ElementSerializer.java
> -suppress any namespace="##any" element tags
> 
> 
> (4) Recognizing Elements on the wire
> 
> org/apache/axis/message/
> -----------------------
> RPCHandler.java
> -added check for typemappings against on the wire element QName
> 
> 
> (4) Correctly Serializing simple types in BeanFields as XML schema 
> Attributes (caused problems with Date and QName before)
> 
> org/apache/axis/encoding/ser/
> -----------------------------
> BeanSerializer.java
> -added use of AttributeSerializationContextImpl
> 
> org/apache/axis/encoding/
> --------------------------
> AttributeSerializationContextImpl.java
> -new file added to suppress element tag serialization for attributes and 
> delegate qName2String calls to parent context
> 
> /Thomas
> 
> ---
> Thomas Sandholm <[EMAIL PROTECTED]>
> The Globus Project(tm) <http://www.globus.org>
> Ph: 630-252-1682, Fax: 630-252-1997
> Argonne National Laboratory
> 


=====
Davanum Srinivas - http://xml.apache.org/~dims/

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com
cvs diff -u (in directory D:\JAKARTA\xml-axis.new\java\src)
? org/apache/axis/encoding/AttributeSerializationContextImpl.java
cvs server: Diffing .
cvs server: Diffing javax
cvs server: Diffing javax/xml
cvs server: Diffing javax/xml/messaging
cvs server: Diffing javax/xml/rpc
cvs server: Diffing javax/xml/rpc/encoding
cvs server: Diffing javax/xml/rpc/handler
cvs server: Diffing javax/xml/rpc/handler/soap
cvs server: Diffing javax/xml/rpc/holders
cvs server: Diffing javax/xml/rpc/namespace
cvs server: Diffing javax/xml/rpc/server
cvs server: Diffing javax/xml/rpc/soap
cvs server: Diffing javax/xml/soap
cvs server: Diffing javax/xml/transform
cvs server: Diffing org
cvs server: Diffing org/apache
cvs server: Diffing org/apache/axis
cvs server: Diffing org/apache/axis/attachments
cvs server: Diffing org/apache/axis/client
cvs server: Diffing org/apache/axis/configuration
cvs server: Diffing org/apache/axis/deployment
cvs server: Diffing org/apache/axis/deployment/v2dd
cvs server: Diffing org/apache/axis/deployment/v2dd/providers
cvs server: Diffing org/apache/axis/deployment/wsdd
cvs server: Diffing org/apache/axis/deployment/wsdd/providers
cvs server: Diffing org/apache/axis/deployment/wsml
cvs server: Diffing org/apache/axis/description
cvs server: Diffing org/apache/axis/encoding
cvs server: Diffing org/apache/axis/encoding/ser
Index: org/apache/axis/encoding/ser/BeanDeserializer.java
===================================================================
RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/BeanDeserializer.java,v
retrieving revision 1.22
diff -u -r1.22 BeanDeserializer.java
--- org/apache/axis/encoding/ser/BeanDeserializer.java  1 May 2002 22:06:47 -0000      
 1.22
+++ org/apache/axis/encoding/ser/BeanDeserializer.java  6 May 2002 16:30:09 -0000
@@ -55,6 +55,8 @@
 
 package org.apache.axis.encoding.ser;
 
+import org.apache.axis.MessageContext;
+import org.apache.axis.Constants;
 import org.apache.axis.description.TypeDesc;
 import org.apache.axis.encoding.DeserializationContext;
 import org.apache.axis.encoding.Deserializer;
@@ -72,6 +74,7 @@
 import javax.xml.rpc.namespace.QName;
 import java.io.Serializable;
 import java.util.HashMap;
+import java.util.Iterator;
 
 /**
  * General purpose deserializer for an arbitrary java bean.
@@ -181,7 +184,7 @@
         // code attempts to get the meta data from the base class.  
         // (this fix does not work in all cases, but is necessary to 
         // get comprehensive tests Animal - Cat inheritance to work).
-        if (propDesc == null) {
+        if (propDesc == null) { 
             Class superClass = javaType;
             while (superClass != null && propDesc == null) {
                 superClass = superClass.getSuperclass(); 
@@ -204,6 +207,25 @@
                 }
             }
         }
+        // try and see if this is an xsd:any namespace="##any" element before 
+reporting a problem
+        QName qn = null;
+        Deserializer dSer = null;
+        MessageContext messageContext = context.getMessageContext();
+        if (propDesc == null && !messageContext.isEncoded()) {
+            // try to put unknown elements into an Object property
+            propDesc = getObjectPropertyDesc(elemQName, context);
+            if (propDesc != null) {
+                dSer = context.getDeserializerForType(elemQName);
+                if (dSer == null)  {
+                    qn = Constants.XSD_ANYTYPE;
+                    // make sure that the Element Deserializer deserializes the 
+current element and not the child
+                    messageContext.setProperty("DeserializeCurrentElement", 
+Boolean.TRUE);
+                } else {
+                    qn = elemQName;
+                }
+            }
+        }
+
 
         if (propDesc == null) {
             // No such field
@@ -215,10 +237,14 @@
         // Determine the QName for this child element.
         // Look at the type attribute specified.  If this fails,
         // use the javaType of the property to get the type qname.
-        QName qn = context.getTypeFromAttributes(namespace, localName, attributes);
+        if (qn == null) {
+            qn = context.getTypeFromAttributes(namespace, localName, attributes);
+        }
         
         // get the deserializer
-        Deserializer dSer = context.getDeserializerForType(qn);
+        if (dSer == null) {
+            dSer = context.getDeserializerForType(qn);
+        }
         
         // If no deserializer, use the base DeserializerImpl.
         // There may not be enough information yet to choose the
@@ -249,6 +275,17 @@
         return (SOAPHandler)dSer;
     }
 
+     public BeanPropertyDescriptor getObjectPropertyDesc(QName qname, 
+DeserializationContext context) {
+        for (Iterator iterator = propertyMap.values().iterator(); 
+iterator.hasNext();) {
+            BeanPropertyDescriptor propertyDesc = (BeanPropertyDescriptor) 
+iterator.next();
+            // try to find xsd:any namespace="##any" property
+            if (propertyDesc.getName().equals("any") && 
+propertyDesc.getType().getName().equals("java.lang.Object")) {
+                return propertyDesc;
+            }
+        }
+        return null;
+    }
+
     /**
      * Set the bean properties that correspond to element attributes.
      * 
@@ -320,6 +357,7 @@
                 // Success!  Create an object from the string and set
                 // it in the bean
                 try {
+                    dSer.onStartElement(namespace, localName, qName, attributes, 
+context);
                     Object val = ((SimpleDeserializer)dSer).
                         makeValue(attributes.getValue(i));
                     bpd.set(value, val);
Index: org/apache/axis/encoding/ser/BeanSerializer.java
===================================================================
RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/BeanSerializer.java,v
retrieving revision 1.29
diff -u -r1.29 BeanSerializer.java
--- org/apache/axis/encoding/ser/BeanSerializer.java    28 Apr 2002 18:10:56 -0000     
 1.29
+++ org/apache/axis/encoding/ser/BeanSerializer.java    6 May 2002 16:30:09 -0000
@@ -60,6 +60,7 @@
 import org.apache.axis.description.FieldDesc;
 import org.apache.axis.description.TypeDesc;
 import org.apache.axis.encoding.SerializationContext;
+import org.apache.axis.encoding.AttributeSerializationContextImpl;
 import org.apache.axis.encoding.Serializer;
 import org.apache.axis.utils.BeanPropertyDescriptor;
 import org.apache.axis.utils.BeanUtils;
@@ -74,6 +75,7 @@
 import javax.xml.rpc.namespace.QName;
 import java.io.IOException;
 import java.io.Serializable;
+import java.io.StringWriter;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Modifier;
 import java.util.List;
@@ -125,7 +127,14 @@
         // properties are actually attributes, add those to the element
         // attribute list
         Attributes beanAttrs = getObjectAttributes(value, attributes, context);
-        context.startElement(name, beanAttrs);
+
+        // check whether we have and xsd:any namespace="##any" type
+        boolean suppressElement = !context.getMessageContext().isEncoded() &&
+                                  name.getNamespaceURI().equals("") && 
+                                  name.getLocalPart().equals("any");
+
+        if (!suppressElement) 
+            context.startElement(name, beanAttrs);
 
         try {
             // Serialize each property
@@ -133,7 +142,6 @@
                 String propName = propertyDescriptor[i].getName();
                 if (propName.equals("class"))
                     continue;
-
                 QName qname = null;
 
                 // If we have type metadata, check to see what we're doing
@@ -203,7 +211,8 @@
             throw new IOException(e.toString());
         }
 
-        context.endElement();
+        if (!suppressElement) 
+            context.endElement();
     }
 
 
@@ -407,15 +416,7 @@
                     // the attribute may be more sophisticated.  For example, don't
                     // serialize if the attribute matches the default value.
                     if (propValue != null) {
-                        String propString = propValue.toString();
-                        String namespace = qname.getNamespaceURI();
-                        String localName = qname.getLocalPart();
-
-                        attrs.addAttribute(namespace,
-                                           localName,
-                                           context.qName2String(qname),
-                                           "CDATA",
-                                           propString);
+                        setAttributeProperty(propValue, qname, attrs, context);
                     } 
                 }
             }
@@ -426,4 +427,25 @@
 
         return attrs;
     }
+
+    private void setAttributeProperty(Object propValue, 
+                                      QName qname, 
+                                      AttributesImpl attrs, 
+                                      SerializationContext context) throws Exception {
+        StringWriter writer = new StringWriter();
+        SerializationContext attributeContext = new 
+AttributeSerializationContextImpl(writer, context);
+        attributeContext.serialize(qname,
+                                   null,
+                                   propValue, propValue.getClass());
+        writer.close();
+        String propString = writer.getBuffer().toString();
+        String namespace = qname.getNamespaceURI();
+        String localName = qname.getLocalPart();
+
+        attrs.addAttribute(namespace,
+                           localName,
+                           context.qName2String(qname),
+                           "CDATA",
+                           propString);
+    } 
 }
Index: org/apache/axis/encoding/ser/ElementDeserializer.java
===================================================================
RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/ElementDeserializer.java,v
retrieving revision 1.3
diff -u -r1.3 ElementDeserializer.java
--- org/apache/axis/encoding/ser/ElementDeserializer.java       25 Feb 2002 17:38:15 
-0000      1.3
+++ org/apache/axis/encoding/ser/ElementDeserializer.java       6 May 2002 16:30:09 
+-0000
@@ -64,8 +64,9 @@
 
 import java.util.ArrayList;
 
-import org.apache.axis.message.MessageElement ;
-import org.apache.axis.message.SOAPHandler ;
+import org.apache.axis.MessageContext;
+import org.apache.axis.message.MessageElement;
+import org.apache.axis.message.SOAPHandler;
 
 import org.apache.axis.encoding.Serializer;
 import org.apache.axis.encoding.SerializerFactory;
@@ -98,6 +99,13 @@
         try {
             MessageElement msgElem = context.getCurElement();
             if ( msgElem != null ) {
+                MessageContext messageContext = context.getMessageContext();
+                Boolean currentElement = (Boolean) 
+messageContext.getProperty("DeserializeCurrentElement");
+                if (currentElement != null && currentElement.booleanValue()) {
+                    value = msgElem.getAsDOM();
+                    messageContext.setProperty("SerializeCurrentElement", 
+Boolean.FALSE);
+                    return;
+                }
                 ArrayList children = msgElem.getChildren();
                 if ( children != null ) {
                     msgElem = (MessageElement) children.get(0);
Index: org/apache/axis/encoding/ser/ElementSerializer.java
===================================================================
RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/ElementSerializer.java,v
retrieving revision 1.2
diff -u -r1.2 ElementSerializer.java
--- org/apache/axis/encoding/ser/ElementSerializer.java 2 Feb 2002 18:06:18 -0000      
 1.2
+++ org/apache/axis/encoding/ser/ElementSerializer.java 6 May 2002 16:30:09 -0000
@@ -93,9 +93,16 @@
         if (!(value instanceof Element))
             throw new IOException(JavaUtils.getMessage("cantSerialize01"));
 
-        context.startElement(name, attributes);
+        // suppress xsd:any namespace="##any" elements
+        boolean suppressElement = (!context.getMessageContext().isEncoded() && 
+                                   name.getNamespaceURI().equals("") &&
+                                   name.getLocalPart().equals("any")); 
+
+        if (!suppressElement)
+            context.startElement(name, attributes);
         context.writeDOMElement((Element)value);
-        context.endElement();
+        if (!suppressElement)
+            context.endElement();
     }
 
     public String getMechanismType() { return Constants.AXIS_SAX; }
cvs server: Diffing org/apache/axis/handlers
cvs server: Diffing org/apache/axis/handlers/http
cvs server: Diffing org/apache/axis/handlers/soap
cvs server: Diffing org/apache/axis/message
Index: org/apache/axis/message/RPCHandler.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/RPCHandler.java,v
retrieving revision 1.35
diff -u -r1.35 RPCHandler.java
--- org/apache/axis/message/RPCHandler.java     23 Apr 2002 03:54:26 -0000      1.35
+++ org/apache/axis/message/RPCHandler.java     6 May 2002 16:30:09 -0000
@@ -217,6 +217,9 @@
           return( (SOAPHandler) new DeserializerImpl() );
         
         Deserializer dser;
+        if ((type == null) && (namespace != null) && (!namespace.equals(""))) {
+            type = qname;
+        }
         if (type != null) {
             dser = context.getDeserializerForType(type);
         } else {
cvs server: Diffing org/apache/axis/providers
cvs server: Diffing org/apache/axis/providers/java
cvs server: Diffing org/apache/axis/security
cvs server: Diffing org/apache/axis/security/servlet
cvs server: Diffing org/apache/axis/security/simple
cvs server: Diffing org/apache/axis/server
cvs server: Diffing org/apache/axis/session
cvs server: Diffing org/apache/axis/soap
cvs server: Diffing org/apache/axis/strategies
cvs server: Diffing org/apache/axis/transport
cvs server: Diffing org/apache/axis/transport/http
cvs server: Diffing org/apache/axis/transport/local
cvs server: Diffing org/apache/axis/utils
Index: org/apache/axis/utils/resources.properties
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/resources.properties,v
retrieving revision 1.94
diff -u -r1.94 resources.properties
--- org/apache/axis/utils/resources.properties  1 May 2002 19:52:45 -0000       1.94
+++ org/apache/axis/utils/resources.properties  6 May 2002 16:30:10 -0000
@@ -451,6 +451,10 @@
 optionTest00=emit junit testcase class for web service
 
 optionVerbose00=print informational messages
+
+optionMaintainPortType00=generate a port type interface based on the port type name 
+even for literal bindings
+
+
 outMsg00=Out message: {0}
 params00=Parameters are:  {0}
 parent00=parent
cvs server: Diffing org/apache/axis/utils/bytecode
cvs server: Diffing org/apache/axis/utils/cache
cvs server: Diffing org/apache/axis/utils/compiler
cvs server: Diffing org/apache/axis/wsdl
Index: org/apache/axis/wsdl/WSDL2Java.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/WSDL2Java.java,v
retrieving revision 1.24
diff -u -r1.24 WSDL2Java.java
--- org/apache/axis/wsdl/WSDL2Java.java 15 Apr 2002 02:35:58 -0000      1.24
+++ org/apache/axis/wsdl/WSDL2Java.java 6 May 2002 16:30:11 -0000
@@ -106,6 +106,7 @@
     protected static final int HELPER_CLASS_OPT = 'H';
     protected static final int USERNAME_OPT = 'U';
     protected static final int PASSWORD_OPT = 'P';
+    protected static final int MAINTAIN_PORT_TYPE_OPT = 'm';
 
 
     // Scope constants
@@ -210,7 +211,11 @@
         new CLOptionDescriptor("password",
                 CLOptionDescriptor.ARGUMENT_REQUIRED,
                 PASSWORD_OPT,
-                JavaUtils.getMessage("optionPassword"))
+                JavaUtils.getMessage("optionPassword")),
+        new CLOptionDescriptor("maintainPortTypeInterface",
+                CLOptionDescriptor.ARGUMENT_DISALLOWED,
+                MAINTAIN_PORT_TYPE_OPT,
+                JavaUtils.getMessage("optionMaintainPortType00"))
     };
 
     /**
@@ -441,6 +446,13 @@
     public void setPassword(String password) {
         this.password = password;
     }
+
+    /**
+     * Force literal bindings to use port type interface
+     */
+    public void setMaintainPortType() {
+        emitter.setMaintainPortType();
+    }
     //
     // Command line switches
     //
@@ -671,6 +683,10 @@
 
                     case PASSWORD_OPT:
                         wsdl2java.setPassword(option.getArgument());
+                        break;
+
+                    case MAINTAIN_PORT_TYPE_OPT:
+                        wsdl2java.setMaintainPortType();
                         break;
                         
                 }
cvs server: Diffing org/apache/axis/wsdl/fromJava
cvs server: Diffing org/apache/axis/wsdl/toJava
Index: org/apache/axis/wsdl/toJava/Emitter.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java,v
retrieving revision 1.32
diff -u -r1.32 Emitter.java
--- org/apache/axis/wsdl/toJava/Emitter.java    16 Apr 2002 20:26:32 -0000      1.32
+++ org/apache/axis/wsdl/toJava/Emitter.java    6 May 2002 16:30:11 -0000
@@ -114,6 +114,8 @@
     protected String currentWSDLURI = null;
     protected String NStoPkgFilename = "NStoPkg.properties";
     protected File NStoPkgFile = null;
+    protected boolean maintainPortType = false;
+
 
     /**
      * Default constructor.
@@ -407,6 +409,16 @@
      */
     public void setOutputDir(String outputDir) {
         this.outputDir = outputDir;
+    }
+
+    /**
+    * Force PortType to be used as stub interface even for doc/lit bindings
+    */
+    public void setMaintainPortType() {
+        this.maintainPortType = true;
+    }
+    public boolean getMaintainPortType() {
+        return this.maintainPortType;
     }
 
     /**
Index: org/apache/axis/wsdl/toJava/JavaImplWriter.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaImplWriter.java,v
retrieving revision 1.16
diff -u -r1.16 JavaImplWriter.java
--- org/apache/axis/wsdl/toJava/JavaImplWriter.java     8 Apr 2002 23:18:45 -0000      
 1.16
+++ org/apache/axis/wsdl/toJava/JavaImplWriter.java     6 May 2002 16:30:11 -0000
@@ -114,7 +114,7 @@
 
         // If there is not literal use, the interface name is the portType name.
         // Otherwise it is the binding name.
-        String portTypeName = bEntry.hasLiteral() ?
+        String portTypeName = (bEntry.hasLiteral() && !emitter.getMaintainPortType()) 
+?
                 bEntry.getName() : ptEntry.getName();
         pw.print("public class " + className + " implements " + portTypeName);
         pw.println(" {");
Index: org/apache/axis/wsdl/toJava/JavaInterfaceWriter.java
===================================================================
RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaInterfaceWriter.java,v
retrieving revision 1.6
diff -u -r1.6 JavaInterfaceWriter.java
--- org/apache/axis/wsdl/toJava/JavaInterfaceWriter.java        14 Feb 2002 14:59:31 
-0000      1.6
+++ org/apache/axis/wsdl/toJava/JavaInterfaceWriter.java        6 May 2002 16:30:11 
+-0000
@@ -89,7 +89,7 @@
 
         // If there is literal use in this binding, then the interface name is
         // derived from the binding name, not the portType name (the default).
-        if (bEntry.hasLiteral()) {
+        if (bEntry.hasLiteral() &&!emitter.getMaintainPortType()) {
             super.className = Utils.getJavaLocalName(bEntry.getName());
             super.fileName = className + ".java";
         }
Index: org/apache/axis/wsdl/toJava/JavaServiceIfaceWriter.java
===================================================================
RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceIfaceWriter.java,v
retrieving revision 1.1
diff -u -r1.1 JavaServiceIfaceWriter.java
--- org/apache/axis/wsdl/toJava/JavaServiceIfaceWriter.java     5 Feb 2002 16:22:40 
-0000       1.1
+++ org/apache/axis/wsdl/toJava/JavaServiceIfaceWriter.java     6 May 2002 16:30:11 
+-0000
@@ -142,7 +142,7 @@
 
             // If there is not literal use, the interface name is the portType name.
             // Otherwise it is the binding name.
-            String bindingType = bEntry.hasLiteral() ?
+            String bindingType = (bEntry.hasLiteral() && 
+!emitter.getMaintainPortType()) ?
                     bEntry.getName() : ptEntry.getName();
 
             // Write out the get<PortName> methods
Index: org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java
===================================================================
RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java,v
retrieving revision 1.8
diff -u -r1.8 JavaServiceImplWriter.java
--- org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java      21 Mar 2002 14:28:53 
-0000      1.8
+++ org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java      6 May 2002 16:30:11 
+-0000
@@ -152,7 +152,7 @@
 
             // If there is not literal use, the interface name is the portType name.
             // Otherwise it is the binding name.
-            String bindingType = bEntry.hasLiteral() ?
+            String bindingType = (bEntry.hasLiteral() && 
+!emitter.getMaintainPortType()) ?
                     bEntry.getName() : ptEntry.getName();
 
             // getPort(Class) must return a stub for an interface.  Collect all
Index: org/apache/axis/wsdl/toJava/JavaSkelWriter.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaSkelWriter.java,v
retrieving revision 1.21
diff -u -r1.21 JavaSkelWriter.java
--- org/apache/axis/wsdl/toJava/JavaSkelWriter.java     15 Apr 2002 02:35:58 -0000     
 1.21
+++ org/apache/axis/wsdl/toJava/JavaSkelWriter.java     6 May 2002 16:30:11 -0000
@@ -107,7 +107,7 @@
 
         // If there is not literal use, the interface name is the portType name.
         // Otherwise it is the binding name.
-        String portTypeName = bEntry.hasLiteral() ?
+        String portTypeName = (bEntry.hasLiteral() && !emitter.getMaintainPortType()) 
+?
                 bEntry.getName () : ptEntry.getName();
         boolean isRPC = true;
         if (bEntry.getBindingStyle() == BindingEntry.STYLE_DOCUMENT) {
Index: org/apache/axis/wsdl/toJava/JavaStubWriter.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
retrieving revision 1.55
diff -u -r1.55 JavaStubWriter.java
--- org/apache/axis/wsdl/toJava/JavaStubWriter.java     16 Apr 2002 20:26:32 -0000     
 1.55
+++ org/apache/axis/wsdl/toJava/JavaStubWriter.java     6 May 2002 16:30:11 -0000
@@ -110,7 +110,7 @@
 
         // If there is not literal use, the interface name is the portType name.
         // Otherwise it is the binding name.
-        String portTypeName = bEntry.hasLiteral() ?
+        String portTypeName = (bEntry.hasLiteral() && !emitter.getMaintainPortType()) 
+?
                 bEntry.getName() : ptEntry.getName();
         boolean isRPC = true;
         if (bEntry.getBindingStyle() == BindingEntry.STYLE_DOCUMENT) {
Index: org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java
===================================================================
RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java,v
retrieving revision 1.22
diff -u -r1.22 JavaTestCaseWriter.java
--- org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java 1 May 2002 17:17:15 -0000      
 1.22
+++ org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java 6 May 2002 16:30:11 -0000
@@ -174,7 +174,7 @@
 
             // If there is not literal use, the interface name is the portType name.
             // Otherwise it is the binding name.
-            String bindingType = bEntry.hasLiteral() ?
+            String bindingType = (bEntry.hasLiteral() && 
+!emitter.getMaintainPortType()) ?
                     bEntry.getName() : ptEntry.getName();
             writeBindingAssignment(bindingType, portName);
 
Index: org/apache/axis/wsdl/toJava/JavaWriterFactory.java
===================================================================
RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaWriterFactory.java,v
retrieving revision 1.22
diff -u -r1.22 JavaWriterFactory.java
--- org/apache/axis/wsdl/toJava/JavaWriterFactory.java  5 Apr 2002 21:24:32 -0000      
 1.22
+++ org/apache/axis/wsdl/toJava/JavaWriterFactory.java  6 May 2002 16:30:11 -0000
@@ -328,7 +328,7 @@
                             // If there IS literal use, then the SDI will be
                             // named after the binding name, so there is the
                             // possibility of a name clash.
-                            if (bEntry.hasLiteral()) {
+                            if (bEntry.hasLiteral() && 
+!emitter.getMaintainPortType()) {
                                 entry.setName(mangleName(entry.getName(),
                                         "_Binding"));
                             }
Index: org/apache/axis/wsdl/toJava/SchemaUtils.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/SchemaUtils.java,v
retrieving revision 1.20
diff -u -r1.20 SchemaUtils.java
--- org/apache/axis/wsdl/toJava/SchemaUtils.java        4 Apr 2002 19:17:12 -0000      
 1.20
+++ org/apache/axis/wsdl/toJava/SchemaUtils.java        6 May 2002 16:30:11 -0000
@@ -265,6 +265,12 @@
                     v.addAll(processSequenceNode(children.item(j), symbolTable));
                 } else if (subNodeKind.getLocalPart().equals("group")) {
                     v.addAll(processGroupNode(children.item(j), symbolTable));
+                } else if (subNodeKind.getLocalPart().equals("any")) {
+                    TypeEntry type = 
+(TypeEntry)symbolTable.getTypeEntry(Utils.getWSDLQName(Constants.XSD_ANYTYPE), 
+false); 
+                    if (type != null) {
+                        ElementDecl elem = new ElementDecl(type, 
+Utils.getAxisQName(new QName("","any")));
+                        v.add(elem);
+                    }
                 } else if (subNodeKind.getLocalPart().equals("element")) {
                     ElementDecl elem = 
                             processChildElementNode(children.item(j), 


Reply via email to