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 bu...@apache.org on 2002/07/24 18:15:06 UTC

cvs commit: xml-axis/java/test/wsdl/attachments mime.wsdl

butek       2002/07/24 09:15:05

  Modified:    java     TODO.txt
               java/src/org/apache/axis/enum Enum.java
               java/src/org/apache/axis/providers/java RPCProvider.java
               java/src/org/apache/axis/utils JavaUtils.java
               java/src/org/apache/axis/wsdl/symbolTable BindingEntry.java
                        Parameter.java Parameters.java SymbolTable.java
               java/src/org/apache/axis/wsdl/toJava JavaDeployWriter.java
                        JavaFaultWriter.java JavaGeneratorFactory.java
                        JavaHolderWriter.java JavaSkelWriter.java
                        JavaStubWriter.java JavaTestCaseWriter.java
                        Utils.java
               java/test build_functional_tests.xml
               java/test/wsdl Wsdl2javaTestSuite.xml
  Added:       java/src/org/apache/axis/attachments
                        PlainTextDataSource.java
               java/src/org/apache/axis/holders ImageHolder.java
                        MimeMultipartHolder.java SourceHolder.java
               java/test/wsdl/attachments mime.wsdl
  Log:
  I've done a few things with this commit.
  
  - tidied up TODO.txt, particularly wrt attachment support.
  
  - added Enum.toString - useful for debugging.
  
  - commented out test/wsdl/literal/SalesRankNPrice test since the site has
  expired.
  
  - most important:  initial attachment support in generated code.  This is a
  very crude first step.  It ONLY supports text/plain.  And ONLY in a limited
  scenario (see wsdl/attachment/mime.wsdl).  It's got a long way to go, and
  I'm not completely comfortable that I'm getting there in the right manner, but
  since I've been busy with other things, I wanted to get this out there
  before I lost it.  At least I have a test for what DOES work.
  
  - added org.apache.axis.holders:  ImageHolder, MimeMultipartHolder,
  SourceHolder.  These holders are needed for attachment support but
  were neglected by the spec.
  
  Revision  Changes    Path
  1.68      +5 -57     xml-axis/java/TODO.txt
  
  Index: TODO.txt
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/TODO.txt,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- TODO.txt	1 Jul 2002 21:09:54 -0000	1.67
  +++ TODO.txt	24 Jul 2002 16:15:03 -0000	1.68
  @@ -8,51 +8,6 @@
   
                    * <Glen> Write TO DO list
   
  -BETA 3 MUST DO LIST
  --------------------
  -* <Glen> Update all version messages to beta 3.
  -
  -Bugzillas for beta 3:  must:  must fix; nice:  it would be nice to have; post:  post beta 3; pend:  pending more info, maybe beta 3.  The left column is there to give us a quick picture:  M is a must, _ is anything else, X means the bug is fixed.
  -_ 7132 - nice - Glen
  -_ 7407 - nice - Rich?
  -_ 8419 - post
  -X 8423 - pend - dims
  -_ 8435 - post
  -_ 8476 - must - Rich
  -_ 8480 - pend - Glen
  -_ 8481 - pend - Glen
  -_ 8578 - post
  -_ 8598 - nice - Rich
  -M 8646 - must - ?
  -_ 8680 - close, fixed?
  -_ 9045 - pend - Glen
  -X 9239 - must - dims
  -_ 9393 - must - Rich
  -X 9405 - must - Tom
  -_ 9452 - post
  -_ 9473 - post
  -X 9642 - nice - Russell
  -_ 9659 - pend - Glen
  -_ 9665 - nice - Rich
  -_ 9667 - dup of 9665
  -X 9717 - must - Tom
  -X 9767 - must - Russell
  -_ 9773 - post
  -M 9780 - must - Rick
  -_ 9815 - nice - ?
  -_ 9818 - nice - Rich
  -X 9826 - nice - Glen
  -_ 9874 - nice - dims
  -X 9875 - must - Rich
  -_ 9881 - post
  -_ 9882 - nice - Russell
  -X 9952 - must - Glyn
  -_ 9966 - nice - Tom (like 9717)
  -_ 9967 - nice - Tom (like 9717 and 9966)
  -X 9987 - must - Glyn
  -X 9992 - must - dims
  -_ 10003 - post
  -
   
   MESSAGE PARSING / ENCODING
   --------------------------
  @@ -71,13 +26,13 @@
   
   JAX-RPC COMPATIBILITY
   ---------------------
  +! <Russell> NEVER name the SEI after the binding.  Spec no longer allows it.  Remember to change the user's guide, too.
   ! <> Implement Service.getCalls() method. (maybe)
   ! <> Implement generated Services' getCalls() method.
   ! <> Implement Service.getHandlerRegistry() method.
   ! <> Implement ServiceFactory.createService methods.
   ! <> Implement TypeMapping and TypeMappingRegistry ala JAX-RPC 0.8
   ! <> Implement Handler code ala JAX-RPC 0.8
  -! <> Once we get word that javax.xml.rpc.encoding.XMLType is a real class (it's in the JAX-RPC javadocs but not in the spec) then replace all the constants in org.apache.axis.encoding.XMLType with the JAX-RPC constants.
   ! <> Once we get word that javax.xml.rpc.namespace.NamespaceConstants is a real class (it's in the JAX-RPC javadocs but not in the spec) then use it.
   ! <> Implement javax.xml.rpc.server interfaces.
   ! <> Add some JAX-RPC compliance samples/tests.
  @@ -115,20 +70,14 @@
   
   WSDL2Java
   ---------
  +! <Russell> When wrapped mode is used along with parameterOrder, WSDL2Java complains, wrongly, that the part listed in parameterOrder doesn't exist.  The problem is that, once we recognize wrapped mode, the parameters are now from the complexType, not from the message.
  +! <Russell> If the lowest level that a WSDL contains is the portType, no SEI is generated even though it should be.  This is because we go into the binding to generate the SEI.
   * <> (ongoing) JAX-RPC compliance.  In particular:
  -! <> Mapping of XML names.  We do some, not all, of what JAX-RPC specifies.
  -! <> Faults - What do we handle now?  What needs to be enhanced?  JAX-RPC needs improving, first, we think.
  -X <Rich> Faults - Support v1.0 mapping
  -X <Rich> Derived type support. Including extending abstract complexTypes and extending simpleTypes.
   ! <> Object[] doesn't work.  If we have method(Object[] array) and we pass in an Object[], we get NullPointerExceptions.  If, however, we pass in a String[] or a Phone[] then it works.  Object[] becomes xsd:anyType[].  Since anyType doesn't work, I don't expect anyType[] to work.
   ! <> do we want xsd:anyType to work?
  -X <Russell> with the --all flag, ALL types should be registered in the Stub.
  -
   * <Russell> (ongoing) Need to pull everything writer-specific out of the framework(Emitter/SymbolTable/etc).  Signatures are still in there.  So are Wsdl2java options that only the writers care about.
   
  -! <> Attachment support.
  -
  -X <Rich/Russell> Name clash resolution has to grow up.
  +* <Russell> Attachment support.
   
   ! <> Automatically creating a package name from a namespace is very limited at the moment.
   
  @@ -149,14 +98,13 @@
   
   * <Russell/Tom> Grow Filegen test.  We now generate code only if it's needed, but this feature isn't well tested yet.
   
  -! <> Do we need a Wsdl2java Exception?
  -
   * <Rich/Tom?> Need to handle collections of objects (max occurs > 1).  Rich did the work for encoding.  Does something still need to be done for literal?
   
   X <Rich> Support for anonymous complexTypes and simpleTypes for elements and attributes.
   
   Java2WSDL
   ---------
  +! <Russell> attachment support to mirror what went into WSDL2Java.
   ! <> When generating from a skeleton, ignore the skeleton meta-data methods.
   ! <Russell?/Rich?> Java2WSDL "void op(boolean b1, Boolean b2)" maps to
      <wsdl:message name="op1Request">
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/attachments/PlainTextDataSource.java
  
  Index: PlainTextDataSource.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.axis.attachments;
  
  import java.io.ByteArrayInputStream;
  import java.io.ByteArrayOutputStream;
  import java.io.InputStream;
  import java.io.IOException;
  import java.io.OutputStream;
  
  import javax.activation.DataSource;
  
  public class PlainTextDataSource implements DataSource {
      public static final String CONTENT_TYPE = "text/plain";
  
      private final String name;
      private byte[] data;
      private ByteArrayInputStream is;
      private ByteArrayOutputStream os;
  
      public PlainTextDataSource(String name, String data) {
          this.name = name;
          this.data = data.getBytes();
          os = new ByteArrayOutputStream();
      } // ctor
  
      public String getName() {
          return name;
      } // getName
  
      public String getContentType() {
          return CONTENT_TYPE;
      } // getContentType
  
      public InputStream getInputStream() throws IOException {
          if (os.size() != 0) {
              data = os.toByteArray();
          }
          return new ByteArrayInputStream(data);
      } // getInputStream
  
      public OutputStream getOutputStream() throws IOException {
          if (os.size() != 0) {
              data = os.toByteArray();
          }
          return new ByteArrayOutputStream();
      } // getOutputStream
  } // class PlainTextDataSource
  
  
  
  1.6       +5 -1      xml-axis/java/src/org/apache/axis/enum/Enum.java
  
  Index: Enum.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/enum/Enum.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Enum.java	3 Jul 2002 17:50:36 -0000	1.5
  +++ Enum.java	24 Jul 2002 16:15:03 -0000	1.6
  @@ -90,7 +90,11 @@
       public final int    getValue() { return value; }
       public final String getName()  { return name; }
       public final Type   getType()  { return type; }
  -    
  +
  +    public String toString() {
  +        return name;
  +    }
  +
       public final boolean equals(Object obj) {
           return (obj != null  &&  obj instanceof Enum)
                  ? _equals((Enum)obj)
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/holders/ImageHolder.java
  
  Index: ImageHolder.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.axis.holders;
  
  import java.awt.Image;
  
  import javax.xml.rpc.holders.Holder;
  
  /**
   * Class ImageHolder
   *
   * @version 1.0
   */
  public final class ImageHolder implements Holder {
  
      /** Field _value */
      public Image value;
  
      /**
       * Constructor ImageHolder
       */
      public ImageHolder() {}
  
      /**
       * Constructor ImageHolder
       *
       * @param value
       */
      public ImageHolder(Image value) {
          this.value = value;
      }
  }
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/holders/MimeMultipartHolder.java
  
  Index: MimeMultipartHolder.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.axis.holders;
  
  import javax.mail.internet.MimeMultipart;
  
  import javax.xml.rpc.holders.Holder;
  
  /**
   * Class MimeMultipartHolder
   *
   * @version 1.0
   */
  public final class MimeMultipartHolder implements Holder {
  
      /** Field _value */
      public MimeMultipart value;
  
      /**
       * Constructor MimeMultipartHolder
       */
      public MimeMultipartHolder() {}
  
      /**
       * Constructor MimeMultipartHolder
       *
       * @param value
       */
      public MimeMultipartHolder(MimeMultipart value) {
          this.value = value;
      }
  }
  
  
  
  1.1                  xml-axis/java/src/org/apache/axis/holders/SourceHolder.java
  
  Index: SourceHolder.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.axis.holders;
  
  import javax.xml.transform.Source;
  
  import javax.xml.rpc.holders.Holder;
  
  /**
   * Class SourceHolder
   *
   * @version 1.0
   */
  public final class SourceHolder implements Holder {
  
      /** Field _value */
      public Source value;
  
      /**
       * Constructor SourceHolder
       */
      public SourceHolder() {}
  
      /**
       * Constructor SourceHolder
       *
       * @param value
       */
      public SourceHolder(Source value) {
          this.value = value;
      }
  }
  
  
  
  1.79      +22 -2     xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java
  
  Index: RPCProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- RPCProvider.java	22 Jul 2002 06:23:01 -0000	1.78
  +++ RPCProvider.java	24 Jul 2002 16:15:03 -0000	1.79
  @@ -58,6 +58,8 @@
   import org.apache.axis.AxisFault;
   import org.apache.axis.Constants;
   import org.apache.axis.MessageContext;
  +import org.apache.axis.attachments.AttachmentPart;
  +import org.apache.axis.attachments.PlainTextDataSource;
   import org.apache.axis.enum.Style;
   import org.apache.axis.description.OperationDesc;
   import org.apache.axis.description.ServiceDesc;
  @@ -74,6 +76,7 @@
   import org.apache.axis.components.logger.LogFactory;
   import org.apache.commons.logging.Log;
   
  +import javax.activation.DataHandler;
   import javax.xml.namespace.QName;
   import javax.xml.rpc.holders.Holder;
   import java.lang.reflect.Method;
  @@ -220,6 +223,7 @@
           for ( int i = 0 ; i < numArgs ; i++ ) {
               RPCParam rpcParam = (RPCParam)args.get(i);
               Object value = rpcParam.getValue();
  +            boolean mimeType = value instanceof AttachmentPart;
               ParameterDesc paramDesc = rpcParam.getParamDesc();
               if (paramDesc != null && paramDesc.getJavaType() != null) {
   
  @@ -230,8 +234,13 @@
                   value = JavaUtils.convert(value,
                                             sigType);
                   rpcParam.setValue(value);
  -                if (paramDesc.getMode() == ParameterDesc.INOUT)
  +                if (paramDesc.getMode() == ParameterDesc.INOUT) {
  +                    if (mimeType) {
  +                        rpcParam.getParamDesc().setTypeQName(
  +                                new QName("", "DataHandler"));
  +                    }
                       outs.add(rpcParam);
  +                }
               }
               if (paramDesc == null || paramDesc.getOrder() == -1) {
                   argValues[i]  = value;
  @@ -332,7 +341,18 @@
                   // We know this has a holder, so just unwrap the value
                   RPCParam param = (RPCParam) i.next();
                   Holder holder = (Holder)param.getValue();
  -                param.setValue(JavaUtils.getHolderValue(holder));
  +                Object value = JavaUtils.getHolderValue(holder);
  +                ParameterDesc paramDesc = param.getParamDesc();
  +                boolean mimeType = paramDesc == null ? false :
  +                        new QName("", "DataHandler").equals(
  +                            paramDesc.getTypeQName());
  +                if (mimeType) {
  +                    if (value instanceof String) {
  +                        value = new DataHandler(
  +                                new PlainTextDataSource("out", (String) value));
  +                    }
  +                }
  +                param.setValue(value);
                   resBody.addParam(param);
               }
           }
  
  
  
  1.61      +15 -0     xml-axis/java/src/org/apache/axis/utils/JavaUtils.java
  
  Index: JavaUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/JavaUtils.java,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- JavaUtils.java	20 Jul 2002 00:30:20 -0000	1.60
  +++ JavaUtils.java	24 Jul 2002 16:15:03 -0000	1.61
  @@ -56,11 +56,13 @@
   package org.apache.axis.utils;
   
   import org.apache.axis.AxisProperties;
  +import org.apache.axis.attachments.AttachmentPart;
   import org.apache.axis.encoding.Hex;
   
   import org.apache.axis.components.logger.LogFactory;
   import org.apache.commons.logging.Log;
   
  +import java.io.IOException;
   import java.lang.reflect.Array;
   import java.lang.reflect.Field;
   import java.text.Collator;
  @@ -81,6 +83,8 @@
   import java.util.List;
   import java.beans.Introspector;
   
  +import javax.xml.soap.SOAPException;
  +
   /** Utility class to deal with Java language related issues, such
    * as type conversions.
    *
  @@ -233,6 +237,17 @@
           // Convert between HashMap and Hashtable
           if (arg instanceof HashMap && destClass == Hashtable.class) {
               return new Hashtable((HashMap)arg);
  +        }
  +
  +        // Convert an AttachmentPart to the given destination class.
  +        if (arg instanceof AttachmentPart && destClass == String.class) {
  +            try {
  +                return ((AttachmentPart)arg).getDataHandler().getContent();
  +            }
  +            catch (IOException ioe) {
  +            }
  +            catch (SOAPException se) {
  +            }
           }
   
           // If the destination is an array and the source
  
  
  
  1.2       +32 -2     xml-axis/java/src/org/apache/axis/wsdl/symbolTable/BindingEntry.java
  
  Index: BindingEntry.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/symbolTable/BindingEntry.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BindingEntry.java	9 May 2002 13:14:27 -0000	1.1
  +++ BindingEntry.java	24 Jul 2002 16:15:03 -0000	1.2
  @@ -56,6 +56,7 @@
   package org.apache.axis.wsdl.symbolTable;
   
   import java.util.HashMap;
  +import java.util.Map;
   
   import javax.wsdl.Binding;
   import javax.wsdl.Operation;
  @@ -85,7 +86,8 @@
       private int     bindingStyle;
       private boolean hasLiteral;
       private HashMap attributes;
  -    private HashMap  parameters = new HashMap ();
  +    private HashMap parameters = new HashMap();
  +    private Map     mimeTypes; 
       
   
       /**
  @@ -94,13 +96,19 @@
        * contain the input/output/fault body type information.
        */
       public BindingEntry(Binding binding, int bindingType, int bindingStyle,
  -            boolean hasLiteral, HashMap attributes) {
  +            boolean hasLiteral, HashMap attributes, Map mimeTypes) {
           super(binding.getQName());
           this.binding = binding;
           this.bindingType = bindingType;
           this.bindingStyle = bindingStyle;
           this.hasLiteral = hasLiteral;
           this.attributes = attributes;
  +        if (mimeTypes == null) {
  +            this.mimeTypes = new HashMap();
  +        }
  +        else {
  +            this.mimeTypes = mimeTypes;
  +        }
       } // ctor
   
       /**
  @@ -123,6 +131,28 @@
       public void setParameters(HashMap parameters) {
           this.parameters = parameters;
       }
  +
  +    /**
  +     * Get the mime mapping for the given parameter name.
  +     * If there is none, this returns null.
  +     */
  +    public String getMIMEType(String parameterName) {
  +        return (String) mimeTypes.get(parameterName);
  +    } // getMIMEType
  +
  +    /**
  +     * Get the MIME types map.
  +     */
  +    public Map getMIMETypes() {
  +        return mimeTypes;
  +    } // getMIMETypes
  +
  +    /**
  +     * Set the mime mapping for the given parameter name.
  +     */
  +    public void setMIMEType(String parameterName, String type) {
  +        mimeTypes.put(parameterName, type);
  +    } // setMIMEType
   
       /**
        * Get this entry's WSDL4J Binding object.
  
  
  
  1.3       +14 -1     xml-axis/java/src/org/apache/axis/wsdl/symbolTable/Parameter.java
  
  Index: Parameter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/symbolTable/Parameter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Parameter.java	20 Jun 2002 20:35:47 -0000	1.2
  +++ Parameter.java	24 Jul 2002 16:15:03 -0000	1.3
  @@ -72,12 +72,17 @@
       
       // The part name of this parameter, just a string.
       private String name;
  +
  +    // The MIME type of this parameter, null if it isn't a MIME type.
  +    private String mimeType = null;
       
       private TypeEntry type;
       private byte mode = IN;
   
       public String toString() {
  -        return "(" + type + ", " + getName() + ", "
  +        return "(" + type
  +                + (mimeType == null ? "" : "(" + mimeType + ")")
  +                + ", " + getName() + ", "
                   + (mode == IN ? "IN)" : mode == INOUT ? "INOUT)" : "OUT)");
       } // toString
   
  @@ -101,6 +106,14 @@
       public void setQName(QName qname) {
           this.qname = qname;
       }
  +
  +    public String getMIMEType() {
  +        return mimeType;
  +    } // getMIMEType
  +
  +    public void setMIMEType(String mimeType) {
  +        this.mimeType = mimeType;
  +    } // setMIMEType
   
       public TypeEntry getType() {
           return type;
  
  
  
  1.3       +3 -0      xml-axis/java/src/org/apache/axis/wsdl/symbolTable/Parameters.java
  
  Index: Parameters.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/symbolTable/Parameters.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Parameters.java	11 Jun 2002 14:54:01 -0000	1.2
  +++ Parameters.java	24 Jul 2002 16:15:03 -0000	1.3
  @@ -74,6 +74,9 @@
       // Used to create the RPCParam for the return value.
       public QName returnName = null;
   
  +    // The MIME type of the return, null if it doesn't exist.
  +    public String returnMIMEType = null;
  +
       // A map of the faults
       public Map faults = null;
   
  
  
  
  1.14      +100 -35   xml-axis/java/src/org/apache/axis/wsdl/symbolTable/SymbolTable.java
  
  Index: SymbolTable.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/symbolTable/SymbolTable.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SymbolTable.java	17 Jul 2002 17:32:56 -0000	1.13
  +++ SymbolTable.java	24 Jul 2002 16:15:04 -0000	1.14
  @@ -86,6 +86,10 @@
   import javax.wsdl.Service;
   import javax.wsdl.WSDLException;
   
  +import javax.wsdl.extensions.mime.MIMEContent;
  +import javax.wsdl.extensions.mime.MIMEMultipartRelated;
  +import javax.wsdl.extensions.mime.MIMEPart;
  +
   import javax.wsdl.factory.WSDLFactory;
   
   import javax.xml.namespace.QName;
  @@ -987,7 +991,6 @@
           if (bindingEntry != null) {
               literalInput = (bindingEntry.getInputBodyType(operation) == BindingEntry.USE_LITERAL);
               literalOutput = (bindingEntry.getOutputBodyType(operation) == BindingEntry.USE_LITERAL);
  -            bindingName = bindingEntry.getBinding().getQName().toString();
           }
           
           // Collect all the input parameters
  @@ -995,7 +998,7 @@
           if (input != null) {
               getParametersFromParts(inputs,
                           input.getMessage().getOrderedParts(null), 
  -                        literalInput, operation.getName(), bindingName);
  +                        literalInput, operation.getName(), bindingEntry);
           }
   
           // Collect all the output parameters
  @@ -1003,7 +1006,7 @@
           if (output != null) {
               getParametersFromParts(outputs,
                           output.getMessage().getOrderedParts(null), 
  -                        literalOutput, operation.getName(), bindingName);
  +                        literalOutput, operation.getName(), bindingEntry);
           }
   
           if (parameterOrder != null) {
  @@ -1048,6 +1051,7 @@
           if (outputs.size() == 1) {
               Parameter returnParam = (Parameter)outputs.get(0);
               parameters.returnType = returnParam.getType();
  +            parameters.returnMIMEType = returnParam.getMIMEType();
               if (parameters.returnType instanceof DefinedElement) {
                   parameters.returnName = 
                           ((DefinedElement)parameters.returnType).getQName();
  @@ -1155,10 +1159,43 @@
                                             Collection parts, 
                                             boolean literal, 
                                             String opName, 
  -                                          String bindingName) 
  +                                          BindingEntry bindingEntry) 
               throws IOException {
           Iterator i = parts.iterator();
   
  +        // Determine if there's only one element.  For wrapped
  +        // style, we normally only have 1 part which is an
  +        // element.  But with MIME we could have any number of
  +        // types along with that single element.  As long as
  +        // there's only ONE element, and it's the same name as
  +        // the operation, we can unwrap it.
  +        int numberOfElements = 0;
  +        boolean possiblyWrapped = false;
  +        while (i.hasNext()) {
  +            Part part = (Part) i.next();
  +            if (part.getElementName() != null) {
  +                ++numberOfElements;
  +                if (part.getElementName().getLocalPart().equals(opName)) {
  +                    possiblyWrapped = true;
  +                }
  +            }
  +        }
  +
  +        // Hack alert - Try to sense "wrapped" document literal mode
  +        // if we haven't been told not to.
  +        // Criteria:
  +        //  - If there is a single element part, 
  +        //  - That part is an element
  +        //  - That element has the same name as the operation
  +        //  - That element has no attributes (check done below)
  +        if (!nowrap &&
  +                literal && 
  +                numberOfElements == 1 &&
  +                possiblyWrapped) {
  +            wrapped = true;
  +        }
  +
  +        i = parts.iterator();
           while (i.hasNext()) {
               Parameter param = new Parameter();
               Part part = (Part) i.next();
  @@ -1166,26 +1203,11 @@
               QName typeName = part.getTypeName();
               String partName = part.getName();
   
  -            // Hack alert - Try to sense "wrapped" document literal mode
  -            // if we haven't been told not to.
  -            // Criteria:
  -            //  - If there is a single part, 
  -            //  - That part is an element
  -            //  - That element has the same name as the operation
  -            //  - That element has no attributes (check done below)
  -            if (!nowrap &&
  -                    literal && 
  -                    !i.hasNext() &&
  -                    elementName != null && 
  -                    elementName.getLocalPart().equals(opName)) {
  -                
  -                wrapped = true;
  -            }
  -            
  -            if (!literal || !wrapped) {
  +            if (!literal || !wrapped || elementName == null) {
                   // We're either RPC or literal + not wrapped.
                   
                   param.setName(partName);
  +                param.setMIMEType(bindingEntry == null ? null : bindingEntry.getMIMEType(partName));
   
                   // Add this type or element name
                   if (typeName != null) {
  @@ -1211,16 +1233,19 @@
               }
               
               // flow to here means literal + wrapped!
  -                
  +
               // See if we can map all the XML types to java(?) types
               // if we can, we use these as the types
               Node node = null;
  -            if (typeName != null) {
  +            if (typeName != null && bindingEntry.getMIMETypes().size() == 0) {
                   // Since we can't (yet?) make the Axis engine generate the right
                   // XML for literal parts that specify the type attribute,
  -                // abort processing with an error if we encounter this case
  +                // (unless they're MIME types) abort processing with an
  +                // error if we encounter this case
                   //
                   // node = getTypeEntry(typeName, false).getNode();
  +                String bindingName =
  +                  bindingEntry == null ? "unknown" : bindingEntry.getBinding().getQName().toString();
                   throw new IOException(
                           JavaUtils.getMessage("literalTypePart00", 
                                                new String[] {partName, 
  @@ -1228,13 +1253,6 @@
                                                              bindingName}));
               }
               
  -            if (elementName == null) {
  -                throw new IOException(
  -                        JavaUtils.getMessage("noElemOrType", 
  -                                             partName, 
  -                                             opName));                
  -            }
  -            
               // Get the node which corresponds to the type entry for this
               // element.  i.e.:
               //  <part name="part" element="foo:bar"/>
  @@ -1277,13 +1295,14 @@
                       SchemaUtils.getContainedElementDeclarations(node, this);
   
               // if we got the types entries and we didn't find attributes
  -            // use the tings is this element as the parameters
  +            // use the things is this element as the parameters
               if (vTypes != null && wrapped) {
                   // add the elements in this list
                   for (int j = 0; j < vTypes.size(); j++) {
                       ElementDecl elem = (ElementDecl) vTypes.elementAt(j);
                       Parameter p = new Parameter();
                       p.setQName(elem.getName());
  +                    p.setMIMEType(bindingEntry == null ? null : bindingEntry.getMIMEType(partName));
                       p.setType(elem.getType());
                       v.add(p);
                   }
  @@ -1292,6 +1311,7 @@
                   // we can't use wrapped mode.
                   Parameter p = new Parameter();
                   p.setName(partName);
  +                p.setMIMEType(bindingEntry == null ? null : bindingEntry.getMIMEType(partName));
                   
                   if (typeName != null) {
                       p.setType(getType(typeName));
  @@ -1303,7 +1323,7 @@
               }
           } // while
   
  -    } // partStrings
  +    } // getParametersFromParts
   
       /**
        * Populate the symbol table with all of the BindingEntry's from the Definition.
  @@ -1340,6 +1360,7 @@
               boolean hasLiteral = false;
               HashMap attributes = new HashMap();
               List bindList = binding.getBindingOperations();
  +            Map mimeTypes = new HashMap();
               for (Iterator opIterator = bindList.iterator(); opIterator.hasNext();) {
                   int inputBodyType = BindingEntry.USE_ENCODED;
                   int outputBodyType = BindingEntry.USE_ENCODED;
  @@ -1362,6 +1383,12 @@
                                   }
                                   break;
                               }
  +                            else if (obj instanceof MIMEMultipartRelated) {
  +                                IntHolder holder = new IntHolder(inputBodyType);
  +                                mimeTypes.putAll(collectMIMETypes(
  +                                        (MIMEMultipartRelated) obj, holder, bindOp));
  +                                inputBodyType = holder.value;
  +                            }
                           }
                       }
                   }
  @@ -1383,6 +1410,12 @@
                                   }
                                   break;
                               }
  +                            else if (obj instanceof MIMEMultipartRelated) {
  +                                IntHolder holder = new IntHolder(outputBodyType);
  +                                mimeTypes.putAll(collectMIMETypes(
  +                                        (MIMEMultipartRelated) obj, holder, bindOp));
  +                                outputBodyType = holder.value;
  +                            }
                           }
                       }
                   }
  @@ -1428,11 +1461,43 @@
                       hasLiteral = true;
                   }
               } // binding operations
  -
  -            BindingEntry bEntry = new BindingEntry(binding, bindingType, bindingStyle, hasLiteral, attributes);
  +            BindingEntry bEntry = new BindingEntry(binding, bindingType, bindingStyle, hasLiteral, attributes, mimeTypes);
               symbolTablePut(bEntry);
           }
       } // populateBindings
  +
  +    /**
  +     * Collect the list of those parts that are really MIME types.
  +     */
  +    private Map collectMIMETypes(MIMEMultipartRelated mpr, IntHolder bodyType,
  +            BindingOperation bindOp) throws IOException {
  +        HashMap mimeTypes = new HashMap();
  +        List parts = mpr.getMIMEParts();
  +        Iterator i = parts.iterator();
  +        while (i.hasNext()) {
  +            MIMEPart part = (MIMEPart) i.next();
  +            List elems = part.getExtensibilityElements();
  +            Iterator j = elems.iterator();
  +            while (j.hasNext()) {
  +                Object obj = j.next();
  +                if (obj instanceof MIMEContent) {
  +                    MIMEContent content = (MIMEContent) obj;
  +                    mimeTypes.put(content.getPart(), content.getType());
  +                }
  +                else if (obj instanceof SOAPBody) {
  +                    String use = ((SOAPBody) obj).getUse();
  +                    if (use == null) {
  +                        throw new IOException(JavaUtils.getMessage(
  +                                "noUse", bindOp.getName()));
  +                    }
  +                    if (use.equalsIgnoreCase("literal")) {
  +                        bodyType.value = BindingEntry.USE_LITERAL;
  +                    }
  +                }
  +            }
  +        }
  +        return mimeTypes;
  +    } // collectMIMETypes
   
       /**
        * Populate the symbol table with all of the ServiceEntry's from the Definition.
  
  
  
  1.54      +22 -4     xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaDeployWriter.java
  
  Index: JavaDeployWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaDeployWriter.java,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- JavaDeployWriter.java	23 Jul 2002 16:17:12 -0000	1.53
  +++ JavaDeployWriter.java	24 Jul 2002 16:15:04 -0000	1.54
  @@ -184,10 +184,20 @@
       /**
        * Write out bean mappings for each type
        */
  -    protected void writeDeployTypes(PrintWriter pw, boolean hasLiteral) throws IOException {
  +    protected void writeDeployTypes(PrintWriter pw, Binding binding,
  +            boolean hasLiteral, boolean hasMIME) throws IOException {
           Vector types = symbolTable.getTypes();
   
           pw.println();
  +        if (hasMIME) {
  +            QName bQName = binding.getQName();
  +            writeTypeMapping(pw, bQName.getNamespaceURI(), "DataHandler",
  +                    "javax.activation.DataHandler",
  +                    "org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory",
  +                    "org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory",
  +                    Constants.URI_DEFAULT_SOAP_ENC);
  +        }
  +
           for (int i = 0; i < types.size(); ++i) {
               TypeEntry type = (TypeEntry) types.elementAt(i);
   
  @@ -269,6 +279,7 @@
           String serviceName = port.getName();
   
           boolean hasLiteral = bEntry.hasLiteral();
  +        boolean hasMIME = Utils.hasMIME(bEntry);
   
           String prefix = WSDDConstants.NS_PREFIX_WSDD_JAVA;
           String styleStr = "";
  @@ -293,7 +304,7 @@
                            + serviceName + "\"/>");
   
           writeDeployBinding(pw, binding);
  -        writeDeployTypes(pw, hasLiteral);
  +        writeDeployTypes(pw, binding, hasLiteral, hasMIME);
   
           pw.println("  </service>");
       } //writeDeployPort
  @@ -353,7 +364,7 @@
                       // Write the operation metadata
                       writeOperation(pw, javaOperName, elementQName, 
                                      returnQName, returnType,
  -                                   params);
  +                                   params, binding.getQName());
                   }
               }
           }
  @@ -379,7 +390,8 @@
                                     QName elementQName,
                                     QName returnQName,
                                     QName returnType,
  -                                  Parameters params) {
  +                                  Parameters params,
  +                                  QName bindingQName) {
           pw.print("      <operation name=\"" + javaOperName + "\"");
           if (elementQName != null) {
               pw.print(" qname=\"" +
  @@ -405,6 +417,12 @@
               // Get the parameter name QName and type QName
               QName paramQName = param.getQName();
               QName paramType = Utils.getXSIType(param.getType());
  +
  +            if (param.getMIMEType() != null) {
  +                paramType = new QName(
  +                        bindingQName.getNamespaceURI(),
  +                        "DataHandler");
  +            }
   
               pw.print("        <parameter");
               if (paramQName == null || "".equals(paramQName.getNamespaceURI())) {
  
  
  
  1.11      +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaFaultWriter.java
  
  Index: JavaFaultWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaFaultWriter.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JavaFaultWriter.java	20 Jun 2002 20:35:47 -0000	1.10
  +++ JavaFaultWriter.java	24 Jul 2002 16:15:04 -0000	1.11
  @@ -103,7 +103,7 @@
                                   fault.getMessage().getOrderedParts(null), 
                                   false, 
                                   fault.getName(), 
  -                                "unknown");
  +                                null);
   
           // Write data members of the exception and getter methods for them
           for (int i = 0; i < params.size(); i++) {
  
  
  
  1.15      +4 -3      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaGeneratorFactory.java
  
  Index: JavaGeneratorFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaGeneratorFactory.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- JavaGeneratorFactory.java	18 Jul 2002 20:55:11 -0000	1.14
  +++ JavaGeneratorFactory.java	24 Jul 2002 16:15:04 -0000	1.15
  @@ -460,7 +460,7 @@
                   fault.getMessage().getOrderedParts(null),
                   false,
                   fault.getName(),
  -                "unknown");
  +                null);
           } catch (IOException e) {}
           
           // Inspect each TypeEntry referenced in a Fault Message Part
  @@ -858,10 +858,11 @@
   
               String javifiedName = Utils.xmlNameToJava(p.getName());
               if (p.getMode() == Parameter.IN) {
  -                signature = signature + p.getType().getName() + " " + javifiedName;
  +                String typeString;
  +                signature = signature + Utils.getParameterTypeName(p) + " " + javifiedName;
               }
               else {
  -                signature = signature + Utils.holder(p.getType(), emitter) + " "
  +                signature = signature + Utils.holder(p.getMIMEType(), p.getType(), emitter) + " "
                           + javifiedName;
               }
           }
  
  
  
  1.12      +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaHolderWriter.java
  
  Index: JavaHolderWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaHolderWriter.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JavaHolderWriter.java	20 Jun 2002 20:35:47 -0000	1.11
  +++ JavaHolderWriter.java	24 Jul 2002 16:15:04 -0000	1.12
  @@ -73,7 +73,7 @@
        * Constructor.
        */
       protected JavaHolderWriter(Emitter emitter, TypeEntry type) {
  -        super(emitter, Utils.holder(type, emitter), "holder");
  +        super(emitter, Utils.holder(null, type, emitter), "holder");
           this.type = type;
       } // ctor
   
  
  
  
  1.38      +7 -7      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaSkelWriter.java
  
  Index: JavaSkelWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaSkelWriter.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- JavaSkelWriter.java	23 Jul 2002 16:17:12 -0000	1.37
  +++ JavaSkelWriter.java	24 Jul 2002 16:15:04 -0000	1.38
  @@ -182,12 +182,12 @@
                       QName paramType = Utils.getXSIType(p.getType());
                       pw.println("            " +
                           "new org.apache.axis.description.ParameterDesc(" +
  -                               Utils.getNewQName(paramName) +
  -                               ", " + modeStr + "," +
  -                               Utils.getNewQName(paramType) +
  -                               ","+
  -                               p.getType().getName() + ".class" 
  -                               +"),");
  +                        Utils.getNewQName(paramName) +
  +                        ", " + modeStr + ", " +
  +                        Utils.getNewQName(paramType) +
  +                        ", " +
  +                        p.getType().getName() + ".class" 
  +                        + "), ");
                   }
   
                   pw.println("        };");
  @@ -236,7 +236,7 @@
                   }
   
                   pw.println("        _myOperationsList.add(_oper);");
  -                pw.println("        if (_myOperations.get(\"" + javaOpName + "\")==null) {");
  +                pw.println("        if (_myOperations.get(\"" + javaOpName + "\") == null) {");
                   pw.println("            _myOperations.put(\"" + javaOpName + "\", new java.util.ArrayList());");
                   pw.println("        }");
                   pw.println("        ((java.util.List)_myOperations.get(\"" + javaOpName + "\")).add(_oper);");
  
  
  
  1.78      +128 -44   xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java
  
  Index: JavaStubWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- JavaStubWriter.java	23 Jul 2002 16:17:12 -0000	1.77
  +++ JavaStubWriter.java	24 Jul 2002 16:15:04 -0000	1.78
  @@ -138,7 +138,8 @@
               isRPC = false;
           }
           HashSet types = getTypesInPortType(portType);
  -        if (types.size() > 0) {
  +        boolean hasMIME = Utils.hasMIME(bEntry);
  +        if (types.size() > 0  || hasMIME) {
               pw.println("    private java.util.Vector cachedSerClasses = new java.util.Vector();");
               pw.println("    private java.util.Vector cachedSerQNames = new java.util.Vector();");
               pw.println("    private java.util.Vector cachedSerFactories = new java.util.Vector();");
  @@ -165,9 +166,12 @@
           pw.println("                super.service = service;");
           pw.println("            }");
   
  -        Iterator it = types.iterator();
  -        while (it.hasNext()) {
  -            writeSerializationInit(pw, (TypeEntry) it.next());
  +        if (types.size() > 0 || hasMIME) {
  +            writeSerializationDecls(pw, hasMIME, binding.getQName().getNamespaceURI());
  +            Iterator it = types.iterator();
  +            while (it.hasNext()) {
  +                writeSerializationInit(pw, (TypeEntry) it.next());
  +            }
           }
   
           pw.println("        }");
  @@ -208,7 +212,7 @@
           pw.println("                else");
           pw.println("                    _call.setScopedProperty(key, super.cachedProperties.get(key));");
           pw.println("            }");
  -        if (types.size() > 0) {
  +        if (types.size() > 0 || hasMIME) {
               pw.println("            // " + JavaUtils.getMessage("typeMap00"));
               pw.println("            // " + JavaUtils.getMessage("typeMap01"));
               pw.println("            // " + JavaUtils.getMessage("typeMap02"));
  @@ -377,7 +381,37 @@
       /**
        * In the stub constructor, write the serializer code for the complex types.
        */
  -    private boolean firstSer = true ;
  +
  +    private void writeSerializationDecls(PrintWriter pw, boolean hasMIME,
  +            String namespace) {
  +        pw.println("            Class cls;" );
  +        pw.println("            javax.xml.namespace.QName qName;" );
  +        pw.println("            Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;");
  +        pw.println("            Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;");
  +        pw.println("            Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;");
  +        pw.println("            Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;");
  +        pw.println("            Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;");
  +        pw.println("            Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;");
  +        pw.println("            Class simplesf = org.apache.axis.encoding.ser.SimpleNonPrimitiveSerializerFactory.class;");
  +        pw.println("            Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;");
  +
  +        if (hasMIME) {
  +            pw.println("            Class mimesf = org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.class;");
  +            pw.println("            Class mimedf = org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory.class;");
  +            pw.println();
  +            QName qname = new QName(namespace, "DataHandler");
  +
  +            pw.println("            qName = new javax.xml.namespace.QName(\""
  +                       + qname.getNamespaceURI() + "\", \"" + qname.getLocalPart()
  +                       + "\");");
  +            pw.println("            cachedSerQNames.add(qName);");
  +            pw.println("            cls = javax.activation.DataHandler.class;");
  +            pw.println("            cachedSerClasses.add(cls);");
  +            pw.println("            cachedSerFactories.add(mimesf);");
  +            pw.println("            cachedDeserFactories.add(mimedf);");
  +            pw.println();
  +        }
  +    } // writeSerializationDecls
   
       private void writeSerializationInit(PrintWriter pw, TypeEntry type) throws IOException {
   
  @@ -401,21 +435,7 @@
           
           if (!process) {
               return;
  -        }
  -        
  -        if ( firstSer ) {
  -            pw.println("            Class cls;" );
  -            pw.println("            javax.xml.namespace.QName qName;" );
  -            pw.println("            Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;");
  -            pw.println("            Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;");
  -            pw.println("            Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;");
  -            pw.println("            Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;");
  -            pw.println("            Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;");
  -            pw.println("            Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;");
  -            pw.println("            Class simplesf = org.apache.axis.encoding.ser.SimpleNonPrimitiveSerializerFactory.class;");
  -            pw.println("            Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;");
  -        }
  -        firstSer = false ;
  +        }        
   
           QName qname = type.getQName();
   
  @@ -466,7 +486,7 @@
   
           writeComment(pw, operation.getDocumentationElement());
   
  -        pw.println(parms.signature + "{");
  +        pw.println(parms.signature + " {");
           pw.println("        if (super.cachedEndpoint == null) {");
           pw.println("            throw new org.apache.axis.NoEndPointException();");
           pw.println("        }");
  @@ -476,17 +496,27 @@
           for (int i = 0; i < parms.list.size(); ++i) {
               Parameter p = (Parameter) parms.list.get(i);
   
  +            String mimeType = p.getMIMEType();
  +
               // Get the QNames representing the parameter name and type
  -            QName paramName = p.getQName();
  +            QName paramName;
               QName paramType = Utils.getXSIType(p.getType());
   
               // Set the javaType to the name of the type
  -            String javaType = p.getType().getName();
  -
  -            if (javaType != null) {
  -                javaType += ".class, ";
  -            } else {
  -                javaType = "";
  +            String javaType = null;
  +            if (mimeType != null) {
  +                javaType = "javax.activation.DataHandler.class, ";
  +                paramName = new QName (binding.getQName().getNamespaceURI(),
  +                        "DataHandler");
  +            }
  +            else {
  +                javaType = p.getType().getName();
  +                if (javaType != null) {
  +                    javaType += ".class, ";
  +                } else {
  +                    javaType = "";
  +                }
  +                paramName = p.getQName();
               }
   
               // Get the text representing newing a QName for the name and type
  @@ -559,7 +589,10 @@
                   styleStr = "document";
               }
           }
  -        pw.println("        _call.setOperationStyle(\"" + styleStr + "\");");
  +
  +        if (!Utils.hasMIME(bEntry, operation)) {
  +            pw.println("        _call.setOperationStyle(\"" + styleStr + "\");");
  +        }
   
           // Operation name
           if (styleStr.equals("wrapped")) {
  @@ -577,6 +610,27 @@
                           Utils.getNewQName(elementQName) + ");" );
               }
           }
  +
  +        // Initialize any MIME parameters
  +        int numberOfInMIMES = 0;
  +        for (int i = 0; i < parms.list.size(); ++i) {
  +            Parameter p = (Parameter) parms.list.get(i);
  +            String mimeType = p.getMIMEType();
  +            byte mode = p.getMode();
  +            if (mode != Parameter.OUT && mimeType != null) {
  +                String javifiedName = Utils.xmlNameToJava(p.getName());
  +                if (mode == Parameter.INOUT) {
  +                    javifiedName += ".value";
  +                }
  +                
  +                if (mimeType.equals("text/plain")) {
  +                    pw.println("        javax.activation.DataHandler _dh" + numberOfInMIMES++ +
  +                            " = new javax.activation.DataHandler(new org.apache.axis.attachments.PlainTextDataSource(\"" +
  +                            javifiedName + "\", " + javifiedName + "));");
  +                }
  +            }
  +        }
  +        numberOfInMIMES = 0;
           
           // Invoke the operation
           pw.println();
  @@ -588,7 +642,6 @@
           for (int i = 0; i < parms.list.size(); ++i) {
               Parameter p = (Parameter) parms.list.get(i);
   
  -            String javifiedName = Utils.xmlNameToJava(p.getName());
               if (p.getMode() != Parameter.OUT) {
                   if (needComma) {
                       pw.print(", ");
  @@ -596,6 +649,17 @@
                   else {
                       needComma = true;
                   }
  +
  +                String mimeType = p.getMIMEType();
  +                if (mimeType != null) {
  +                    if (mimeType.equals("text/plain")) {
  +                        pw.print("_dh" + numberOfInMIMES++);
  +                        continue;
  +                    }
  +                }
  +
  +                // If we get here, then we didn't find a MIME type
  +                String javifiedName = Utils.xmlNameToJava(p.getName());
                   if (p.getMode() == Parameter.IN) {
                       pw.print(Utils.wrapPrimitiveType(p.getType(),
                               javifiedName));
  @@ -618,8 +682,8 @@
               pw.println("        else {");
               if (allOuts == 1) {
                   if (parms.returnType != null) {
  -                    writeOutputAssign(pw, "return ",
  -                                      parms.returnType, "_resp");
  +                    writeOutputAssign(pw, "return ", parms.returnType,
  +                            parms.returnMIMEType, "_resp");
                   }
                   else {
                       // The resp object must go into a holder
  @@ -634,8 +698,8 @@
                                  
                       pw.println("            java.util.Map _output;");
                       pw.println("            _output = _call.getOutputParams();");
  -                    writeOutputAssign(pw, javifiedName + ".value =",
  -                                      p.getType(),
  +                    writeOutputAssign(pw, javifiedName + ".value = ",
  +                                      p.getType(), p.getMIMEType(),
                                         "_output.get(" + qnameName + ")");
                   }
               }
  @@ -648,15 +712,14 @@
                       String javifiedName = Utils.xmlNameToJava(p.getName());
                       String qnameName = Utils.getNewQName(p.getQName());
                       if (p.getMode() != Parameter.IN) {
  -                        writeOutputAssign(pw, javifiedName + ".value =",
  -                                          p.getType(),
  +                        writeOutputAssign(pw, javifiedName + ".value = ",
  +                                          p.getType(), p.getMIMEType(),
                                             "_output.get(" + qnameName + ")");
                       }
                   }
                   if (parms.returnType != null) {
  -                    writeOutputAssign(pw, "return ",
  -                                      parms.returnType,
  -                                      "_resp");
  +                    writeOutputAssign(pw, "return ", parms.returnType,
  +                            parms.returnMIMEType, "_resp");
                   }
   
               }
  @@ -674,24 +737,45 @@
        *
        */
       private void writeOutputAssign(PrintWriter pw, String target,
  -                                   TypeEntry type, 
  +                                   TypeEntry type, String mimeType,
                                      String source) {
  +        String realTarget = null;
  +        if (mimeType != null && mimeType.equals("text/plain")) {
  +            realTarget = target;
  +            target = "javax.activation.DataHandler _returnDH = ";
  +        }
           if (type != null && type.getName() != null) {
               // Try casting the output to the expected output.
               // If that fails, use JavaUtils.convert()
               pw.println("            try {");
               pw.println("                " + target +
  -                       Utils.getResponseString(type, source));
  +                       Utils.getResponseString(type, mimeType, source));
  +
  +            if (mimeType != null) {
  +                if (mimeType.equals("text/plain")) {
  +                    pw.println("                java.io.InputStream _DHIS = _returnDH.getInputStream();");
  +                    pw.println("                byte[] _DHISBytes = new byte[_DHIS.available()];");
  +                    pw.println("                _DHIS.read(_DHISBytes);");
  +                    pw.println("                " + realTarget +
  +                            Utils.getResponseString(type, null, "new String(_DHISBytes)"));
  +                }
  +                else {
  +                    pw.println("                " + realTarget +
  +                            Utils.getResponseString(type, mimeType, source));
  +                }
  +                target = realTarget;
  +            }
  +
               pw.println("            } catch (java.lang.Exception _exception) {");
               pw.println("                " + target +
  -                       Utils.getResponseString(type, 
  +                       Utils.getResponseString(type, null, 
                                            "org.apache.axis.utils.JavaUtils.convert(" +
                                            source + ", " + 
                                            type.getName() + ".class)"));
               pw.println("            }"); 
           } else {
               pw.println("              " + target +
  -                       Utils.getResponseString(type, source));
  +                       Utils.getResponseString(type, mimeType, source));
           }
       }
   } // class JavaStubWriter
  
  
  
  1.32      +1 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java
  
  Index: JavaTestCaseWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- JavaTestCaseWriter.java	22 Jul 2002 19:15:58 -0000	1.31
  +++ JavaTestCaseWriter.java	24 Jul 2002 16:15:04 -0000	1.32
  @@ -224,7 +224,7 @@
                   String suffix = "";
   
                   if (param.getMode() != Parameter.IN) {
  -                    pw.print("new " + Utils.holder(param.getType(), emitter)
  +                    pw.print("new " + Utils.holder(param.getMIMEType(), param.getType(), emitter)
                               + "(");
                       suffix = ")";
                   }
  
  
  
  1.42      +110 -3    xml-axis/java/src/org/apache/axis/wsdl/toJava/Utils.java
  
  Index: Utils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Utils.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- Utils.java	23 Jul 2002 16:17:12 -0000	1.41
  +++ Utils.java	24 Jul 2002 16:15:04 -0000	1.42
  @@ -55,12 +55,18 @@
   package org.apache.axis.wsdl.toJava;
   
   import org.apache.axis.Constants;
  +
   import org.apache.axis.utils.JavaUtils;
  +
  +import org.apache.axis.wsdl.symbolTable.BindingEntry;
   import org.apache.axis.wsdl.symbolTable.CollectionType;
   import org.apache.axis.wsdl.symbolTable.Element;
   import org.apache.axis.wsdl.symbolTable.MessageEntry;
  +import org.apache.axis.wsdl.symbolTable.Parameter;
  +import org.apache.axis.wsdl.symbolTable.Parameters;
   import org.apache.axis.wsdl.symbolTable.SymbolTable;
   import org.apache.axis.wsdl.symbolTable.TypeEntry;
  +
   import org.w3c.dom.Node;
   import org.w3c.dom.NodeList;
   
  @@ -71,15 +77,20 @@
   import javax.wsdl.Message;
   import javax.wsdl.Operation;
   import javax.wsdl.Part;
  -import javax.xml.namespace.QName;
   import javax.wsdl.extensions.ExtensibilityElement;
   import javax.wsdl.extensions.soap.SOAPBody;
  +
  +import javax.xml.namespace.QName;
  +
   import java.io.File;
   import java.io.IOException;
  +
   import java.net.MalformedURLException;
   import java.net.URL;
  +
   import java.util.HashMap;
   import java.util.Iterator;
  +import java.util.List;
   import java.util.Map;
   import java.util.StringTokenizer;
   import java.util.Vector;
  @@ -88,7 +99,26 @@
       /**
        * Given a type, return the Java mapping of that type's holder.
        */
  -    public static String holder(TypeEntry type, Emitter emitter) {
  +    public static String holder(String mimeType, TypeEntry type, Emitter emitter) {
  +
  +        // Add the holders that JAX-RPC forgot about - the MIME type holders.
  +        if (mimeType != null) {
  +            if (mimeType.equals("image/gif") ||
  +                mimeType.equals("image/jpeg")) {
  +                return "org.apache.axis.holders.ImageHolder";
  +            }
  +            else if (mimeType.equals("text/plain")) {
  +                return "javax.xml.rpc.holders.StringHolder";
  +            }
  +            else if (mimeType.startsWith("multipart/")) {
  +                return "org.apache.axis.holders.MimeMultipartHolder";
  +            }
  +            else if (mimeType.equals("text/xml") ||
  +                     mimeType.equals("application/xml")) {
  +                return "org.apache.axis.holders.SourceHolder";
  +            }
  +        }
  +
           String typeValue = type.getName();
   
           // byte[] has a reserved holders
  @@ -156,6 +186,7 @@
           else if (typeValue.equals("javax.xml.namespace.QName")) {
               return "javax.xml.rpc.holders.QNameHolder";
           }
  +
           // For everything else add "holders" package and append
           // holder to the class name.
           else {
  @@ -454,10 +485,14 @@
        * Return the Object variable 'var' cast to the appropriate type
        * doing the right thing for the primitive types.
        */
  -    public static String getResponseString(TypeEntry type, String var) {
  +    public static String getResponseString(TypeEntry type, String mimeType,
  +            String var) {
           if (type == null) {
               return ";";
           }
  +        else if (mimeType != null) {
  +            return "(javax.activation.DataHandler) " + var + ";";
  +        }
           else {
               String objType = (String) TYPES.get(type.getName());
               if (objType != null) {
  @@ -550,6 +585,47 @@
                   qname.getLocalPart() + "\")";
       }
   
  +    /**
  +     * Get the parameter type name.  If this is a MIME type, then
  +     * figure out the appropriate type from the MIME type, otherwise
  +     * use the name of the type itself.
  +     */
  +    public static String getParameterTypeName(Parameter parm) {
  +        String mime = parm.getMIMEType();
  +        String ret;
  +        if (mime == null) {
  +            ret = parm.getType().getName();
  +        }
  +        else {
  +            ret = mimeToJava(mime);
  +            if (ret == null) {
  +                ret = parm.getType().getName();
  +            }
  +        }
  +        return ret;
  +    } // getParameterTypeName
  +
  +    /**
  +     * Given the MIME type string, return the Java mapping.
  +     */
  +    private static String mimeToJava(String mime) {
  +        if ("image/gif".equals(mime) || "image/jpeg".equals(mime)) {
  +            return "java.awt.Image";
  +        }
  +        else if ("text/plain".equals(mime)) {
  +            return "java.lang.String";
  +        }
  +        else if ("text/xml".equals(mime) || "application/xml".equals(mime)) {
  +            return "javax.xml.transform.Source";
  +        }
  +        else if (mime != null && mime.startsWith("multipart/")) {
  +            return "javax.mail.internet.MimeMultipart";
  +        }
  +        else {
  +            return null;
  +        }
  +    } // mimeToJava
  +
       /** 
        * Get the QName that could be used in the xsi:type
        * when serializing an object for this parameter/return
  @@ -587,4 +663,35 @@
           return xmlType;
       }
       
  +    /**
  +     * Are there any MIME parameters in the given binding?
  +     */
  +    public static boolean hasMIME(BindingEntry bEntry) {
  +        List operations = bEntry.getBinding().getBindingOperations();
  +        for (int i = 0; i < operations.size(); ++i) {
  +            BindingOperation operation = (BindingOperation) operations.get(i);
  +            if (hasMIME(bEntry, operation)) {
  +                return true;
  +            }
  +        }
  +        return false;
  +    } // hasMIME
  +
  +    /**
  +     * Are there any MIME parameters in the given binding's operation?
  +     */
  +    public static boolean hasMIME(BindingEntry bEntry, BindingOperation operation) {
  +        Parameters parameters =
  +          bEntry.getParameters(operation.getOperation());
  +        if (parameters != null) {
  +            for (int idx = 0; idx < parameters.list.size(); ++idx) {
  +                Parameter p = (Parameter) parameters.list.get(idx);
  +                if (p.getMIMEType() != null) {
  +                    return true;
  +                }
  +            }
  +        }
  +        return false;
  +    } // hasMIME
  +
   } // class Utils
  
  
  
  1.51      +2 -0      xml-axis/java/test/build_functional_tests.xml
  
  Index: build_functional_tests.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/build_functional_tests.xml,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- build_functional_tests.xml	18 Jul 2002 16:41:15 -0000	1.50
  +++ build_functional_tests.xml	24 Jul 2002 16:15:05 -0000	1.51
  @@ -224,6 +224,7 @@
         <fileset dir="${test.dir}">
           <include name="**/*TestCase.java"/>
           <exclude name="**/EmptySATestCase.java"/>
  +	<exclude name="**/SalesRankNPrice_ServiceTestCase.java"/>
         </fileset>
         <fileset dir="${test.dir}">
           <include name="**/Main.java"/>
  @@ -236,6 +237,7 @@
         <fileset dir="${test.dir}/wsdl">
           <include name="**/*TestCase.java"/>
           <exclude name="**/EmptySATestCase.java"/>
  +	<exclude name="**/SalesRankNPrice_ServiceTestCase.java"/>
         </fileset>
         <fileset dir="${test.dir}/wsdl">
           <include name="**/Main.java"/>
  
  
  
  1.117     +11 -0     xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml
  
  Index: Wsdl2javaTestSuite.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml,v
  retrieving revision 1.116
  retrieving revision 1.117
  diff -u -r1.116 -r1.117
  --- Wsdl2javaTestSuite.xml	23 Jul 2002 14:02:57 -0000	1.116
  +++ Wsdl2javaTestSuite.xml	24 Jul 2002 16:15:05 -0000	1.117
  @@ -53,6 +53,14 @@
           <mapping namespace="urn:Example6" package="samples.userguide.example6"/>
       </wsdl2java>
   
  +    <!-- attachment test -->
  +    <wsdl2java url="test/wsdl/attachments/mime.wsdl"
  +               output="build/work"
  +               serverSide="yes"
  +               skeletonDeploy="yes"
  +               testcase="yes">
  +    </wsdl2java>
  +
       <!-- Multiple-binding test with different literal usage -->
       <wsdl2java url="test/wsdl/multibinding/multibinding.wsdl"
                  output="build/work"
  @@ -913,6 +921,8 @@
            file is only for reference.
       <wsdl2java url="test/wsdl/literal/SalesRankNPrice.wsdl"
        -->
  +    <!-- NOTE:  THIS DOMAIN HAS EXPIRED!  If it comes back,
  +         we can add this test back in.
       <wsdl2java url="http://www.perfectxml.net/WebServices/SalesRankNPrice/BookService.asmx?WSDL"
                  output="build/work"
                  verbose="no"
  @@ -921,6 +931,7 @@
           <mapping namespace="http://www.PerfectXML.com/NETWebSvcs/BookService" package="test.wsdl.literal"/>
   
       </wsdl2java>
  +    -->
   
       <!-- This tests element qualification.  -->
       <wsdl2java url="test/wsdl/qualify/qualifytest.wsdl"
  
  
  
  1.1                  xml-axis/java/test/wsdl/attachments/mime.wsdl
  
  Index: mime.wsdl
  ===================================================================
  <?xml version="1.0" encoding="utf-8"?>
  <wsdl:definitions
      xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      targetNamespace="urn:attachments.wsdl.test"
      xmlns:tns="urn:attachments.wsdl.test">
    <types>
      <schema
          xmlns="http://www.w3.org/2001/XMLSchema"
          targetNamespace="urn:attachments.wsdl.test">
        <element name="GetCompanyInfo">
          <complexType>
            <all>
              <element name="tickerSymbol" type="xsd:string"/>
            </all>
          </complexType>
        </element>
        <element name="GetCompanyInfo2">
          <complexType>
            <all>
              <element name="result" type="xsd:float"/>
            </all>
          </complexType>
        </element>
      </schema>
    </types>
  
    <message name="m0"/>
    <message name="m1">
      <part name="body" element="tns:GetCompanyInfo"/>
    </message>
    <message name="m2">
      <part name="body" element="tns:GetCompanyInfo2"/>
      <part name="docs" type="xsd:string"/>
      <part name="logo" type="xsd:hexBinary"/>
    </message>
    <message name="m3">
      <part name="body" type="xsd:string"/>
    </message>
  
    <portType name="pt1">
  <!--
      <operation name="GetCompanyInfo">
        <input message="tns:m1"/>
        <output message="tns:m2"/>
      </operation>
      <operation name="GetCompanyInfo2">
        <input message="tns:m2"/>
        <output message="tns:m1"/>
      </operation>
  -->
  <!--
      <operation name="inputPlainText">
        <input message="tns:m3"/>
        <output message="tns:m0"/>
      </operation>
  -->
      <operation name="echoPlainText">
        <input message="tns:m3"/>
        <output message="tns:m3"/>
      </operation>
    </portType>
  
    <binding name="b1" type="tns:pt1">
      <soap:binding style="doc"
                    transport="http://schemas.xmlsoap.org/soap/http"/>
  <!--
      <operation name="GetCompanyInfo">
        <soap:operation soapAction="http://example.com/GetCompanyInfo"/>
        <input>
          <soap:body use="literal"/>
        </input>
        <output>
         <mime:multipartRelated>
            <mime:part>
              <soap:body parts="body" use="literal"/>
            </mime:part>
            <mime:part>
              <mime:content part="docs" type="text/html"/>
            </mime:part>
            <mime:part>
              <mime:content part="logo" type="image/gif"/>
              <mime:content part="logo" type="image/jpeg"/>
            </mime:part>
          </mime:multipartRelated>
        </output>
      </operation>
      <operation name="GetCompanyInfo2">
        <soap:operation soapAction="http://example.com/GetCompanyInfo2"/>
        <input>
         <mime:multipartRelated>
            <mime:part>
              <soap:body parts="body" use="literal"/>
            </mime:part>
            <mime:part>
              <mime:content part="docs" type="text/plain"/>
            </mime:part>
            <mime:part>
              <mime:content part="logo" type="image/gif"/>
              <mime:content part="logo" type="image/jpeg"/>
            </mime:part>
          </mime:multipartRelated>
        </input>
        <output>
          <soap:body use="literal"/>
        </output>
      </operation>
  -->
  <!--
      <operation name="inputPlainText">
        <soap:operation soapAction=""/>
        <input>
         <mime:multipartRelated>
            <mime:part>
              <mime:content part="body" type="text/plain"/>
            </mime:part>
          </mime:multipartRelated>
        </input>
        <output>
          <soap:body use="encoding"/>
        </output>
      </operation>
  -->
      <operation name="echoPlainText">
        <soap:operation soapAction=""/>
        <input>
         <mime:multipartRelated>
            <mime:part>
              <mime:content part="body" type="text/plain"/>
            </mime:part>
          </mime:multipartRelated>
        </input>
        <output>
         <mime:multipartRelated>
            <mime:part>
              <mime:content part="body" type="text/plain"/>
            </mime:part>
          </mime:multipartRelated>
        </output>
      </operation>
    </binding>
  
    <service name="Attachment">
      <port name="AttachmentPort" binding="tns:b1">
        <soap:address location="http://localhost:8080/axis/services/AttachmentPort"/>
      </port>
    </service>
  
  </wsdl:definitions>