cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r819803 - in /cxf/branches/2.2.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/ rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/header/ testutils/src/main/java/org/apache/header_test/ testutils/src/main/re...
Date Tue, 29 Sep 2009 02:55:45 GMT
Author: dkulp
Date: Tue Sep 29 02:55:45 2009
New Revision: 819803

URL: http://svn.apache.org/viewvc?rev=819803&view=rev
Log:
Merged revisions 819802 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r819802 | dkulp | 2009-09-28 22:53:32 -0400 (Mon, 28 Sep 2009) | 2 lines
  
  [CXF-2451] Fix an issue with implicit headers and no-arg methods causing
  exceptions
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/header/HeaderClientServerTest.java
    cxf/branches/2.2.x-fixes/testutils/src/main/java/org/apache/header_test/TestHeaderImpl.java
    cxf/branches/2.2.x-fixes/testutils/src/main/resources/wsdl/soapheader.wsdl

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
    svn:mergeinfo = /cxf/trunk:819802

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java?rev=819803&r1=819802&r2=819803&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
Tue Sep 29 02:55:45 2009
@@ -135,6 +135,7 @@
                 newParams = new MessageContentsList(helper.getWrapperParts(wrappedObject));
                 
                 List<Integer> removes = null;
+                int count = 0;
                 for (MessagePartInfo part : messageInfo.getMessageParts()) {
                     if (Boolean.TRUE.equals(part.getProperty(ReflectionServiceFactoryBean.HEADER)))
{
                         MessagePartInfo mpi = wrappedMessageInfo.getMessagePart(part.getName());
@@ -147,14 +148,19 @@
                             }
                             removes.add(mpi.getIndex());
                         }
+                    } else {
+                        ++count;
                     }
                 }
-                if (removes != null) {
+                if (count == 0) {
+                    newParams.clear();
+                } else if (removes != null) {
                     Collections.sort(removes, Collections.reverseOrder());
                     for (Integer i : removes) {
                         newParams.remove(i.intValue());
                     }
                 }
+                
             } catch (Exception e) {
                 throw new Fault(e);
             }

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/header/HeaderClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/header/HeaderClientServerTest.java?rev=819803&r1=819802&r2=819803&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/header/HeaderClientServerTest.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/header/HeaderClientServerTest.java
Tue Sep 29 02:55:45 2009
@@ -234,7 +234,16 @@
             // fail("No exception should happen in testHeader4");
         }
     }
-
+    @Test
+    public void testHeader7() {
+        URL wsdl = getClass().getResource("/wsdl/soapheader.wsdl");
+        assertNotNull(wsdl);
+        
+        SOAPHeaderService service = new SOAPHeaderService(wsdl, serviceName);
+        assertNotNull(service);
+        TestHeader proxy = service.getPort(portName, TestHeader.class);
+        assertEquals("Hello", proxy.testHeader7());
+    }
     @Test
     public void testRPCInHeader() throws Exception {
         URL wsdl = getClass().getResource("/wsdl/soapheader_rpc.wsdl");

Modified: cxf/branches/2.2.x-fixes/testutils/src/main/java/org/apache/header_test/TestHeaderImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/testutils/src/main/java/org/apache/header_test/TestHeaderImpl.java?rev=819803&r1=819802&r2=819803&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/testutils/src/main/java/org/apache/header_test/TestHeaderImpl.java
(original)
+++ cxf/branches/2.2.x-fixes/testutils/src/main/java/org/apache/header_test/TestHeaderImpl.java
Tue Sep 29 02:55:45 2009
@@ -137,4 +137,8 @@
         return ss;
     }
 
+    public String testHeader7() {
+        return "Hello";
+    }
+
 }

Modified: cxf/branches/2.2.x-fixes/testutils/src/main/resources/wsdl/soapheader.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/testutils/src/main/resources/wsdl/soapheader.wsdl?rev=819803&r1=819802&r2=819803&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/testutils/src/main/resources/wsdl/soapheader.wsdl (original)
+++ cxf/branches/2.2.x-fixes/testutils/src/main/resources/wsdl/soapheader.wsdl Tue Sep 29
02:55:45 2009
@@ -106,6 +106,22 @@
                     </sequence>
                 </complexType>
             </element>
+
+
+            <element name="testHeader7">
+                <complexType>
+                    <sequence>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="testHeader7Response">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" nillable="true" type="string"/>
+                    </sequence>
+                </complexType>
+            </element>
+
         </schema>
         <schema xmlns="http://www.w3.org/2001/XMLSchema" 
             targetNamespace="http://apache.org/tests/type_test/all">
@@ -189,6 +205,12 @@
     <wsdl:message name="testHeaderMessage">
         <wsdl:part name="inoutHeader" element="x1:testHeaderMessage"/>
     </wsdl:message>
+    <wsdl:message name="testHeader7Request">
+        <wsdl:part name="in" element="x1:testHeader7"/>
+    </wsdl:message>
+    <wsdl:message name="testHeader7Response">
+        <wsdl:part name="out" element="x1:testHeader7Response"/>
+    </wsdl:message>
     <message name="AnyTypeRequest">
         <part name="x" element="all:test_all"/>
         <part name="y" element="chc:test_chc"/>
@@ -229,6 +251,10 @@
             <input name="send_receive_any_type_request" message="tns:AnyTypeRequest"/>
             <output name="send_receive_any_type_response" message="tns:AnyTypeResponse"/>
         </operation>
+        <wsdl:operation name="testHeader7">
+            <wsdl:input name="testHeader7Request" message="tns:testHeader7Request"/>
+            <wsdl:output name="testHeader7Response" message="tns:testHeader7Response"/>
+        </wsdl:operation>
     </wsdl:portType>
     <wsdl:binding name="TestHeader_SOAPBinding" type="tns:TestHeader">
         <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
@@ -306,6 +332,16 @@
                 <soap:body use="literal"/>
             </output>
         </operation>
+        <wsdl:operation name="testHeader7">
+            <soap:operation style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+                <soap:header message="tns:testHeaderMessage" part="inoutHeader" use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
     </wsdl:binding>
     <wsdl:service name="SOAPHeaderService">
         <wsdl:port name="SoapHeaderPort" binding="tns:TestHeader_SOAPBinding">



Mime
View raw message