cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r740197 - in /cxf/trunk: common/common/src/main/java/org/apache/cxf/staxutils/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/ systests/src/test/java/org/apache/cxf/systest/swa/ systests/src/test/java/org/apache/cxf/syste...
Date Tue, 03 Feb 2009 03:02:19 GMT
Author: dkulp
Date: Tue Feb  3 03:02:19 2009
New Revision: 740197

URL: http://svn.apache.org/viewvc?rev=740197&view=rev
Log:
[CXF-2020] Fix problems of using mime binding without generating the mime handlers

Added:
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/SwANoMimeServiceImpl.java
  (with props)
    cxf/trunk/testutils/src/main/resources/wsdl/swa-mime-nomime.wsdl   (with props)
Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/Server.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/resources/attach.html

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=740197&r1=740196&r2=740197&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Tue Feb
 3 03:02:19 2009
@@ -720,7 +720,7 @@
     private static boolean isDeclared(Element e, String namespaceURI, String prefix) {
         Attr att;
         if (prefix != null && prefix.length() > 0) {
-            att = e.getAttributeNodeNS(XML_NS, "xmlns:" + prefix);
+            att = e.getAttributeNodeNS(XML_NS, prefix);
         } else {
             att = e.getAttributeNode("xmlns");
         }

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java?rev=740197&r1=740196&r2=740197&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java
Tue Feb  3 03:02:19 2009
@@ -29,6 +29,7 @@
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
 import org.apache.cxf.binding.soap.model.SoapBodyInfo;
+import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Attachment;
 import org.apache.cxf.message.MessageContentsList;
@@ -86,9 +87,22 @@
                     DataHandler dh = a.getDataHandler();
                     String ct = dh.getContentType();
                     Object o = null;
-                    
-                    if (DataHandler.class.isAssignableFrom(mpi.getTypeClass())) {
+                    Class<?> typeClass = mpi.getTypeClass();
+                    if (DataHandler.class.isAssignableFrom(typeClass)) {
                         o = dh;
+                    } else if (String.class.isAssignableFrom(typeClass)) {
+                        try {
+                            //o = IOUtils.readBytesFromStream(dh.getInputStream());
+                            o = dh.getContent();
+                        } catch (IOException e) {
+                            throw new Fault(e);
+                        }
+                    } else if (byte[].class.isAssignableFrom(typeClass)) {
+                        try {
+                            o = IOUtils.readBytesFromStream(dh.getInputStream());
+                        } catch (IOException e) {
+                            throw new Fault(e);
+                        }
                     } else if (ct.startsWith("image/")) {
                         try {
                             o = ImageIO.read(dh.getInputStream());

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java?rev=740197&r1=740196&r2=740197&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAOutInterceptor.java
Tue Feb  3 03:02:19 2009
@@ -127,9 +127,10 @@
             }
             return;
         }
-        
+        processAttachments(message, sbi);
+    }
+    protected void processAttachments(SoapMessage message, SoapBodyInfo sbi) {
         Collection<Attachment> atts = setupAttachmentOutput(message);
-
         List<Object> outObjects = CastUtils.cast(message.getContent(List.class));
         
         for (MessagePartInfo mpi : sbi.getAttachments()) {
@@ -198,6 +199,15 @@
                     ct = "application/octet-stream";
                 }
                 dh = new DataHandler(new ByteArrayDataSource((byte[])o, ct));           
    
+            } else if (o instanceof String) {
+                if (ct == null) {
+                    ct = "text/plain; charset=\'UTF-8\'";
+                }
+                try {
+                    dh = new DataHandler(new ByteArrayDataSource((String)o, ct));
+                } catch (IOException e) {
+                    throw new Fault(e);
+                }                
             } else {
                 throw new Fault(new org.apache.cxf.common.i18n.Message("ATTACHMENT_NOT_SUPPORTED",

                                                                        LOG, o.getClass()));

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java?rev=740197&r1=740196&r2=740197&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java Tue
Feb  3 03:02:19 2009
@@ -54,6 +54,49 @@
     }
     
     @Test
+    public void testSwaNoMimeCodeGen() throws Exception {
+        org.apache.cxf.swa_nomime.SwAService service = new org.apache.cxf.swa_nomime.SwAService();
+        
+        org.apache.cxf.swa_nomime.SwAServiceInterface port = service.getSwAServiceHttpPort();
+//        ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,

+//                                                        "http://localhost:9037/swa");
+        
+        Holder<String> textHolder = new Holder<String>("Hi");
+        Holder<byte[]> data = new Holder<byte[]>("foobar".getBytes());
+
+        port.echoData(textHolder, data);
+        String string = IOUtils.newStringFromBytes(data.value);
+        assertEquals("testfoobar", string);
+        assertEquals("Hi", textHolder.value);
+        
+        if (Boolean.getBoolean("java.awt.headless")) {
+            return;
+        }
+        
+        URL url1 = this.getClass().getResource("resources/attach.text");
+        URL url2 = this.getClass().getResource("resources/attach.html");
+        URL url3 = this.getClass().getResource("resources/attach.xml");
+        URL url4 = this.getClass().getResource("resources/attach.jpeg1");
+        URL url5 = this.getClass().getResource("resources/attach.jpeg2");
+
+        Holder<String> attach1 = new Holder<String>(IOUtils.toString(url1.openStream()));
+        Holder<String> attach2 = new Holder<String>(IOUtils.toString(url2.openStream()));
+        Holder<String> attach3 = new Holder<String>(IOUtils.toString(url3.openStream()));
+        Holder<byte[]> attach4 = new Holder<byte[]>(IOUtils.readBytesFromStream(url4.openStream()));
+        Holder<byte[]> attach5 = new Holder<byte[]>(IOUtils.readBytesFromStream(url5.openStream()));
+        org.apache.cxf.swa_nomime.types.VoidRequest request 
+            = new org.apache.cxf.swa_nomime.types.VoidRequest();
+        org.apache.cxf.swa_nomime.types.OutputResponseAll response 
+            = port.echoAllAttachmentTypes(request, 
+                                          attach1, 
+                                          attach2,
+                                          attach3,
+                                          attach4,
+                                          attach5);
+        assertNotNull(response);
+    }
+    
+    @Test
     public void testSwa() throws Exception {
         SwAService service = new SwAService();
         

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/Server.java?rev=740197&r1=740196&r2=740197&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/Server.java (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/Server.java Tue Feb  3 03:02:19
2009
@@ -29,8 +29,14 @@
     protected void run() {
         Object implementor = new SwAServiceImpl();
         String address = "http://localhost:9036/swa";
+        EndpointImpl ep;
         try {
-            EndpointImpl ep = (EndpointImpl) Endpoint.create(implementor);
+            ep = (EndpointImpl) Endpoint.create(new SwANoMimeServiceImpl());
+            ep.setWsdlLocation("classpath:wsdl/swa-mime-nomime.wsdl");
+            ep.publish(address + "-nomime");
+            
+            
+            ep = (EndpointImpl) Endpoint.create(implementor);
             ep.setWsdlLocation("classpath:wsdl/swa-mime.wsdl");
             ep.publish(address);
         } catch (Exception e) {

Added: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/SwANoMimeServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/SwANoMimeServiceImpl.java?rev=740197&view=auto
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/SwANoMimeServiceImpl.java
(added)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/SwANoMimeServiceImpl.java
Tue Feb  3 03:02:19 2009
@@ -0,0 +1,130 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.swa;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.activation.DataHandler;
+import javax.jws.WebService;
+import javax.mail.util.ByteArrayDataSource;
+import javax.xml.ws.Holder;
+import javax.xml.ws.WebServiceException;
+
+import org.apache.cxf.helpers.IOUtils;
+import org.apache.cxf.swa_nomime.SwAServiceInterface;
+import org.apache.cxf.swa_nomime.types.DataStruct;
+import org.apache.cxf.swa_nomime.types.OutputResponseAll;
+import org.apache.cxf.swa_nomime.types.VoidRequest;
+
+
+@WebService(endpointInterface = "org.apache.cxf.swa_nomime.SwAServiceInterface", 
+            serviceName = "SwAService", 
+            targetNamespace = "http://cxf.apache.org/swa-nomime", 
+            portName = "SwAServiceHttpPort")
+public class SwANoMimeServiceImpl implements SwAServiceInterface {
+
+    public OutputResponseAll echoAllAttachmentTypes(VoidRequest request, Holder<String>
attach1,
+                                                    Holder<String> attach2, Holder<String>
attach3,
+                                                    Holder<byte[]> attach4, Holder<byte[]>
attach5) {
+        try {
+            OutputResponseAll theResponse = new OutputResponseAll();
+            theResponse.setResult("ok");
+            theResponse.setReason("ok");
+            if (attach1 == null || attach1.value == null) {
+                System.err.println("attach1.value is null (unexpected)");
+                theResponse.setReason("attach1.value is null (unexpected)");
+                theResponse.setResult("not ok");
+            }
+            if (attach2 == null || attach2.value == null) {
+                System.err.println("attach2.value is null (unexpected)");
+                if (theResponse.getReason().equals("ok")) {
+                    theResponse.setReason("attach2.value is null (unexpected)");
+                } else {
+                    theResponse.setReason(theResponse.getReason() + "\nattach2.value is null
(unexpected)");
+                }
+                theResponse.setResult("not ok");
+            }
+            if (attach3 == null || attach3.value == null) {
+                System.err.println("attach3.value is null (unexpected)");
+                if (theResponse.getReason().equals("ok")) {
+                    theResponse.setReason("attach3.value is null (unexpected)");
+                } else {
+                    theResponse.setReason(theResponse.getReason() + "\nattach3.value is null
(unexpected)");
+                }
+                theResponse.setResult("not ok");
+            }
+            if (attach4 == null || attach4.value == null) {
+                System.err.println("attach4.value is null (unexpected)");
+                if (theResponse.getReason().equals("ok")) {
+                    theResponse.setReason("attach4.value is null (unexpected)");
+                } else {
+                    theResponse.setReason(theResponse.getReason() + "\nattach4.value is null
(unexpected)");
+                }
+                theResponse.setResult("not ok");
+            }
+            if (attach5 == null || attach5.value == null) {
+                System.err.println("attach5.value is null (unexpected)");
+                if (theResponse.getReason().equals("ok")) {
+                    theResponse.setReason("attach5.value is null (unexpected)");
+                } else {
+                    theResponse.setReason(theResponse.getReason() + "\nattach5.value is null
(unexpected)");
+                }
+                theResponse.setResult("not ok");
+            }
+            return theResponse;
+        } catch (Exception e) {
+            throw new WebServiceException(e.getMessage());
+        }
+    }
+
+    public void echoData(Holder<String> text, Holder<byte[]> data) {
+        try {
+            data.value = ("test" + new String(data.value, 0, 6)).getBytes("UTF-8"); 
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        
+    }
+
+    public void echoDataRef(Holder<DataStruct> data) {
+        try {
+            InputStream bis = null;
+            bis = data.value.getDataRef().getDataSource().getInputStream();
+            byte b[] = new byte[6];
+            bis.read(b, 0, 6);
+            String string = IOUtils.newStringFromBytes(b);
+            
+            ByteArrayDataSource source = 
+                new ByteArrayDataSource(("test" + string).getBytes(), "application/octet-stream");
+            data.value.setDataRef(new DataHandler(source));
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public void echoDataWithHeader(Holder<String> text, Holder<byte[]> data,
Holder<String> headerText) {
+        try {
+            data.value = ("test" + new String(data.value, 0, 6)).getBytes("UTF-8"); 
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+}

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/SwANoMimeServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/SwANoMimeServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/resources/attach.html
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/resources/attach.html?rev=740197&r1=740196&r2=740197&view=diff
==============================================================================
--- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/resources/attach.html (original)
+++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/swa/resources/attach.html Tue
Feb  3 03:02:19 2009
@@ -1,4 +1,4 @@
-/**
+<!--
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
- */
+ *-->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
 <head>
 <title>This is a title</title>

Added: cxf/trunk/testutils/src/main/resources/wsdl/swa-mime-nomime.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/testutils/src/main/resources/wsdl/swa-mime-nomime.wsdl?rev=740197&view=auto
==============================================================================
--- cxf/trunk/testutils/src/main/resources/wsdl/swa-mime-nomime.wsdl (added)
+++ cxf/trunk/testutils/src/main/resources/wsdl/swa-mime-nomime.wsdl Tue Feb  3 03:02:19 2009
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+  
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  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-nomime"
+  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-nomime/types"
+  xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
+  targetNamespace="http://cxf.apache.org/swa-nomime"
+  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-nomime/types">
+      <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" />
+          </xsd:sequence>
+        </xsd:complexType>
+      </xsd:element>
+
+      <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:complexType>
+
+      <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:complexType>
+
+    </xsd:schema>
+
+    <xsd:schema targetNamespace="http://ws-i.org/profiles/basic/1.1/xsd"
+      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <xsd:simpleType name="swaRef">
+        <xsd:restriction base="xsd:anyURI" />
+      </xsd:simpleType>
+    </xsd:schema>
+  </wsdl:types>
+
+  <wsdl:message name="echoDataRefRequest">
+    <wsdl:part name="data" element="types:DataStruct" />
+  </wsdl:message>
+
+  <wsdl:message name="echoDataRefResponse">
+    <wsdl:part name="data" element="types:DataStruct" />
+  </wsdl:message>
+
+  <wsdl:message name="echoDataRequest">
+    <wsdl:part name="text" element="types:text" />
+    <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:part name="headerText" element="types:headerText" />
+  </wsdl:message>
+
+  <wsdl:message name="echoDataWithHeaderResponse">
+    <wsdl:part name="text" element="types:headerText" />
+    <wsdl:part name="data" type="xsd:base64Binary" />
+    <wsdl:part name="headerText" element="types:headerText" />
+  </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: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:message>
+
+  <wsdl:portType name="SwAServiceInterface">
+
+    <wsdl:operation name="echoDataRef">
+      <wsdl:input message="tns:echoDataRefRequest" />
+      <wsdl:output message="tns:echoDataRefResponse" />
+    </wsdl:operation>
+
+    <wsdl:operation name="echoData">
+      <wsdl:input message="tns:echoDataRequest" />
+      <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:operation>
+
+  </wsdl:portType>
+
+  <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" />
+      <wsdl:input>
+        <soap:body parts="data" use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body parts="data" use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+
+    <wsdl:operation name="echoData">
+      <soap:operation soapAction="" style="literal" />
+      <wsdl:input>
+        <mime:multipartRelated>
+          <mime:part>
+            <soap:body parts="text" use="literal" />
+          </mime:part>
+          <mime:part>
+            <mime:content part="data" type="application/octet-stream" />
+          </mime:part>
+        </mime:multipartRelated>
+      </wsdl:input>
+      <wsdl:output>
+        <mime:multipartRelated>
+          <mime:part>
+            <soap:body parts="text" use="literal" />
+          </mime:part>
+          <mime:part>
+            <mime:content part="data" type="application/octet-stream" />
+          </mime:part>
+        </mime:multipartRelated>
+      </wsdl:output>
+    </wsdl:operation>
+
+    <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="headerText"
+              message="tns:echoDataWithHeaderRequest" />
+          </mime:part>
+          <mime:part>
+            <mime:content part="data" type="application/octet-stream" />
+          </mime:part>
+        </mime:multipartRelated>
+      </wsdl:input>
+      <wsdl:output>
+        <mime:multipartRelated>
+          <mime:part>
+            <soap:body parts="text" use="literal" />
+            <soap:header use="literal" part="headerText"
+              message="tns:echoDataWithHeaderResponse" />
+          </mime:part>
+          <mime:part>
+            <mime:content part="data" type="application/octet-stream" />
+          </mime:part>
+        </mime:multipartRelated>
+      </wsdl:output>
+    </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>
+    </wsdl:operation>
+  </wsdl:binding>
+
+  <wsdl:service name="SwAService">
+    <wsdl:port name="SwAServiceHttpPort"
+      binding="tns:SwAServiceBinding">
+      <soap:address location="http://localhost:9036/swa-nomime" />
+    </wsdl:port>
+  </wsdl:service>
+
+</wsdl:definitions>

Propchange: cxf/trunk/testutils/src/main/resources/wsdl/swa-mime-nomime.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/testutils/src/main/resources/wsdl/swa-mime-nomime.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/testutils/src/main/resources/wsdl/swa-mime-nomime.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message