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 wh...@apache.org on 2002/11/14 14:49:34 UTC

cvs commit: xml-axis-wsif/java/test/mime MimeErrors.wsdl Mime.wsdl MimeTest.java Mime.java MimeImpl.java DeploymentDescriptor.xml

whitlock    2002/11/14 05:49:34

  Modified:    java/src/org/apache/wsif/providers/soap/apacheaxis
                        WSIFPort_ApacheAxis.java
                        WSIFOperation_ApacheAxis.java
               java/test/mime Mime.wsdl MimeTest.java Mime.java
                        MimeImpl.java DeploymentDescriptor.xml
  Added:       java/test/mime MimeErrors.wsdl
  Log:
  Mime fixes
  
  Revision  Changes    Path
  1.16      +21 -9     xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apacheaxis/WSIFPort_ApacheAxis.java
  
  Index: WSIFPort_ApacheAxis.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apacheaxis/WSIFPort_ApacheAxis.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- WSIFPort_ApacheAxis.java	11 Nov 2002 15:36:04 -0000	1.15
  +++ WSIFPort_ApacheAxis.java	14 Nov 2002 13:49:33 -0000	1.16
  @@ -290,13 +290,20 @@
                   (MIMEMultipartRelated) getExtElem(bindinginput,
                       MIMEMultipartRelated.class,
                       inExtElems);
  +            if (soapbody != null && mimeMultipart != null)
  +                throw new WSIFException(
  +                    "In a binding operation that contains a mime:multipartRelated, "
  +                        + "a soap:body was found that was not in a mime:part. "
  +                        + "OperationName="
  +                        + s3);
               if (mimeMultipart != null)
                   parseMimeMultipart(
                       mimeMultipart,
                       bindingoperation,
                       wsifoperation_apacheaxis,
                       soapoperation,
  -                    true);
  +                    true,
  +                    s3);
               
               SOAPHeader soapheader =
                   (SOAPHeader) getExtElem(bindinginput,
  @@ -410,7 +417,8 @@
           BindingOperation bindingoperation,
           WSIFOperation_ApacheAxis wsifoperation_apacheaxis,
           SOAPOperation soapoperation,
  -        boolean isInput)
  +        boolean isInput,
  +        String operationName)
           throws WSIFException {
   
           Trc.entry(
  @@ -421,7 +429,7 @@
               soapoperation);
       	
           Vector mimePartNames = new Vector();
  -        Vector soapPartNames = new Vector();
  +        List soapPartNameList = null;
   
           List mimeParts = mimeMultipart.getMIMEParts();
           Iterator mimePartIt = mimeParts.iterator();
  @@ -458,22 +466,26 @@
   
                           mimePartNames.addElement(mimeContent.getPart());
                       } else if (nextChild instanceof SOAPBody) {
  -                        List soapPartNameList =
  +                        if (soapPartNameList != null)
  +                            throw new WSIFException(
  +                                "Multiple soap:body tags found in a "
  +                                    + "mime:multipartRelated. OperationName="
  +                                    + operationName);
  +
  +                        soapPartNameList =
                               parseSoapBody(
                                   wsifoperation_apacheaxis,
                                   soapoperation,
                                   (SOAPBody) nextChild,
                                   true);
  -                        if (soapPartNameList != null)
  -                            soapPartNames.addAll(soapPartNameList);
  +
  +                        wsifoperation_apacheaxis.setSoapPartNames(
  +                            soapPartNameList);
                       }
                   }
               }
           }
           
  -        if (soapPartNames != null && !soapPartNames.isEmpty())
  -            wsifoperation_apacheaxis.setSoapPartNames(soapPartNames);
  -
           if (mimePartNames != null && !mimePartNames.isEmpty())
               wsifoperation_apacheaxis.setMimePartNames(mimePartNames);
           
  
  
  
  1.32      +34 -24    xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apacheaxis/WSIFOperation_ApacheAxis.java
  
  Index: WSIFOperation_ApacheAxis.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apacheaxis/WSIFOperation_ApacheAxis.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- WSIFOperation_ApacheAxis.java	11 Nov 2002 15:36:04 -0000	1.31
  +++ WSIFOperation_ApacheAxis.java	14 Nov 2002 13:49:33 -0000	1.32
  @@ -564,14 +564,19 @@
   			if (respParms != null) {
   				String name;
   				Object value;
  -				for (Iterator i = respParms.keySet().iterator();
  -					i.hasNext();
  -					) {
  -					name = (String) i.next();
  -					value = respParms.get(name);
  -					setMessagePart(outMsg, name, value, value.getClass());
  -					wsdlOutParams.remove(name);
  -				}
  +                for (Iterator i = respParms.keySet().iterator();
  +                    i.hasNext();
  +                    ) {
  +
  +                    name = (String) i.next();
  +                    value = respParms.get(name);
  +                    setMessagePart(
  +                        outMsg,
  +                        name,
  +                        value,
  +                        value == null ? null : value.getClass());
  +                    wsdlOutParams.remove(name);
  +                }
   			}
   			// init any other parts to null
   			for (Iterator i = wsdlOutParams.iterator(); i.hasNext();) {
  @@ -588,20 +593,23 @@
           throws WSIFException {
           Trc.entry(null, msg, name, value, type);
   
  +        Class valueType = value == null ? null : value.getClass();
           try {
  -            if (DataHandler.class.equals(type)
  -                && AttachmentPart.class.isAssignableFrom(value.getClass())) {
  +            if (valueType != null
  +                && DataHandler.class.equals(type)
  +                && AttachmentPart.class.isAssignableFrom(valueType)) {
                   AttachmentPart ap = (AttachmentPart) value;
                   DataHandler dh = ap.getDataHandler();
                   msg.setObjectPart(name, dh);
               } else if (
  -                (String.class.equals(type)
  -                    || Image.class.equals(type)
  -                    || StreamSource.class.equals(type)
  -                    || DOMSource.class.equals(type)
  -                    || SAXSource.class.equals(type)
  -                    || MimeMultipart.class.equals(type))
  -                    && AttachmentPart.class.isAssignableFrom(value.getClass())) {
  +                valueType != null
  +                    && (String.class.equals(type)
  +                        || Image.class.equals(type)
  +                        || StreamSource.class.equals(type)
  +                        || DOMSource.class.equals(type)
  +                        || SAXSource.class.equals(type)
  +                        || MimeMultipart.class.equals(type))
  +                    && AttachmentPart.class.isAssignableFrom(valueType)) {
   
                   AttachmentPart ap = (AttachmentPart) value;
                   InputStream is = ap.getDataHandler().getInputStream();
  @@ -627,14 +635,15 @@
                           name,
                           new MimeMultipart(ap.getDataHandler().getDataSource()));
               } else if (
  -                type != null // will be null for async responses
  +                valueType != null
  +                    && type != null // will be null for async responses
                       && !type.isPrimitive()
  -                    && !(type.isAssignableFrom(value.getClass()))) {
  +                    && !(type.isAssignableFrom(valueType))) {
                   throw new WSIFException(
                       "return value "
                           + value
                           + " has unexpected type "
  -                        + value.getClass()
  +                        + valueType
                           + " instead of "
                           + type);
               } else
  @@ -1058,12 +1067,13 @@
   		Trc.exit();
   	}
   
  +    /**
  +     * soapPartNames==null means that soap:body parts="..." wasn't set.
  +     * soapPartNames is an empty list means soap:body part="" (nothing in the quotes).
  +     */
       public void setSoapPartNames(List soapList) {
           Trc.entry(this, soapList);
  -        if (soapList == null || soapList.isEmpty())
  -            soapPartNames = null;
  -        else
  -            soapPartNames = soapList;
  +        soapPartNames = soapList;
           Trc.exit();
       }
       
  
  
  
  1.3       +147 -159  xml-axis-wsif/java/test/mime/Mime.wsdl
  
  Index: Mime.wsdl
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/test/mime/Mime.wsdl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Mime.wsdl	11 Nov 2002 15:36:04 -0000	1.2
  +++ Mime.wsdl	14 Nov 2002 13:49:34 -0000	1.3
  @@ -1,5 +1,7 @@
   <?xml version="1.0" ?>
   
  +<!-- Currently missing complex types and type="application/octet-stream" ??? -->
  +
   <definitions targetNamespace="http://mime/"
                xmlns:tns="http://mime/"
                xmlns:xsd="http://www.w3.org/1999/XMLSchema"
  @@ -34,6 +36,10 @@
       <part name="buff" type="xsd:string"/>
     </message>
   
  +  <message name="String2Message">
  +    <part name="buff2" type="xsd:string"/>
  +  </message>
  +
     <message name="BounceImage4Message">
       <part name="file" type="tns:datahandler"/>
       <part name="shouldBounce" type="xsd:boolean"/>
  @@ -44,6 +50,9 @@
       <part name="file2" type="tns:datahandler"/>
     </message>
   
  +  <message name="NullMessage">
  +  </message>
  +
     <!-- port type declns -->
     <portType name="Mime">
       <operation name="dataHandlerToString">
  @@ -74,47 +83,44 @@
         <input message="tns:BounceImage4Message"/>
         <output message="tns:DataHandler2Message"/>
       </operation>
  -    <operation name="bounceImage5">
  -      <input message="tns:BounceImage4Message"/>
  -      <output message="tns:DataHandler2Message"/>
  -    </operation>
  -    <operation name="noSoapBody">
  +    <operation name="orMultiMimeParts">
         <input message="tns:DataHandlerMessage"/>
  -    </operation>
  -    <operation name="multiMimeParts1">
  -      <input message="tns:MultiMimePartsMessage"/>
         <output message="tns:StringMessage"/>
       </operation>
  -    <operation name="multiMimeParts2">
  +    <operation name="andMultiMimeParts">
         <input message="tns:MultiMimePartsMessage"/>
         <output message="tns:StringMessage"/>
       </operation>
  -    <!--operation name="multiMimeParts3">
  +    <operation name="multiOutMimeParts">
  +      <input message="tns:StringMessage"/>
  +      <output message="tns:MultiMimePartsMessage"/>
  +    </operation>
  +    <operation name="multiInoutMimeParts">
         <input message="tns:MultiMimePartsMessage"/>
  -      <output message="tns:StringMessage"/>
  -    </operation-->
  -    <operation name="nested">
  -      <input message="tns:DataHandlerMessage"/>
  -      <output message="tns:StringMessage"/>
  +      <output message="tns:MultiMimePartsMessage"/>
  +    </operation>
  +    <operation name="noContent">
  +      <input message="tns:StringMessage"/>
  +      <output message="tns:String2Message"/>
       </operation>
  -    <operation name="badNoType">
  +    <operation name="typeStar">
         <input message="tns:DataHandlerMessage"/>
         <output message="tns:StringMessage"/>
       </operation>
  -    <operation name="badNoPart">
  -      <input message="tns:DataHandlerMessage"/>
  +    <operation name="soapBodyParts1">
  +      <input message="tns:BounceImage4Message"/>
         <output message="tns:StringMessage"/>
       </operation>
  -    <operation name="badNoContent">
  -      <input message="tns:DataHandlerMessage"/>
  +    <operation name="soapBodyParts2">
  +      <input message="tns:BounceImage4Message"/>
         <output message="tns:StringMessage"/>
       </operation>
  -    <operation name="badType">
  -      <input message="tns:DataHandlerMessage"/>
  +    <operation name="soapBodyParts3">
  +      <input message="tns:BounceImage4Message"/>
         <output message="tns:StringMessage"/>
       </operation>
  -    <operation name="badPart">
  -      <input message="tns:DataHandlerMessage"/>
  +    <operation name="soapBodyParts4">
  +      <input message="tns:BounceImage4Message"/>
         <output message="tns:StringMessage"/>
       </operation>
     </portType>
  @@ -128,11 +134,13 @@
         <input>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="file" type="text/html"/>
               <soap:body use="encoded"
                          namespace="http://mime/"
                          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
             </mime:part>
  +          <mime:part>
  +            <mime:content part="file" type="text/html"/>
  +          </mime:part>
           </mime:multipartRelated> 
         </input>
         <output>
  @@ -141,6 +149,7 @@
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
       </operation>
  +
       <operation name="stringToDataHandler">
         <soap:operation soapAction=""/>
         <input>
  @@ -151,24 +160,29 @@
         <output>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="file" type="text/html"/>
               <soap:body use="encoded"
                          namespace="http://mime/"
                          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
             </mime:part>
  +          <mime:part>
  +            <mime:content part="file" type="text/html"/>
  +          </mime:part>
           </mime:multipartRelated> 
         </output>
       </operation>
  +
       <operation name="plainTextToString">
         <soap:operation soapAction=""/>
         <input>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="plaintext" type="text/plain"/>
               <soap:body use="encoded"
                          namespace="http://mime/"
                          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
             </mime:part>
  +          <mime:part>
  +            <mime:content part="plaintext" type="text/plain"/>
  +          </mime:part>
           </mime:multipartRelated> 
         </input>
         <output>
  @@ -177,6 +191,7 @@
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
       </operation>
  +
       <operation name="stringToPlainText">
         <soap:operation soapAction=""/>
         <input>
  @@ -187,57 +202,69 @@
         <output>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="plaintext" type="text/plain"/>
               <soap:body use="encoded"
                          namespace="http://mime/"
                          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
             </mime:part>
  +          <mime:part>
  +            <mime:content part="plaintext" type="text/plain"/>
  +          </mime:part>
           </mime:multipartRelated> 
         </output>
       </operation>
  +
       <operation name="bounceImage">
         <soap:operation soapAction=""/>
         <input>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="image1" type="image/jpeg"/>
               <soap:body use="encoded"
                          namespace="http://mime/"
                          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
             </mime:part>
  +          <mime:part>
  +            <mime:content part="image1" type="image/jpeg"/>
  +          </mime:part>
           </mime:multipartRelated> 
         </input>
         <output>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="image2" type="image/jpeg"/>
               <soap:body use="encoded"
                          namespace="http://mime/"
                          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
             </mime:part>
  +          <mime:part>
  +            <mime:content part="image2" type="image/jpeg"/>
  +          </mime:part>
           </mime:multipartRelated> 
         </output>
       </operation>
  +
       <operation name="bounceImage2">
         <soap:operation soapAction=""/>
         <input>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="file" type="image/jpeg"/>
               <soap:body use="encoded"
                          namespace="http://mime/"
                          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
             </mime:part>
  +          <mime:part>
  +            <mime:content part="file" type="image/jpeg"/>
  +          </mime:part>
           </mime:multipartRelated> 
         </input>
         <output>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="file2" type="image/jpeg"/>
               <soap:body use="encoded"
                          namespace="http://mime/"
                          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
             </mime:part>
  +          <mime:part>
  +            <mime:content part="file2" type="image/jpeg"/>
  +          </mime:part>
           </mime:multipartRelated> 
         </output>
       </operation>
  @@ -252,37 +279,7 @@
             <mime:part>
               <mime:content part="file" type="image/jpeg"/>
             </mime:part>
  -        </mime:multipartRelated> 
  -        <soap:body use="encoded"
  -                   namespace="http://mime/"
  -                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  -      </input>
  -      <output>
  -        <mime:multipartRelated>
  -          <mime:part>
  -            <mime:content part="file2" type="image/jpeg"/>
  -          </mime:part>
  -        </mime:multipartRelated> 
  -        <soap:body use="encoded"
  -                   namespace="http://mime/"
  -                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  -      </output>
  -    </operation>
  -    
  -    <!-- bounceImage5 doesn't work because the soap:body (which contains a 
  -         boolean) is within the mime:part. bounceImage4 works because the
  -         soap:body is a direct child of the binding input. When I try to 
  -         run bounceImage5, WSDL4J says the soap:body doesn't contain any
  -         parts. But having the soap:body inside the mime:part is valid WSDL
  -         (according to the wsdl4j PopulatedExtensionRegistry). So what does
  -         it mean? 
  -         Must test soap:body parts="a b c" as well here ?? -->
  -    <operation name="bounceImage5">
  -      <soap:operation soapAction=""/>
  -      <input>
  -        <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="file" type="image/jpeg"/>
               <soap:body use="encoded"
                          namespace="http://mime/"
                          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  @@ -293,6 +290,8 @@
           <mime:multipartRelated>
             <mime:part>
               <mime:content part="file2" type="image/jpeg"/>
  +          </mime:part>
  +          <mime:part>
               <soap:body use="encoded"
                          namespace="http://mime/"
                          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  @@ -301,26 +300,19 @@
         </output>
       </operation>
       
  -    <!-- Is it valid to have no soap body at all? -->
  -    <operation name="noSoapBody">
  +    <!-- orMultiMimeParts tests passing in one of two different mime parts -->
  +    <operation name="orMultiMimeParts">
         <soap:operation soapAction=""/>
         <input>
           <mime:multipartRelated>
             <mime:part>
  +            <mime:content part="file" type="text/html"/>
               <mime:content part="file" type="image/jpeg"/>
             </mime:part>
  -        </mime:multipartRelated> 
  -      </input>
  -    </operation>
  -
  -    <!-- multiMimeParts tests passing in multiple mime parts -->
  -    <operation name="multiMimeParts1">
  -      <soap:operation soapAction=""/>
  -      <input>
  -        <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="file" type="text/plain"/>
  -            <mime:content part="file2" type="text/plain"/>
  +            <soap:body use="encoded"
  +                       namespace="http://mime/"
  +                       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
             </mime:part>
           </mime:multipartRelated> 
         </input>
  @@ -330,7 +322,9 @@
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
       </operation>
  -    <operation name="multiMimeParts2">
  +
  +    <!-- andMultiMimeParts tests passing in two different mime parts -->
  +    <operation name="andMultiMimeParts">
         <soap:operation soapAction=""/>
         <input>
           <mime:multipartRelated>
  @@ -340,6 +334,11 @@
             <mime:part>
               <mime:content part="file2" type="text/plain"/>
             </mime:part>
  +          <mime:part>
  +            <soap:body use="encoded"
  +                       namespace="http://mime/"
  +                       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +          </mime:part>
           </mime:multipartRelated> 
         </input>
         <output>
  @@ -348,54 +347,44 @@
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
       </operation>
  -    <!--operation name="multiMimeParts3">
  +
  +    <!-- multiOutMimeParts tests returning multiple output mime parts -->
  +    <operation name="multiOutMimeParts">
         <soap:operation soapAction=""/>
         <input>
  +        <soap:body use="encoded"
  +                   namespace="http://mime/"
  +                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +      </input>
  +      <output>
           <mime:multipartRelated>
             <mime:part>
               <mime:content part="file" type="text/plain"/>
             </mime:part>
  -        </mime:multipartRelated> 
  -        <mime:multipartRelated>
             <mime:part>
               <mime:content part="file2" type="text/plain"/>
             </mime:part>
  -        </mime:multipartRelated> 
  -      </input>
  -      <output>
  -        <soap:body use="encoded"
  -                   namespace="http://mime/"
  -                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  -      </output>
  -    </operation>
  --->
  -    <operation name="nested">
  -      <soap:operation soapAction=""/>
  -      <input>
  -        <mime:multipartRelated>
             <mime:part>
  -            <mime:multipartRelated>
  -              <mime:part>
  -                <mime:content part="file" type="text/plain"/>
  -              </mime:part>
  -            </mime:multipartRelated> 
  +            <soap:body use="encoded"
  +                       namespace="http://mime/"
  +                       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
             </mime:part>
           </mime:multipartRelated> 
  -      </input>
  -      <output>
  -        <soap:body use="encoded"
  -                   namespace="http://mime/"
  -                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
       </operation>
   
  -    <!--+++++++++++++++++++++++++ ERRORS +++++++++++++++++++++++++-->
  -    <operation name="badNoType">
  +    <!-- multiInoutMimeParts tests multiple inout mime parts -->
  +    <operation name="multiInoutMimeParts">
         <soap:operation soapAction=""/>
         <input>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="file"/>
  +            <mime:content part="file" type="text/plain"/>
  +          </mime:part>
  +          <mime:part>
  +            <mime:content part="file2" type="text/plain"/>
  +          </mime:part>
  +          <mime:part>
               <soap:body use="encoded"
                          namespace="http://mime/"
                          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  @@ -403,30 +392,25 @@
           </mime:multipartRelated> 
         </input>
         <output>
  -        <soap:body use="encoded"
  -                   namespace="http://mime/"
  -                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  -      </output>
  -    </operation>
  -    <operation name="badNoPart">
  -      <soap:operation soapAction=""/>
  -      <input>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content type="text/plain"/>
  +            <mime:content part="file" type="text/plain"/>
  +          </mime:part>
  +          <mime:part>
  +            <mime:content part="file2" type="text/plain"/>
  +          </mime:part>
  +          <mime:part>
               <soap:body use="encoded"
                          namespace="http://mime/"
                          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
             </mime:part>
           </mime:multipartRelated> 
  -      </input>
  -      <output>
  -        <soap:body use="encoded"
  -                   namespace="http://mime/"
  -                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
       </operation>
  -    <operation name="badNoContent">
  +
  +    <!-- Defining a mime message that doesn't contain any attachments is 
  +         probably valid. Anyway we allow it -->
  +    <operation name="noContent">
         <soap:operation soapAction=""/>
         <input>
           <mime:multipartRelated>
  @@ -443,16 +427,20 @@
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
       </operation>
  -    <operation name="badPart">
  +
  +    <!-- Test out type="text/*" -->
  +    <operation name="typeStar">
         <soap:operation soapAction=""/>
         <input>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="trash" type="text/plain"/>
               <soap:body use="encoded"
                          namespace="http://mime/"
                          encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
             </mime:part>
  +          <mime:part>
  +             <mime:content part="file" type="text/*"/>
  +          </mime:part>
           </mime:multipartRelated> 
         </input>
         <output>
  @@ -461,15 +449,20 @@
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
       </operation>
  -    <operation name="badType">
  +
  +    <!-- Test out soap:body parts="a b c" -->
  +    <operation name="soapBodyParts1">
         <soap:operation soapAction=""/>
         <input>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="file" type="trash"/>
               <soap:body use="encoded"
                          namespace="http://mime/"
  -                       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +                       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  +                       parts="file shouldBounce" />
  +          </mime:part>
  +          <mime:part>
  +             <mime:content part="file" type="text/plain"/>
             </mime:part>
           </mime:multipartRelated> 
         </input>
  @@ -479,20 +472,19 @@
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
       </operation>
  -  </binding>
   
  -  <!-- binding name="SOAPJmsBinding" type="tns:Mime">
  -    <soap:binding style="rpc"
  -                  transport="http://schemas.xmlsoap.org/soap/jms"/>
  -    <operation name="dataHandlerToString">
  +    <operation name="soapBodyParts2">
         <soap:operation soapAction=""/>
         <input>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="file" type="text/html"/>
               <soap:body use="encoded"
                          namespace="http://mime/"
  -                       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +                       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  +                       parts="file" />
  +          </mime:part>
  +          <mime:part>
  +             <mime:content part="file" type="text/plain"/>
             </mime:part>
           </mime:multipartRelated> 
         </input>
  @@ -502,33 +494,19 @@
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
       </operation>
  -    <operation name="stringToDataHandler">
  +
  +    <operation name="soapBodyParts3">
         <soap:operation soapAction=""/>
         <input>
  -        <soap:body use="encoded"
  -                   namespace="http://mime/"
  -                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  -      </input>
  -      <output>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="file" type="text/html"/>
               <soap:body use="encoded"
                          namespace="http://mime/"
  -                       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +                       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  +                       parts="shouldBounce" />
             </mime:part>
  -        </mime:multipartRelated> 
  -      </output>
  -    </operation>
  -    <operation name="dataSourceToString">
  -      <soap:operation soapAction=""/>
  -      <input>
  -        <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="file" type="text/html"/>
  -            <soap:body use="encoded"
  -                       namespace="http://mime/"
  -                       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +             <mime:content part="file" type="text/plain"/>
             </mime:part>
           </mime:multipartRelated> 
         </input>
  @@ -538,24 +516,34 @@
                      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
       </operation>
  -    <operation name="stringToDataSource">
  +
  +    <operation name="soapBodyParts4">
         <soap:operation soapAction=""/>
         <input>
  -        <soap:body use="encoded"
  -                   namespace="http://mime/"
  -                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  -      </input>
  -      <output>
           <mime:multipartRelated>
             <mime:part>
  -            <mime:content part="file" type="text/html"/>
               <soap:body use="encoded"
                          namespace="http://mime/"
  -                       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  +                       encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  +                       parts=" " />
  +          </mime:part>
  +          <mime:part>
  +             <mime:content part="file" type="text/plain"/>
             </mime:part>
           </mime:multipartRelated> 
  +      </input>
  +      <output>
  +        <soap:body use="encoded"
  +                   namespace="http://mime/"
  +                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
         </output>
       </operation>
  +  </binding>
  +
  +  <!-- Mime/Axis/Jms is not supported at present
  +     binding name="SOAPJmsBinding" type="tns:Mime">
  +    <soap:binding style="rpc"
  +                  transport="http://schemas.xmlsoap.org/soap/jms"/>
     </binding -->
   
     <!-- service decln -->
  
  
  
  1.3       +343 -124  xml-axis-wsif/java/test/mime/MimeTest.java
  
  Index: MimeTest.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/test/mime/MimeTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MimeTest.java	11 Nov 2002 15:36:04 -0000	1.2
  +++ MimeTest.java	14 Nov 2002 13:49:34 -0000	1.3
  @@ -112,6 +112,7 @@
       private final static String imageLocation = wsdlPath + "axis.jpg";
       private final static String flatfileLocation = wsdlPath + "test.txt";
       private final static String flatfileLocation2 = wsdlPath + "test2.txt";
  +    private final static String portName = "SOAPPort";
   
       private final static String SEND_DH = "SEND-DH";
       private final static String RECEIVE_DH = "RECEIVE-DH";
  @@ -127,16 +128,26 @@
       private final static String RECEIVE_SOURCE = "RECEIVE-SOURCE";
       private final static String SEND_MIMEMULTIPART = "SEND-MIMEMULTIPART";
       private final static String RECEIVE_MIMEMULTIPART = "RECEIVE-MIMEMULTIPART";
  -    private final static String NO_SOAP_BODY = "NO-SOAP-BODY";
  -    private final static String MULTIPARTS1 = "MULTIPARTS1";
  -    private final static String MULTIPARTS2 = "MULTIPARTS2";
  -    private final static String MULTIPARTS3 = "MULTIPARTS3";
  -    private final static String NESTED = "NESTED";
  +    private final static String OR_MULTIPARTS1 = "OR-MULTIPARTS1";
  +    private final static String OR_MULTIPARTS2 = "OR-MULTIPARTS2";
  +    private final static String AND_MULTIPARTS = "AND-MULTIPARTS";
  +    private final static String MULTI_OUT_PARTS = "MULTI-OUT-PARTS";
  +    private final static String MULTI_INOUT_PARTS = "MULTI-INOUT-PARTS";
  +    private final static String NO_CONTENT = "NO-CONTENT";
  +    private final static String TYPE_STAR = "TYPE-STAR";
  +    private final static String SOAP_BODY_PARTS1 = "SOAP_BODY_PARTS1";
  +    private final static String SOAP_BODY_PARTS2 = "SOAP_BODY_PARTS2";
  +    private final static String SOAP_BODY_PARTS3 = "SOAP_BODY_PARTS3";
  +    private final static String SOAP_BODY_PARTS4 = "SOAP_BODY_PARTS4";
  +    private final static String BAD_NO_SOAP_BODY = "BAD-NO-SOAP-BODY";
       private final static String BAD_NO_TYPE = "BAD-NO-TYPE";
       private final static String BAD_NO_PART = "BAD-NO-PART";
  -    private final static String BAD_NO_CONTENT = "BAD-NO-CONTENT";
       private final static String BAD_TYPE = "BAD-TYPE";
       private final static String BAD_PART = "BAD-PART";
  +    private final static String BAD_NESTED = "BAD-NESTED";
  +    private final static String BAD_MIX_SOAP_MIME = "BAD-MIX-SOAP-MIME";
  +    private final static String BAD_MULTIPLE_SOAP_BODIES = "BAD-MULTIPLE-SOAP-BODIES";
  +    private final static String BAD_SOAP_BODY_TYPE = "BAD-SOAP-BODY-TYPE";
   
       /** 
        * Milliseconds to sleep while the user looks at the displayed images.
  @@ -177,131 +188,178 @@
           TestUtilities.setUpExtensionsAndProviders();
       }
   
  -    public void testAxisSendHandlerSync() {
  -        doit("SOAPPort", SEND_DH, SYNC);
  +    public void testSendHandler() {
  +        doit(SEND_DH);
       }
   
  -    public void testAxisReceiveHandlerSync() {
  -        doit("SOAPPort", RECEIVE_DH, SYNC);
  +    public void testReceiveHandler() {
  +        doit(RECEIVE_DH);
       }
   
  -    public void testAxisSendPlainTextSync() {
  -        doit("SOAPPort", SEND_PLAINTEXT, SYNC);
  +    public void testSendPlainText() {
  +        doit(SEND_PLAINTEXT);
       }
   
       /*
  -     * public void testAxisReceivePlainTextSync() {
  -     *    doit("SOAPPort", RECEIVE_PLAINTEXT, SYNC);
  +     * public void testReceivePlainText() {
  +     *    doit(RECEIVE_PLAINTEXT);
        * }
        */
   
  -    public void testAxisBounceImageSync() {
  -        doit("SOAPPort", BOUNCE_IMAGE, SYNC);
  +    public void testBounceImage() {
  +        doit(BOUNCE_IMAGE);
       }
   
  -    public void testAxisBounceImage2Sync() {
  -        doit("SOAPPort", BOUNCE_IMAGE2, SYNC);
  +    public void testBounceImage2() {
  +        doit(BOUNCE_IMAGE2);
       }
   
  -    public void testAxisBounceImage3Sync() {
  -        doit("SOAPPort", BOUNCE_IMAGE3, SYNC);
  +    public void testBounceImage3() {
  +        doit(BOUNCE_IMAGE3);
       }
   
  -    public void testAxisBounceImage4Default() {
  -        doit("SOAPPort", BOUNCE_IMAGE4_DEFAULT, SYNC);
  +    public void testBounceImage4Default() {
  +        doit(BOUNCE_IMAGE4_DEFAULT);
       }
   
  -//    public void testAxisBounceImage4False() {
  -//        doit("SOAPPort", BOUNCE_IMAGE4_FALSE, SYNC);
  -//    }
  -//
  -//    public void testAxisBounceImage4Null() {
  -//        doit("SOAPPort", BOUNCE_IMAGE4_NULL, SYNC);
  -//    }
  -//
  -//    /*
  -//     * bounceImage5 doesn't work because the soap:body (which contains a 
  -//     *    boolean) is within the mime:part. bounceImage4 works because the
  -//     *    soap:body is a direct child of the binding input. When I try to 
  -//     *    run bounceImage5, WSDL4J says the soap:body doesn't contain any
  -//     *    parts. But having the soap:body inside the mime:part is valid WSDL
  -//     *    (according to the wsdl4j PopulatedExtensionRegistry). So what does
  -//     *    it mean? 
  -//     */
  -//
  -//    /*
  -//     * public void testAxisSendSourceSync() {
  -//     *     doit("SOAPPort", SEND_SOURCE, SYNC);
  -//     * }
  -//     *
  -//     * public void testAxisReceiveSourceSync() {
  -//     *     doit("SOAPPort", RECEIVE_SOURCE, SYNC);
  -//     * }
  -//     *
  -//     * public void testAxisSendMimeMultipartSync() {
  -//     *     doit("SOAPPort", SEND_MIMEMULTIPART, SYNC);
  -//     * }
  -//     *
  -//     * public void testAxisReceiveMimeMultipartSync() {
  -//     *     doit("SOAPPort", RECEIVE_MIMEMULTIPART, SYNC);
  -//     * }
  -//     */
  -//
  -//    /*
  -//     * Sending MIME messages using Axis over Jms should be supported 
  -//     * by WSIF, but currently this does not work. I think the problem
  -//     * is that WSIFJmsSender does not set up the necessary headers needed
  -//     * for MIME. I don't know whether these headers can go inline in the
  -//     * message or whether they will have to go as JMS properties which 
  -//     * will then get converted into HTTP headers by the JMS2HTTPBridge.
  -//     * For more information about the headers please see 
  -//     * org.apache.axis.transport.http.HTTPSender. For the moment I have 
  -//     * commented out this Jms test (and omitted other JMS tests like 
  -//     * the async tests) because it fails.
  -//     *
  -//     * public void testAxisJmsSendSync() {
  -//     *   doit("SOAPJMSPort", SEND, SYNC);
  -//     * }
  -//     */
  -//
  -//    public void testAxisNoSoapBody() {
  -//        doit("SOAPPort", NO_SOAP_BODY, SYNC);
  -//    }
  +    public void testBounceImage4False() {
  +        doit(BOUNCE_IMAGE4_FALSE);
  +    }
  +
  +    /*
  +     * This next test fails because axis will not allow null 
  +     * parameters to be passed in.
  +     * 
  +     * public void testBounceImage4Null() {
  +     *     doit(BOUNCE_IMAGE4_NULL);
  +     * }
  +     */
  +
  +    /*
  +     * bounceImage5 doesn't work because the soap:body (which contains a 
  +     *    boolean) is within the mime:part. bounceImage4 works because the
  +     *    soap:body is a direct child of the binding input. When I try to 
  +     *    run bounceImage5, WSDL4J says the soap:body doesn't contain any
  +     *    parts. But having the soap:body inside the mime:part is valid WSDL
  +     *    (according to the wsdl4j PopulatedExtensionRegistry). So what does
  +     *    it mean? 
  +     */
  +
  +    /*
  +     * public void testSendSource() {
  +     *     doit(SEND_SOURCE);
  +     * }
  +     *
  +     * public void testReceiveSource() {
  +     *     doit(RECEIVE_SOURCE);
  +     * }
  +     *
  +     * public void testSendMimeMultipart() {
  +     *     doit(SEND_MIMEMULTIPART);
  +     * }
  +     *
  +     * public void testReceiveMimeMultipart() {
  +     *     doit(RECEIVE_MIMEMULTIPART);
  +     * }
  +     */
  +
  +    /*
  +     * Sending MIME messages using Axis over Jms should be supported 
  +     * by WSIF, but currently this does not work. I think the problem
  +     * is that WSIFJmsSender does not set up the necessary headers needed
  +     * for MIME. I don't know whether these headers can go inline in the
  +     * message or whether they will have to go as JMS properties which 
  +     * will then get converted into HTTP headers by the JMS2HTTPBridge.
  +     * For more information about the headers please see 
  +     * org.apache.axis.transport.http.HTTPSender. For the moment I have 
  +     * commented out this Jms test (and omitted other JMS tests like 
  +     * the async tests) because it fails.
  +     *
  +     * public void testJmsSend() {
  +     *   doit("SOAPJMSPort", SEND);
  +     * }
  +     */
  +
  +    public void testOrMultiParts1() {
  +        doit(OR_MULTIPARTS1);
  +    }
  +
  +    public void testOrMultiParts2() {
  +        doit(OR_MULTIPARTS2);
  +    }
  +
  +    public void testAndMultiParts() {
  +        doit(AND_MULTIPARTS);
  +    }
  +
  +    /*
  +     *  public void testMultiOutParts() {
  +     *     doit(MULTI_OUT_PARTS);
  +     * }
  +     *
  +     * public void testMultiInoutParts() {
  +     *     doit(MULTI_INOUT_PARTS);
  +     * }
  +     */
  +
  +    public void testNoContent() {
  +        doit(NO_CONTENT);
  +    }
  +
  +    public void testTypeStar() {
  +        doit(TYPE_STAR);
  +    }
  +
  +    public void testSoapBodyParts1() {
  +        doit(SOAP_BODY_PARTS1);
  +    }
  +
  +    public void testSoapBodyParts2() {
  +        doit(SOAP_BODY_PARTS2);
  +    }
  +
  +    public void testSoapBodyParts3() {
  +        doit(SOAP_BODY_PARTS3);
  +    }
  +
  +    public void testSoapBodyParts4() {
  +        doit(SOAP_BODY_PARTS4);
  +    }
   //
  -//    public void testAxisMultiParts1() {
  -//        doit("SOAPPort", MULTIPARTS1, SYNC);
  +//    public void testBadNoSoapBody() {
  +//        doit(BAD_NO_SOAP_BODY);
   //    }
   //
  -//    public void testAxisMultiParts2() {
  -//        doit("SOAPPort", MULTIPARTS2, SYNC);
  +//    public void testBadNoType() {
  +//        doit(BAD_NO_TYPE);
   //    }
   //
  -//    public void testAxisMultiParts3() {
  -//        doit("SOAPPort", MULTIPARTS3, SYNC);
  +//    public void testBadNoPart() {
  +//        doit(BAD_NO_PART);
   //    }
   //
  -//    public void testAxisNested() {
  -//        doit("SOAPPort", NESTED, SYNC);
  +//    public void testBadType() {
  +//        doit(BAD_TYPE);
   //    }
   //
  -//    public void testAxisBadNoType() {
  -//        doit("SOAPPort", BAD_NO_TYPE, SYNC);
  +//    public void testBadPart() {
  +//        doit(BAD_PART);
   //    }
   //
  -//    public void testAxisBadNoPart() {
  -//        doit("SOAPPort", BAD_NO_PART, SYNC);
  +//    public void testBadNested() {
  +//        doit(BAD_NESTED);
   //    }
   //
  -//    public void testAxisBadNoContent() {
  -//        doit("SOAPPort", BAD_NO_CONTENT, SYNC);
  +//    public void testBadMixSoapMime() {
  +//        doit(BAD_MIX_SOAP_MIME);
   //    }
   //
  -//    public void testAxisBadType() {
  -//        doit("SOAPPort", BAD_TYPE, SYNC);
  +//    public void testBadMultipleSoapBodies() {
  +//        doit(BAD_MULTIPLE_SOAP_BODIES);
   //    }
   //
  -//    public void testAxisBadPart() {
  -//        doit("SOAPPort", BAD_PART, SYNC);
  +//    public void testBadSoapBodyType() {
  +//        doit(BAD_SOAP_BODY_TYPE);
   //    }
   
       /**
  @@ -314,7 +372,7 @@
        * DataHandler, not a String. So be careful where mapTypes(plaintext,String)
        * is done.
        */
  -    private void doit(String portName, String cmd, boolean blocking) {
  +    private void doit(String cmd) {
           if (!TestUtilities.areWeTesting("mime"))
               return;
               
  @@ -363,26 +421,46 @@
                   send_mimemultipart(service,stub);
               else if (cmd.equals(RECEIVE_MIMEMULTIPART))
                   receive_mimemultipart(service,stub);
  -            else if (cmd.equals(NO_SOAP_BODY))
  -                no_soap_body(service,stub);
  -            else if (cmd.equals(MULTIPARTS1))
  -                multiparts(service,stub);
  -            else if (cmd.equals(MULTIPARTS2))
  -                multiparts(service,stub);
  -            else if (cmd.equals(MULTIPARTS3))
  -                multiparts(service,stub);
  -            else if (cmd.equals(NESTED))
  -                nested(service,stub);
  +            else if (cmd.equals(OR_MULTIPARTS1))
  +                or_multiparts1(service,stub);
  +            else if (cmd.equals(OR_MULTIPARTS2))
  +                or_multiparts2(service,stub);
  +            else if (cmd.equals(AND_MULTIPARTS))
  +                and_multiparts(service,stub);
  +            else if (cmd.equals(MULTI_OUT_PARTS))
  +                multi_out_parts(service,stub);
  +            else if (cmd.equals(MULTI_INOUT_PARTS))
  +                multi_inout_parts(service,stub);
  +            else if (cmd.equals(NO_CONTENT))
  +                no_content(service,stub);
  +            else if (cmd.equals(TYPE_STAR))
  +                type_star(service,stub);
  +            else if (cmd.equals(SOAP_BODY_PARTS1))
  +                soap_body_parts1(service,stub);
  +            else if (cmd.equals(SOAP_BODY_PARTS2))
  +                soap_body_parts2(service,stub);
  +            else if (cmd.equals(SOAP_BODY_PARTS3))
  +                soap_body_parts3(service,stub);
  +            else if (cmd.equals(SOAP_BODY_PARTS4))
  +                soap_body_parts4(service,stub);
  +            else if (cmd.equals(BAD_NO_SOAP_BODY))
  +                bad_no_soap_body(service,stub);
               else if (cmd.equals(BAD_NO_TYPE))
                   bad_no_type(service,stub);
               else if (cmd.equals(BAD_NO_PART))
                   bad_no_part(service,stub);
  -            else if (cmd.equals(BAD_NO_CONTENT))
  -                bad_no_content(service,stub);
               else if (cmd.equals(BAD_PART))
                   bad_part(service,stub);
               else if (cmd.equals(BAD_TYPE))
                   bad_type(service,stub);
  +            else if (cmd.equals(BAD_NESTED))
  +                bad_nested(service,stub);
  +            else if (cmd.equals(BAD_MIX_SOAP_MIME))
  +                bad_mix_soap_mime(service,stub);
  +            else if (cmd.equals(BAD_MULTIPLE_SOAP_BODIES))
  +                bad_multiple_soap_bodies(service,stub);
  +            else if (cmd.equals(BAD_SOAP_BODY_TYPE))
  +                bad_soap_body_type(service,stub);
               else
                   assertTrue(false);
   
  @@ -550,24 +628,129 @@
           assertTrue(false);
       }
   
  -    private void no_soap_body(WSIFService service, Mime stub) throws Exception {
  -        stub.noSoapBody(new DataHandler(new FileDataSource(imageLocation)));
  +    private void or_multiparts1(WSIFService service, Mime stub) throws Exception {
  +        DataHandler dh = new DataHandler(new FileDataSource(flatfileLocation));
  +        String buff = stub.orMultiMimeParts(dh);
  +        assertTrue("text/plain".equals(buff));
  +    }
  +
  +    private void or_multiparts2(WSIFService service, Mime stub) throws Exception {
  +        DataHandler dh = new DataHandler(new FileDataSource(imageLocation));
  +        String buff = stub.orMultiMimeParts(dh);
  +        assertTrue("image/jpeg".equals(buff));
       }
   
  -    private void multiparts(WSIFService service, Mime stub) throws Exception {
  +    private void and_multiparts(WSIFService service, Mime stub) throws Exception {
           DataHandler dh1 = new DataHandler(new FileDataSource(flatfileLocation));
           DataHandler dh2 = new DataHandler(new FileDataSource(flatfileLocation2));
  -        String buff = stub.multiParts(dh1,dh2);
  -        
  -        assertTrue(concat(flatfileLocation, flatfileLocation2).equals(buff));
  +        String buff = stub.andMultiMimeParts(dh1,dh2);
  +        assertTrue(concat(flatfileLocation,flatfileLocation2).equals(buff));
  +    }
  +
  +    private void multi_out_parts(WSIFService service, Mime stub) throws Exception {
  +        assertTrue(false);
  +    }
  +
  +    private void multi_inout_parts(WSIFService service, Mime stub) throws Exception {
  +        assertTrue(false);
       }
   
  -    private void nested(WSIFService service, Mime stub) throws Exception {
  +    private void no_content(WSIFService service, Mime stub) throws Exception {
  +        assertTrue(rhyme[0].equals(stub.noContent(rhyme[0])));
  +    }
  +
  +    private void type_star(WSIFService service, Mime stub) throws Exception {
           DataHandler dh = new DataHandler(new FileDataSource(flatfileLocation));
  -        String buff = stub.nested(dh);
  +        String buff = stub.dataHandlerToString(dh);
           assertTrue(compareFiles(flatfileLocation, buff));
       }
   
  +    /**
  +     * These next tests have to be run stubless because they test the parts="..."
  +     * in the soap:body and the WSIFClientProxy doesn't look in the binding
  +     * and so would not be able to find this signature in the portType.
  +     */
  +    private void soap_body_parts1(WSIFService service, Mime stub)
  +        throws Exception {
  +        DataHandler dh = new DataHandler(new FileDataSource(flatfileLocation));
  +        WSIFPort port = service.getPort(portName);
  +        WSIFOperation op = port.createOperation("soapBodyParts1");
  +        WSIFMessage in = op.createInputMessage();
  +        WSIFMessage out = op.createOutputMessage();
  +        WSIFMessage fault = op.createFaultMessage();
  +        in.setObjectPart("file",dh);
  +        in.setBooleanPart("shouldBounce",true);
  +
  +        boolean success = op.executeRequestResponseOperation(in,out,fault);
  +        assertTrue(success);
  +
  +        String s = (String)(out.getObjectPart("buff"));
  +        assertTrue("1".equals(s));
  +    }
  +
  +    private void soap_body_parts2(WSIFService service, Mime stub)
  +        throws Exception {
  +        DataHandler dh = new DataHandler(new FileDataSource(flatfileLocation));
  +        WSIFPort port = service.getPort(portName);
  +        WSIFOperation op = port.createOperation("soapBodyParts2");
  +        WSIFMessage in = op.createInputMessage();
  +        WSIFMessage out = op.createOutputMessage();
  +        WSIFMessage fault = op.createFaultMessage();
  +        in.setObjectPart("file",dh);
  +
  +        boolean success = op.executeRequestResponseOperation(in,out,fault);
  +        assertTrue(success);
  +
  +        String s = (String)(out.getObjectPart("buff"));
  +        assertTrue("2".equals(s));
  +    }
  +
  +    private void soap_body_parts3(WSIFService service, Mime stub)
  +        throws Exception {
  +        WSIFPort port = service.getPort(portName);
  +        WSIFOperation op = port.createOperation("soapBodyParts3");
  +        WSIFMessage in = op.createInputMessage();
  +        WSIFMessage out = op.createOutputMessage();
  +        WSIFMessage fault = op.createFaultMessage();
  +        in.setBooleanPart("shouldBounce",true);
  +
  +        boolean success = op.executeRequestResponseOperation(in,out,fault);
  +        assertTrue(success);
  +
  +        String s = (String)(out.getObjectPart("buff"));
  +        assertTrue("3".equals(s));
  +    }
  +
  +    private void soap_body_parts4(WSIFService service, Mime stub)
  +        throws Exception {
  +        WSIFPort port = service.getPort(portName);
  +        WSIFOperation op = port.createOperation("soapBodyParts4");
  +        WSIFMessage in = op.createInputMessage();
  +        WSIFMessage out = op.createOutputMessage();
  +        WSIFMessage fault = op.createFaultMessage();
  +
  +        boolean success = op.executeRequestResponseOperation(in,out,fault);
  +        assertTrue(success);
  +
  +        String s = (String)(out.getObjectPart("buff"));
  +        assertTrue("4".equals(s));
  +    }
  +
  +    /* *********************** ERRORS ********************************** */
  +    
  +    private void bad_no_soap_body(WSIFService service, Mime stub)
  +        throws Exception {
  +        boolean exceptionCaught = false;
  +        try {
  +            stub.badNoSoapBody(
  +                new DataHandler(new FileDataSource(imageLocation)));
  +        } catch (WSIFException we) {
  +            exceptionCaught = true;
  +            System.out.println("Expected exception=" + we);
  +        }
  +        assertTrue(exceptionCaught);
  +    }
  +
       private void bad_no_type(WSIFService service, Mime stub) throws Exception {
           DataHandler dh = new DataHandler(new FileDataSource(flatfileLocation));
           boolean exceptionCaught = false;
  @@ -592,11 +775,11 @@
           assertTrue(exceptionCaught);
       }
   
  -    private void bad_no_content(WSIFService service, Mime stub) throws Exception {
  +    private void bad_part(WSIFService service, Mime stub) throws Exception {
           DataHandler dh = new DataHandler(new FileDataSource(flatfileLocation));
           boolean exceptionCaught = false;
           try {
  -            String buff = stub.badNoContent(dh);
  +            String buff = stub.badPart(dh);
           } catch (WSIFException we) {
               exceptionCaught = true;
               System.out.println("Expected exception="+we);
  @@ -604,11 +787,11 @@
           assertTrue(exceptionCaught);
       }
   
  -    private void bad_part(WSIFService service, Mime stub) throws Exception {
  +    private void bad_type(WSIFService service, Mime stub) throws Exception {
           DataHandler dh = new DataHandler(new FileDataSource(flatfileLocation));
           boolean exceptionCaught = false;
           try {
  -            String buff = stub.badPart(dh);
  +            String buff = stub.badType(dh);
           } catch (WSIFException we) {
               exceptionCaught = true;
               System.out.println("Expected exception="+we);
  @@ -616,11 +799,47 @@
           assertTrue(exceptionCaught);
       }
   
  -    private void bad_type(WSIFService service, Mime stub) throws Exception {
  +    private void bad_nested(WSIFService service, Mime stub) throws Exception {
           DataHandler dh = new DataHandler(new FileDataSource(flatfileLocation));
           boolean exceptionCaught = false;
           try {
  -            String buff = stub.badType(dh);
  +            stub.badNested(dh);
  +        } catch (WSIFException we) {
  +            exceptionCaught = true;
  +            System.out.println("Expected exception="+we);
  +        }
  +        assertTrue(exceptionCaught);
  +    }
  +
  +    private void bad_mix_soap_mime(WSIFService service, Mime stub) throws Exception {
  +        DataHandler dh = new DataHandler(new FileDataSource(flatfileLocation));
  +        boolean exceptionCaught = false;
  +        try {
  +            String buff = stub.badMixSoapMime(dh);
  +        } catch (WSIFException we) {
  +            exceptionCaught = true;
  +            System.out.println("Expected exception="+we);
  +        }
  +        assertTrue(exceptionCaught);
  +    }
  +
  +    private void bad_multiple_soap_bodies(WSIFService service, Mime stub) throws Exception {
  +        DataHandler dh = new DataHandler(new FileDataSource(flatfileLocation));
  +        boolean exceptionCaught = false;
  +        try {
  +            String buff = stub.badMultipleSoapBodies(dh);
  +        } catch (WSIFException we) {
  +            exceptionCaught = true;
  +            System.out.println("Expected exception="+we);
  +        }
  +        assertTrue(exceptionCaught);
  +    }
  +
  +    private void bad_soap_body_type(WSIFService service, Mime stub) throws Exception {
  +        DataHandler dh = new DataHandler(new FileDataSource(flatfileLocation));
  +        boolean exceptionCaught = false;
  +        try {
  +            String buff = stub.badSoapBodyType(dh);
           } catch (WSIFException we) {
               exceptionCaught = true;
               System.out.println("Expected exception="+we);
  @@ -628,7 +847,7 @@
           assertTrue(exceptionCaught);
       }
   
  -    /*********************************************************************/
  +    /* ******************* UTILITIES ************************************* */
       
       private boolean compareFiles(DataHandler dh1, DataHandler dh2)
           throws FileNotFoundException, IOException {
  
  
  
  1.3       +22 -12    xml-axis-wsif/java/test/mime/Mime.java
  
  Index: Mime.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/test/mime/Mime.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Mime.java	11 Nov 2002 15:36:04 -0000	1.2
  +++ Mime.java	14 Nov 2002 13:49:34 -0000	1.3
  @@ -72,21 +72,31 @@
       public DataHandler bounceImage2(DataHandler dh);
       public DataHandler bounceImage4(DataHandler dh, boolean b);
   
  -//    public String dataSourceToString(DataSource ds);
  -//    public DataSource stringToDataSource(String buff);
  -//
  -//    public String dataSourceToString(DataSource ds);
  -//    public DataSource stringToDataSource(String buff);
  -//
  -//    public String dataSourceToString(DataSource ds);
  -//    public DataSource stringToDataSource(String buff);
  +    // Support for javax.xml.transform.Source and 
  +    // javax.mail.internet.MimeMultiPart is not implemented yet.
  +    // public String dataSourceToString(DataSource ds);
  +    // public DataSource stringToDataSource(String buff);
   
  -    public void noSoapBody(DataHandler dh);
  -    public String multiParts(DataHandler dh1, DataHandler dh2);
  -    public String nested(DataHandler dh);
  +    public String orMultiMimeParts(DataHandler dh);
  +    public String andMultiMimeParts(DataHandler dh, DataHandler dh2);
  +
  +    // multiOutMimeParts and multiInoutMimeParts are only 
  +    // invoked through the stubless interface
  +
  +    public String noContent(String s);
  +    public String typeStar(DataHandler dh);
  +    public String soapBodyParts1(DataHandler dh, boolean shouldBounce);
  +    public String soapBodyParts2(DataHandler dh);
  +    public String soapBodyParts3(boolean shouldBounce);
  +    public String soapBodyParts4();
  +
  +    public void badNoSoapBody(DataHandler dh) throws Exception;
       public String badNoType(DataHandler dh) throws Exception;
       public String badNoPart(DataHandler dh) throws Exception;
  -    public String badNoContent(DataHandler dh) throws Exception;
       public String badType(DataHandler dh) throws Exception;
       public String badPart(DataHandler dh) throws Exception;
  +    public String badNested(DataHandler dh) throws Exception;
  +    public String badMixSoapMime(DataHandler dh) throws Exception;
  +    public String badMultipleSoapBodies(DataHandler dh) throws Exception;
  +    public String badSoapBodyType(DataHandler dh) throws Exception;
   }
  
  
  
  1.3       +53 -8     xml-axis-wsif/java/test/mime/MimeImpl.java
  
  Index: MimeImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/test/mime/MimeImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MimeImpl.java	11 Nov 2002 15:36:04 -0000	1.2
  +++ MimeImpl.java	14 Nov 2002 13:49:34 -0000	1.3
  @@ -72,6 +72,7 @@
    * Mime service used by MimeTest 
    * @author Mark Whitlock
    */
  +
   public class MimeImpl {
   
       public String dataHandlerToString(DataHandler dh) {
  @@ -163,9 +164,11 @@
               return null;
       }
   
  -    public void noSoapBody(DataHandler dh) {}
  -    
  -    public String multiParts(DataHandler dh1, DataHandler dh2) {
  +    public String orMultiMimeParts(DataHandler dh) {
  +    	return dh.getContentType();
  +    }
  +
  +    public String andMultiMimeParts(DataHandler dh1, DataHandler dh2) {
           try {
               InputStream is1 = dh1.getInputStream();
               byte[] bBuff1 = new byte[is1.available()];
  @@ -183,11 +186,39 @@
               return null;
           }
       }
  -    
  -    public String nested(DataHandler dh) {
  +
  +    // MUST IMPLEMENT ???    
  +    // multiOutMimeParts and multiInoutMimeParts are only 
  +    // invoked through the stubless interface
  +
  +    public String noContent(String s) {
  +    	return s;
  +    }
  +
  +    public String typeStar(DataHandler dh) {
       	return dataHandlerToString(dh);
       }
   
  +    public String soapBodyParts1(DataHandler dh, boolean shouldBounce) {
  +        return "1";
  +    }
  +
  +    public String soapBodyParts2(DataHandler dh) {
  +        return "2";
  +    }
  +
  +    public String soapBodyParts3(boolean shouldBounce) {
  +        return "3";
  +    }
  +
  +    public String soapBodyParts4() {
  +        return "4";
  +    }
  +
  +    /* ******************* ERRORS *********************** */
  +    
  +    public void badNoSoapBody(DataHandler dh) {}
  +    
       public String badNoType(DataHandler dh) {
       	return dataHandlerToString(dh);
       }
  @@ -196,18 +227,32 @@
       	return dataHandlerToString(dh);
       }
   
  -    public String badNoContent(DataHandler dh) {
  +    public String badType(DataHandler dh) {
       	return dataHandlerToString(dh);
       }
   
  -    public String badType(DataHandler dh) {
  +    public String badPart(DataHandler dh) {
  +    	return dataHandlerToString(dh);
  +    }
  +    
  +    public String badNested(DataHandler dh) {
       	return dataHandlerToString(dh);
       }
   
  -    public String badPart(DataHandler dh) {
  +    public String badMixSoapMime(DataHandler dh) {
  +    	return dataHandlerToString(dh);
  +    }
  +
  +    public String badMultipleSoapBodies(DataHandler dh) {
       	return dataHandlerToString(dh);
       }
   
  +    public String badSoapBodyType(DataHandler dh) {
  +    	return dataHandlerToString(dh);
  +    }
  +
  +    /* ***************** UTILITY METHODS *************** */
  +    
       private FileDataSource getTempFile() throws IOException {
           File f = File.createTempFile("WSIFMimeTest", "txt");
           f.deleteOnExit();
  
  
  
  1.3       +1 -1      xml-axis-wsif/java/test/mime/DeploymentDescriptor.xml
  
  Index: DeploymentDescriptor.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/test/mime/DeploymentDescriptor.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeploymentDescriptor.xml	11 Nov 2002 15:36:04 -0000	1.2
  +++ DeploymentDescriptor.xml	14 Nov 2002 13:49:34 -0000	1.3
  @@ -2,7 +2,7 @@
                id="http://mime/">
     <isd:provider type="java"
                   scope="Application"
  -                methods="dataHandlerToString stringToDataHandler plainTextToString stringToPlainText bounceImage bounceImage2 bounceImage4 multiParts noSoapBody nested badNoType badNoPart badNoContent badType badPart">
  +                methods="dataHandlerToString stringToDataHandler plainTextToString stringToPlainText bounceImage bounceImage2 bounceImage4 orMultiMimeParts andMultiMimeParts noContent typeStar soapBodyParts1 soapBodyParts2 soapBodyParts3 soapBodyParts4 badNoSoapBody badNoType badNoPart badType badPart badNested badMixSoapMime badMultipleSoapBodies badSoapBodyType">
       <isd:java class="mime.MimeImpl" static="false"/>
     </isd:provider>
   
  
  
  
  1.1                  xml-axis-wsif/java/test/mime/MimeErrors.wsdl
  
  Index: MimeErrors.wsdl
  ===================================================================
  <?xml version="1.0" ?>
  
  <!-- Currently missing complex types and type="application/octet-stream" ??? -->
  
  <definitions targetNamespace="http://mime/"
               xmlns:tns="http://mime/"
               xmlns:xsd="http://www.w3.org/1999/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
               xmlns:jms="http://schemas.xmlsoap.org/wsdl/jms/"
               xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
               xmlns:java="http://schemas.xmlsoap.org/wsdl/java/"
               xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
               xmlns="http://schemas.xmlsoap.org/wsdl/">
  
    <message name="DataHandlerMessage">
      <part name="file" type="tns:datahandler"/>
    </message>
  
    <message name="DataHandler2Message">
      <part name="file2" type="tns:datahandler"/>
    </message>
  
    <message name="PlainTextMessage">
      <part name="plaintext" type="tns:plaintext"/>
    </message>
  
    <message name="Image1Message">
      <part name="image1" type="tns:image"/>
    </message>
  
    <message name="Image2Message">
      <part name="image2" type="tns:image"/>
    </message>
  
    <message name="StringMessage">
      <part name="buff" type="xsd:string"/>
    </message>
  
    <message name="String2Message">
      <part name="buff2" type="xsd:string"/>
    </message>
  
    <message name="BounceImage4Message">
      <part name="file" type="tns:datahandler"/>
      <part name="shouldBounce" type="xsd:boolean"/>
    </message>
  
    <message name="MultiMimePartsMessage">
      <part name="file" type="tns:datahandler"/>
      <part name="file2" type="tns:datahandler"/>
    </message>
  
    <message name="NullMessage">
    </message>
  
    <!-- port type declns -->
    <portType name="Mime">
      <operation name="dataHandlerToString">
        <input message="tns:DataHandlerMessage"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="stringToDataHandler">
        <input message="tns:StringMessage"/>
        <output message="tns:DataHandlerMessage"/>
      </operation>
      <operation name="plainTextToString">
        <input message="tns:PlainTextMessage"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="stringToPlainText">
        <input message="tns:StringMessage"/>
        <output message="tns:PlainTextMessage"/>
      </operation>
      <operation name="bounceImage">
        <input message="tns:Image1Message"/>
        <output message="tns:Image2Message"/>
      </operation>
      <operation name="bounceImage2">
        <input message="tns:DataHandlerMessage"/>
        <output message="tns:DataHandler2Message"/>
      </operation>
      <operation name="bounceImage4">
        <input message="tns:BounceImage4Message"/>
        <output message="tns:DataHandler2Message"/>
      </operation>
      <operation name="orMultiMimeParts">
        <input message="tns:DataHandlerMessage"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="andMultiMimeParts">
        <input message="tns:MultiMimePartsMessage"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="multiOutMimeParts">
        <input message="tns:StringMessage"/>
        <output message="tns:MultiMimePartsMessage"/>
      </operation>
      <operation name="multiInoutMimeParts">
        <input message="tns:MultiMimePartsMessage"/>
        <output message="tns:MultiMimePartsMessage"/>
      </operation>
      <operation name="noContent">
        <input message="tns:StringMessage"/>
        <output message="tns:String2Message"/>
      </operation>
      <operation name="typeStar">
        <input message="tns:DataHandlerMessage"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="soapBodyParts1">
        <input message="tns:BounceImage4Message"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="soapBodyParts2">
        <input message="tns:BounceImage4Message"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="soapBodyParts3">
        <input message="tns:BounceImage4Message"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="soapBodyParts4">
        <input message="tns:BounceImage4Message"/>
        <output message="tns:StringMessage"/>
      </operation>
  
      <operation name="badNoSoapBody">
        <input message="tns:DataHandlerMessage"/>
        <output message="tns:NullMessage"/>
      </operation>
      <operation name="badNoType">
        <input message="tns:DataHandlerMessage"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="badNoPart">
        <input message="tns:DataHandlerMessage"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="badType">
        <input message="tns:DataHandlerMessage"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="badPart">
        <input message="tns:DataHandlerMessage"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="badNested">
        <input message="tns:DataHandlerMessage"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="badMixSoapMime">
        <input message="tns:DataHandlerMessage"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="badMultipleSoapBodies">
        <input message="tns:DataHandlerMessage"/>
        <output message="tns:StringMessage"/>
      </operation>
      <operation name="badSoapBodyType">
        <input message="tns:DataHandlerMessage"/>
        <output message="tns:StringMessage"/>
      </operation>
    </portType>
  
    <!-- binding declns -->
    <binding name="SOAPHttpBinding" type="tns:Mime">
      <soap:binding style="rpc"
                    transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="dataHandlerToString">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:content part="file" type="text/html"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <operation name="stringToDataHandler">
        <soap:operation soapAction=""/>
        <input>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </input>
        <output>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:content part="file" type="text/html"/>
            </mime:part>
          </mime:multipartRelated> 
        </output>
      </operation>
  
      <operation name="plainTextToString">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:content part="plaintext" type="text/plain"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <operation name="stringToPlainText">
        <soap:operation soapAction=""/>
        <input>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </input>
        <output>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:content part="plaintext" type="text/plain"/>
            </mime:part>
          </mime:multipartRelated> 
        </output>
      </operation>
  
      <operation name="bounceImage">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:content part="image1" type="image/jpeg"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:content part="image2" type="image/jpeg"/>
            </mime:part>
          </mime:multipartRelated> 
        </output>
      </operation>
  
      <operation name="bounceImage2">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:content part="file" type="image/jpeg"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:content part="file2" type="image/jpeg"/>
            </mime:part>
          </mime:multipartRelated> 
        </output>
      </operation>
      
      <!-- bounceImage4 takes a boolean as well as an image. The boolean says
           whether the image should be returned. This allows us to test mixing
           soap and mime parts, and passing and returning null attachments -->
      <operation name="bounceImage4">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <mime:content part="file" type="image/jpeg"/>
            </mime:part>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <mime:multipartRelated>
            <mime:part>
              <mime:content part="file2" type="image/jpeg"/>
            </mime:part>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
          </mime:multipartRelated> 
        </output>
      </operation>
      
      <!-- orMultiMimeParts tests passing in one of two different mime parts -->
      <operation name="orMultiMimeParts">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <mime:content part="file" type="text/html"/>
              <mime:content part="file" type="image/jpeg"/>
            </mime:part>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <!-- andMultiMimeParts tests passing in two different mime parts -->
      <operation name="andMultiMimeParts">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <mime:content part="file" type="text/plain"/>
            </mime:part>
            <mime:part>
              <mime:content part="file2" type="text/plain"/>
            </mime:part>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <!-- multiOutMimeParts tests returning multiple output mime parts -->
      <operation name="multiOutMimeParts">
        <soap:operation soapAction=""/>
        <input>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </input>
        <output>
          <mime:multipartRelated>
            <mime:part>
              <mime:content part="file" type="text/plain"/>
            </mime:part>
            <mime:part>
              <mime:content part="file2" type="text/plain"/>
            </mime:part>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
          </mime:multipartRelated> 
        </output>
      </operation>
  
      <!-- multiInoutMimeParts tests multiple inout mime parts -->
      <operation name="multiInoutMimeParts">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <mime:content part="file" type="text/plain"/>
            </mime:part>
            <mime:part>
              <mime:content part="file2" type="text/plain"/>
            </mime:part>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <mime:multipartRelated>
            <mime:part>
              <mime:content part="file" type="text/plain"/>
            </mime:part>
            <mime:part>
              <mime:content part="file2" type="text/plain"/>
            </mime:part>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
          </mime:multipartRelated> 
        </output>
      </operation>
  
      <!-- Defining a mime message that doesn't contain any attachments is 
           probably valid. Anyway we allow it -->
      <operation name="noContent">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <!-- Test out type="text/*" -->
      <operation name="typeStar">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
               <mime:content part="file" type="text/*"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <!-- Test out soap:body parts="a b c" -->
      <operation name="soapBodyParts1">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                         parts="file shouldBounce" />
            </mime:part>
            <mime:part>
               <mime:content part="file" type="text/plain"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <operation name="soapBodyParts2">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                         parts="file" />
            </mime:part>
            <mime:part>
               <mime:content part="file" type="text/plain"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <operation name="soapBodyParts3">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                         parts="shouldBounce" />
            </mime:part>
            <mime:part>
               <mime:content part="file" type="text/plain"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <operation name="soapBodyParts4">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                         parts=" " />
            </mime:part>
            <mime:part>
               <mime:content part="file" type="text/plain"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <!--+++++++++++++++++++++++++ ERRORS +++++++++++++++++++++++++-->
      <operation name="badNoSoapBody">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
               <mime:content part="file" type="text/xml"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <operation name="badNoType">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:content part="file"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <operation name="badNoPart">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:content type="text/plain"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <operation name="badPart">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:content part="trash" type="text/plain"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <operation name="badType">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:content part="file" type="trash"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <!-- Nested mime:parts are valid WSDL but not supported by WSIF -->
      <operation name="badNested">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:multipartRelated>
                <mime:part>
                  <mime:content part="file" type="text/plain"/>
                </mime:part>
              </mime:multipartRelated> 
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <!-- The binding input can't contain both a soap:body 
           and a mime:multipartRelated -->
      <operation name="badMixSoapMime">
        <soap:operation soapAction=""/>
        <input>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
          <mime:multipartRelated>
            <mime:part>
              <mime:content part="file" type="text/plain"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <!-- There must only be one mime:part that contains a soap:body -->
      <operation name="badMultipleSoapBodies">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:content part="file" type="text/plain"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
  
      <!-- There must not a mime:content in the same mime:part as the soap:body -->
      <operation name="badSoapBodyType">
        <soap:operation soapAction=""/>
        <input>
          <mime:multipartRelated>
            <mime:part>
              <mime:content part="file" type="image/jpeg"/>
              <soap:body use="encoded"
                         namespace="http://mime/"
                         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </mime:part>
            <mime:part>
              <mime:content part="file" type="text/plain"/>
            </mime:part>
          </mime:multipartRelated> 
        </input>
        <output>
          <soap:body use="encoded"
                     namespace="http://mime/"
                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
        </output>
      </operation>
    </binding>
  
    <!-- Mime/Axis/Jms is not supported at present
       binding name="SOAPJmsBinding" type="tns:Mime">
      <soap:binding style="rpc"
                    transport="http://schemas.xmlsoap.org/soap/jms"/>
    </binding -->
  
    <!-- service decln -->
    <service name="MimeService">
      <port name="SOAPPort" binding="tns:SOAPHttpBinding">
        <soap:address location="http://localhost:8080/soap/servlet/rpcrouter"/>
      </port>
      <!-- port name="SOAPJMSPort" binding="tns:SOAPJmsBinding">
        <jms:address jndiDestinationName="SoapJmsAddressBookQueue"
                     destinationStyle="queue"
                     jndiConnectionFactoryName="WSIFSampleQCF"
                     initialContextFactory="com.sun.jndi.fscontext.RefFSContextFactory"
                     jndiProviderURL="file:///JNDI-Directory"/>
      </port -->
    </service>
  
  </definitions>