cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dand...@apache.org
Subject svn commit: r542032 - in /incubator/cxf/trunk: rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ rt/core/src/main/java/org/apache/cxf/wsdl11/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/ testutils/src/main/resources/wsdl...
Date Sun, 27 May 2007 20:34:56 GMT
Author: dandiep
Date: Sun May 27 13:34:55 2007
New Revision: 542032

URL: http://svn.apache.org/viewvc?view=rev&rev=542032
Log:
Check for SOAPHeaders in the runtime inside MIMEParts. Use reflection to call JAXBContextImpl.hasSwaRef.

Modified:
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/swa-mime.wsdl
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?view=diff&rev=542032&r1=542031&r2=542032
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
Sun May 27 13:34:55 2007
@@ -258,20 +258,19 @@
         SoapBindingInfo bi = new SoapBindingInfo(service, ns);
         // Copy all the extensors
         initializeBindingInfo(service, binding, bi);
-
+    
         org.apache.cxf.tools.common.extensions.soap.SoapBinding wSoapBinding
             = SOAPBindingUtil.getSoapBinding(bi.getExtensors(ExtensibilityElement.class));
         
         bi.setTransportURI(wSoapBinding.getTransportURI());
         bi.setStyle(wSoapBinding.getStyle());
-
+    
         for (BindingOperationInfo boi : bi.getOperations()) {
             initializeBindingOperation(bi, boi);
         }
-
+    
         return bi;
     }
-
     private void initializeBindingOperation(SoapBindingInfo bi, BindingOperationInfo boi)
{
         SoapOperationInfo soi = new SoapOperationInfo();
 
@@ -336,6 +335,7 @@
             bodyInfo.setUse(soapBody.getUse());
             parts = soapBody.getParts();
         }
+        
         // Initialize the body parts.
         List<MessagePartInfo> attParts = null;
         if (parts != null) {
@@ -348,32 +348,38 @@
                     if (mpart.getExtensibilityElements().size() < 1) {
                         throw new RuntimeException("MIMEPart should at least contain one
element!");
                     }
-                    Object content = mpart.getExtensibilityElements().get(0);
-                    if (content instanceof MIMEContent) {
-                        MIMEContent mc = (MIMEContent)content;
-                        partName = mc.getPart();
-                        
-                        if (attParts == null) {
-                            attParts = new LinkedList<MessagePartInfo>();
-                        }
-
-                        MessagePartInfo mpi = msg.getMessagePart(new QName(msg.getName().getNamespaceURI(),
-                                                                           partName));
-                        mpi.setProperty(Message.CONTENT_TYPE, mc.getType());
-                        attParts.add(mpi);
-                        // Attachments shouldn't be part of the body message
-                        bmsg.getMessageParts().remove(mpi);
-                    } else if (SOAPBindingUtil.isSOAPBody(content)) {
-                        SoapBody sb = SOAPBindingUtil.getSoapBody(content);
-                        if (sb.getParts().size() == 1) {
-                            partName = (String) sb.getParts().get(0);
-                        }
+                    for (Object content : mpart.getExtensibilityElements()) {
+                        if (content instanceof MIMEContent) {
+                            MIMEContent mc = (MIMEContent)content;
+                            partName = mc.getPart();
+                            
+                            if (attParts == null) {
+                                attParts = new LinkedList<MessagePartInfo>();
+                            }
+    
+                            MessagePartInfo mpi = 
+                                msg.getMessagePart(new QName(msg.getName().getNamespaceURI(),
+                                                             partName));
+                            mpi.setProperty(Message.CONTENT_TYPE, mc.getType());
+                            attParts.add(mpi);
+                            // Attachments shouldn't be part of the body message
+                            bmsg.getMessageParts().remove(mpi);
+                        } else if (SOAPBindingUtil.isSOAPBody(content)) {
+                            SoapBody sb = SOAPBindingUtil.getSoapBody(content);
+                            if (sb.getParts().size() == 1) {
+                                partName = (String) sb.getParts().get(0);
+                            }
+                            
+                            // We can have a list of empty part names here.
+                            if (partName != null) {
+                                addSoapBodyPart(msg, bodyParts, partName);
+                            }
+                        } else if (SOAPBindingUtil.isSOAPHeader(content)) {
+                            SoapHeader sb = SOAPBindingUtil.getSoapHeader(content);
                         
-                        // We can have a list of empty part names here.
-                        if (partName != null) {
-                            addSoapBodyPart(msg, bodyParts, partName);
-                        }
-                    }                   
+                            bmsg.addExtensor(sb);
+                        }                  
+                    }
                 } else {
                     addSoapBodyPart(msg, bodyParts, (String)part);
                 }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java?view=diff&rev=542032&r1=542031&r2=542032
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java
Sun May 27 13:34:55 2007
@@ -29,12 +29,18 @@
 import java.util.StringTokenizer;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+
 import javax.wsdl.Definition;
 import javax.wsdl.Import;
 import javax.wsdl.extensions.ExtensionRegistry;
+import javax.wsdl.extensions.mime.MIMEPart;
 import javax.wsdl.factory.WSDLFactory;
 import javax.wsdl.xml.WSDLReader;
 import javax.xml.bind.JAXBException;
+import javax.xml.namespace.QName;
+
+import com.ibm.wsdl.extensions.soap.SOAPHeaderImpl;
+import com.ibm.wsdl.extensions.soap.SOAPHeaderSerializer;
 
 import org.apache.cxf.BusException;
 import org.apache.cxf.common.i18n.Message;
@@ -59,6 +65,12 @@
         try {
             wsdlFactory = WSDLFactory.newInstance();
             registry = wsdlFactory.newPopulatedExtensionRegistry();
+            QName header = new QName("http://schemas.xmlsoap.org/wsdl/soap/", "header");
+            registry.registerDeserializer(MIMEPart.class, 
+                                          header, 
+                                          new SOAPHeaderSerializer());
+            registry.mapExtensionTypes(MIMEPart.class, header, SOAPHeaderImpl.class);
+            
             registerInitialExtensions();
             wsdlReader = wsdlFactory.newWSDLReader();
             // TODO enable the verbose if in verbose mode.

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java?view=diff&rev=542032&r1=542031&r2=542032
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java Sun
May 27 13:34:55 2007
@@ -35,12 +35,17 @@
 import javax.wsdl.Types;
 import javax.wsdl.WSDLException;
 import javax.wsdl.extensions.ExtensionRegistry;
+import javax.wsdl.extensions.mime.MIMEPart;
+import javax.wsdl.extensions.soap.SOAPHeader;
 import javax.wsdl.factory.WSDLFactory;
 import javax.wsdl.xml.WSDLReader;
 import javax.xml.bind.JAXBException;
+import javax.xml.namespace.QName;
 
 import org.w3c.dom.Element;
 
+import com.ibm.wsdl.extensions.soap.SOAPHeaderSerializer;
+
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusException;
 import org.apache.cxf.catalog.CatalogWSDLLocator;
@@ -75,6 +80,12 @@
             registry.registerSerializer(Types.class, 
                                         WSDLConstants.SCHEMA_QNAME,
                                         new SchemaSerializer());
+            QName header = new QName("http://schemas.xmlsoap.org/wsdl/soap/", 
+                                     "header");
+            registry.registerDeserializer(MIMEPart.class, 
+                                          header, 
+                                          new SOAPHeaderSerializer());
+            registry.mapExtensionTypes(MIMEPart.class, header, SOAPHeader.class);
         } catch (WSDLException e) {
             throw new BusException(e);
         }

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java?view=diff&rev=542032&r1=542031&r2=542032
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
Sun May 27 13:34:55 2007
@@ -25,11 +25,13 @@
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.StringWriter;
+import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 import java.util.UUID;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import javax.activation.DataHandler;
@@ -99,14 +101,9 @@
         if (sbi == null || sbi.getAttachments() == null || sbi.getAttachments().size() ==
0) {
             Service s = message.getExchange().get(Service.class);
             DataBinding db = s.getDataBinding();
-            if (db instanceof JAXBDataBinding) {
-                JAXBContext context = ((JAXBDataBinding)db).getContext();
-                if (context instanceof JAXBContextImpl) {
-                    JAXBContextImpl riCtx = (JAXBContextImpl) context;
-                    if (riCtx.hasSwaRef()) {
-                        setupAttachmentOutput(message);
-                    }
-                }
+            if (db instanceof JAXBDataBinding
+                && hasSwaRef((JAXBDataBinding) db)) {
+                setupAttachmentOutput(message);
             }
             return;
         }
@@ -132,6 +129,7 @@
             
             DataHandler dh = null;
             
+            // This code could probably be refactored out somewhere...
             if (o instanceof Source) {
                 
                 dh = new DataHandler(createDataSource((Source)o, ct));
@@ -174,6 +172,26 @@
             atts.add(att);
         }
     }
+    private boolean hasSwaRef(JAXBDataBinding db) {
+        JAXBContext context = db.getContext();
+        if (context instanceof JAXBContextImpl) {
+            JAXBContextImpl riCtx = (JAXBContextImpl) context;
+            
+            try {
+                // We're using reflection here because this won't work on
+                // JAXB < 2.0.5 and Java 6 ships with 2.0.2.  This means
+                // SwA won't work correctly unless you're using at least 
+                // JAXB 2.0.5.
+                Method m = riCtx.getClass().getMethod("hasSwaRef", new Class[0]);
+                
+                return (Boolean) m.invoke(riCtx, new Object[0]);
+            } catch (Exception e) {
+                LOG.log(Level.FINER, "Could not check hasSwaRef", e);
+            }
+        }
+        
+        return false;
+    }
 
     private DataSource createDataSource(Source o, String ct) {
         DataSource ds = null;
@@ -214,25 +232,26 @@
     private BufferedImage convertToBufferedImage(Image image) throws IOException {
         if (image instanceof BufferedImage) {
             return (BufferedImage)image;
-        } else {
-            MediaTracker tracker = new MediaTracker(new Component() { });
-            tracker.addImage(image, 0);
-            try {
-                tracker.waitForAll();
-            } catch (InterruptedException e) {
-                IOException ioe = new IOException(e.getMessage());
-                ioe.initCause(e);
-                throw ioe;
-            }
-            BufferedImage bufImage = new BufferedImage(
-                    image.getWidth(null),
-                    image.getHeight(null),
-                    BufferedImage.TYPE_INT_ARGB);
-
-            Graphics g = bufImage.createGraphics();
-            g.drawImage(image, 0, 0, null);
-            return bufImage;
         }
+        
+        // Wait until the image is completely loaded
+        MediaTracker tracker = new MediaTracker(new Component() { });
+        tracker.addImage(image, 0);
+        try {
+            tracker.waitForAll();
+        } catch (InterruptedException e) {
+            throw new Fault(e);
+        }
+        
+        // Create a BufferedImage so we can write it out later
+        BufferedImage bufImage = new BufferedImage(
+                image.getWidth(null),
+                image.getHeight(null),
+                BufferedImage.TYPE_INT_ARGB);
+
+        Graphics g = bufImage.createGraphics();
+        g.drawImage(image, 0, 0, null);
+        return bufImage;
     }
     
     private Collection<Attachment> setupAttachmentOutput(SoapMessage message) {

Modified: incubator/cxf/trunk/testutils/src/main/resources/wsdl/swa-mime.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/swa-mime.wsdl?view=diff&rev=542032&r1=542031&r2=542032
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/swa-mime.wsdl (original)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/swa-mime.wsdl Sun May 27 13:34:55
2007
@@ -19,40 +19,47 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<wsdl:definitions name="SwAService" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-  xmlns:tns="http://cxf.apache.org/swa" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
-  xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd" xmlns:types="http://cxf.apache.org/swa/types"
-  xmlns:xmime="http://www.w3.org/2005/05/xmlmime" targetNamespace="http://cxf.apache.org/swa"
+<wsdl:definitions name="SwAService"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:tns="http://cxf.apache.org/swa"
+  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+  xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd"
+  xmlns:types="http://cxf.apache.org/swa/types"
+  xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
+  targetNamespace="http://cxf.apache.org/swa"
   xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
 
   <wsdl:types>
     <xsd:schema xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
       targetNamespace="http://cxf.apache.org/swa/types">
-      <xsd:import namespace="http://ws-i.org/profiles/basic/1.1/xsd"/>
+      <xsd:import namespace="http://ws-i.org/profiles/basic/1.1/xsd" />
       <xsd:element name="DataStruct">
         <xsd:complexType>
           <xsd:sequence>
             <xsd:element name="DataRef" type="wsi:swaRef"
-        xmime:expectedContentTypes="application/octet-stream" />
+              xmime:expectedContentTypes="application/octet-stream" />
           </xsd:sequence>
         </xsd:complexType>
       </xsd:element>
-      
-      <xsd:element name="text" type="xsd:string"/>
-      <xsd:element name="VoidRequest" type="types:VoidRequest"/>
+
+      <xsd:element name="text" type="xsd:string" />
+      <xsd:element name="headerText" type="xsd:string" />
+      <xsd:element name="VoidRequest" type="types:VoidRequest" />
       <xsd:complexType name="VoidRequest">
-	<xsd:sequence/>
+        <xsd:sequence />
       </xsd:complexType>
-      
-      <xsd:element name="OutputResponseAll" type="types:OutputResponseAll"/>
+
+      <xsd:element name="OutputResponseAll"
+        type="types:OutputResponseAll" />
       <xsd:complexType name="OutputResponseAll">
-    	<xsd:sequence>
-              <xsd:element name="result" type="xsd:string"/>
-              <xsd:element name="reason" type="xsd:string"/>
-    	</xsd:sequence>
+        <xsd:sequence>
+          <xsd:element name="result" type="xsd:string" />
+          <xsd:element name="reason" type="xsd:string" />
+        </xsd:sequence>
       </xsd:complexType>
-    
+
     </xsd:schema>
 
     <xsd:schema targetNamespace="http://ws-i.org/profiles/basic/1.1/xsd"
@@ -73,32 +80,46 @@
 
   <wsdl:message name="echoDataRequest">
     <wsdl:part name="text" element="types:text" />
-    <wsdl:part name="data" type="xsd:base64Binary"/>
+    <wsdl:part name="data" type="xsd:base64Binary" />
   </wsdl:message>
 
   <wsdl:message name="echoDataResponse">
     <wsdl:part name="text" element="types:text" />
     <wsdl:part name="data" type="xsd:base64Binary" />
   </wsdl:message>
-  
+
+  <wsdl:message name="echoDataWithHeaderRequest">
+    <wsdl:part name="text" element="types:headerText" />
+    <wsdl:part name="data" type="xsd:base64Binary" />
+  </wsdl:message>
+
+  <wsdl:message name="echoDataWithHeaderResponse">
+    <wsdl:part name="text" element="types:headerText" />
+    <wsdl:part name="data" type="xsd:base64Binary" />
+  </wsdl:message>
+
+  <wsdl:message name="headerMessage">
+    <wsdl:part name="text" element="types:headerText" />
+  </wsdl:message>
+
   <wsdl:message name="messageInputAllAttachmentTypes">
-    <wsdl:part name="request" element="types:VoidRequest"/>
-    <wsdl:part name="attach1" type="xsd:string"/>
-    <wsdl:part name="attach2" type="xsd:string"/>
-    <wsdl:part name="attach3" type="xsd:string"/>
-    <wsdl:part name="attach4" type="xsd:base64Binary"/>
-    <wsdl:part name="attach5" type="xsd:base64Binary"/>
-  </wsdl:message>  
-  
+    <wsdl:part name="request" element="types:VoidRequest" />
+    <wsdl:part name="attach1" type="xsd:string" />
+    <wsdl:part name="attach2" type="xsd:string" />
+    <wsdl:part name="attach3" type="xsd:string" />
+    <wsdl:part name="attach4" type="xsd:base64Binary" />
+    <wsdl:part name="attach5" type="xsd:base64Binary" />
+  </wsdl:message>
+
   <wsdl:message name="messageOutputAllAttachmentTypes">
-    <wsdl:part name="response" element="types:OutputResponseAll"/>
-    <wsdl:part name="attach1" type="xsd:string"/>
-    <wsdl:part name="attach2" type="xsd:string"/>
-    <wsdl:part name="attach3" type="xsd:string"/>
-    <wsdl:part name="attach4" type="xsd:base64Binary"/>
-    <wsdl:part name="attach5" type="xsd:base64Binary"/>
+    <wsdl:part name="response" element="types:OutputResponseAll" />
+    <wsdl:part name="attach1" type="xsd:string" />
+    <wsdl:part name="attach2" type="xsd:string" />
+    <wsdl:part name="attach3" type="xsd:string" />
+    <wsdl:part name="attach4" type="xsd:base64Binary" />
+    <wsdl:part name="attach5" type="xsd:base64Binary" />
   </wsdl:message>
-  
+
   <wsdl:portType name="SwAServiceInterface">
 
     <wsdl:operation name="echoDataRef">
@@ -111,15 +132,22 @@
       <wsdl:output message="tns:echoDataResponse" />
     </wsdl:operation>
 
+    <wsdl:operation name="echoDataWithHeader">
+      <wsdl:input message="tns:echoDataWithHeaderRequest" />
+      <wsdl:output message="tns:echoDataWithHeaderResponse" />
+    </wsdl:operation>
+
     <wsdl:operation name="echoAllAttachmentTypes">
-      <wsdl:input message="tns:messageInputAllAttachmentTypes"/>
-      <wsdl:output message="tns:messageOutputAllAttachmentTypes"/>
+      <wsdl:input message="tns:messageInputAllAttachmentTypes" />
+      <wsdl:output message="tns:messageOutputAllAttachmentTypes" />
     </wsdl:operation>
-    
+
   </wsdl:portType>
 
-  <wsdl:binding name="SwAServiceBinding" type="tns:SwAServiceInterface">
-    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+  <wsdl:binding name="SwAServiceBinding"
+    type="tns:SwAServiceInterface">
+    <soap:binding style="document"
+      transport="http://schemas.xmlsoap.org/soap/http" />
 
     <wsdl:operation name="echoDataRef">
       <soap:operation soapAction="" style="literal" />
@@ -131,12 +159,14 @@
       </wsdl:output>
     </wsdl:operation>
 
-   <wsdl:operation name="echoData">
+    <wsdl:operation name="echoDataWithHeader">
       <soap:operation soapAction="" style="literal" />
       <wsdl:input>
         <mime:multipartRelated>
           <mime:part>
             <soap:body parts="text" use="literal" />
+            <soap:header use="literal" part="text"
+              message="tns:headerMessage" />
           </mime:part>
           <mime:part>
             <mime:content part="data" type="application/octet-stream" />
@@ -147,65 +177,68 @@
         <mime:multipartRelated>
           <mime:part>
             <soap:body parts="text" use="literal" />
+            <soap:header use="literal" part="text"
+              message="tns:headerMessage" />
           </mime:part>
           <mime:part>
             <mime:content part="data" type="application/octet-stream" />
           </mime:part>
         </mime:multipartRelated>
       </wsdl:output>
-    </wsdl:operation>   
-    
+    </wsdl:operation>
+
     <wsdl:operation name="echoAllAttachmentTypes">
-          <soap:operation/>
-            <wsdl:input>
-              <mime:multipartRelated>
-                <mime:part>
-                  <soap:body parts="request" use="literal"/>
-                </mime:part>
-                <mime:part>
-                  <mime:content part="attach1" type="text/plain"/>
-                </mime:part>
-                <mime:part>
-                  <mime:content part="attach2" type="text/html"/>
-                </mime:part>
-                <mime:part>
-                  <mime:content part="attach3" type="text/xml"/>
-                </mime:part>
-                <mime:part>
-                  <mime:content part="attach4" type="image/jpeg"/>
-                </mime:part>
-                <mime:part>
-                  <mime:content part="attach5" type="image/jpeg"/>
-                </mime:part>
-              </mime:multipartRelated>
-            </wsdl:input>
-            <wsdl:output>
-              <mime:multipartRelated>
-                <mime:part>
-                  <soap:body parts="response" use="literal"/>
-                </mime:part>
-                <mime:part>
-                  <mime:content part="attach1" type="text/plain"/>
-                </mime:part>
-                <mime:part>
-                  <mime:content part="attach2" type="text/html"/>
-                </mime:part>
-                <mime:part>
-                  <mime:content part="attach3" type="text/xml"/>
-                </mime:part>
-                <mime:part>
-                  <mime:content part="attach4" type="image/jpeg"/>
-                </mime:part>
-                <mime:part>
-                  <mime:content part="attach5" type="image/jpeg"/>
-                </mime:part>
-              </mime:multipartRelated>
-            </wsdl:output>
+      <soap:operation />
+      <wsdl:input>
+        <mime:multipartRelated>
+          <mime:part>
+            <soap:body parts="request" use="literal" />
+          </mime:part>
+          <mime:part>
+            <mime:content part="attach1" type="text/plain" />
+          </mime:part>
+          <mime:part>
+            <mime:content part="attach2" type="text/html" />
+          </mime:part>
+          <mime:part>
+            <mime:content part="attach3" type="text/xml" />
+          </mime:part>
+          <mime:part>
+            <mime:content part="attach4" type="image/jpeg" />
+          </mime:part>
+          <mime:part>
+            <mime:content part="attach5" type="image/jpeg" />
+          </mime:part>
+        </mime:multipartRelated>
+      </wsdl:input>
+      <wsdl:output>
+        <mime:multipartRelated>
+          <mime:part>
+            <soap:body parts="response" use="literal" />
+          </mime:part>
+          <mime:part>
+            <mime:content part="attach1" type="text/plain" />
+          </mime:part>
+          <mime:part>
+            <mime:content part="attach2" type="text/html" />
+          </mime:part>
+          <mime:part>
+            <mime:content part="attach3" type="text/xml" />
+          </mime:part>
+          <mime:part>
+            <mime:content part="attach4" type="image/jpeg" />
+          </mime:part>
+          <mime:part>
+            <mime:content part="attach5" type="image/jpeg" />
+          </mime:part>
+        </mime:multipartRelated>
+      </wsdl:output>
     </wsdl:operation>
   </wsdl:binding>
 
   <wsdl:service name="SwAService">
-    <wsdl:port name="SwAServiceHttpPort" binding="tns:SwAServiceBinding">
+    <wsdl:port name="SwAServiceHttpPort"
+      binding="tns:SwAServiceBinding">
       <soap:address location="http://localhost:9036/swa" />
     </wsdl:port>
   </wsdl:service>

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java?view=diff&rev=542032&r1=542031&r2=542032
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java
(original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java
Sun May 27 13:34:55 2007
@@ -21,7 +21,11 @@
 
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Proxy;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 
 import javax.wsdl.Binding;
 import javax.wsdl.BindingFault;



Mime
View raw message