You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/07/15 22:24:03 UTC

svn commit: r794401 - in /cxf/branches/2.2.x-fixes: ./ rt/frontend/simple/src/test/java/org/apache/cxf/frontend/soap/SoapBindingSelectionTest.java

Author: dkulp
Date: Wed Jul 15 20:24:02 2009
New Revision: 794401

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

........
  r793059 | dkulp | 2009-07-10 14:04:31 -0400 (Fri, 10 Jul 2009) | 1 line
  
  [CXF-2336] Add asserts to check the namespace of return to test CXF-2336
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/soap/SoapBindingSelectionTest.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 15 20:24:02 2009
@@ -1 +1 @@
-/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538,791753,791947,792007,792096,792183,792261-792265,792271,792604,792683-792685,792975,792985,793570
+/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538,791753,791947,792007,792096,792183,792261-792265,792271,792604,792683-792685,792975,792985,793059,793570

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

Modified: cxf/branches/2.2.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/soap/SoapBindingSelectionTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/soap/SoapBindingSelectionTest.java?rev=794401&r1=794400&r2=794401&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/soap/SoapBindingSelectionTest.java (original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/simple/src/test/java/org/apache/cxf/frontend/soap/SoapBindingSelectionTest.java Wed Jul 15 20:24:02 2009
@@ -18,6 +18,9 @@
  */
 package org.apache.cxf.frontend.soap;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+
 import org.apache.cxf.binding.soap.Soap12;
 import org.apache.cxf.binding.soap.SoapBindingConfiguration;
 import org.apache.cxf.endpoint.ServerImpl;
@@ -78,17 +81,26 @@
         MultipleEndpointObserver meo = (MultipleEndpointObserver) mo;
         assertEquals(2, meo.getEndpoints().size());
         
-        invoke("http://localhost/Hello", LocalTransportFactory.TRANSPORT_ID, "soap11.xml");
+        Node nd = invoke("http://localhost/Hello", LocalTransportFactory.TRANSPORT_ID, "soap11.xml");
+        assertEquals("http://schemas.xmlsoap.org/soap/envelope/", getNs(nd));
         
         assertTrue(service1Invoked);
         assertFalse(service2Invoked);
         
         service1Invoked = false;
         
-        invoke("http://localhost/Hello", LocalTransportFactory.TRANSPORT_ID, "soap12.xml");
+        nd = invoke("http://localhost/Hello", LocalTransportFactory.TRANSPORT_ID, "soap12.xml");
+        assertEquals("http://www.w3.org/2003/05/soap-envelope", getNs(nd));
         
         assertFalse(service1Invoked);
         assertTrue(service2Invoked);
     }
+    
+    private String getNs(Node nd) {
+        if (nd instanceof Document) {
+            return getNs(((Document)nd).getDocumentElement());
+        }
+        return nd.getNamespaceURI();
+    }
 
 }