cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1062002 - in /cxf/branches/2.3.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/ systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/
Date Fri, 21 Jan 2011 20:11:28 GMT
Author: dkulp
Date: Fri Jan 21 20:11:28 2011
New Revision: 1062002

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

........
  r1061989 | dkulp | 2011-01-21 15:00:17 -0500 (Fri, 21 Jan 2011) | 1 line
  
  [CXF-3170] SAAJInINterceptor doesn't filter out GET requests
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java

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

Modified: cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java?rev=1062002&r1=1062001&r2=1062002&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJInInterceptor.java
Fri Jan 21 20:11:28 2011
@@ -98,6 +98,10 @@ public class SAAJInInterceptor extends A
     }
     
     public void handleMessage(SoapMessage message) throws Fault {
+        if (isGET(message)) {
+            return;
+        }
+
         try {
             MessageFactory factory = getFactory(message);
             SOAPMessage soapMessage = factory.createMessage();

Modified: cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=1062002&r1=1062001&r2=1062002&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
(original)
+++ cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
Fri Jan 21 20:11:28 2011
@@ -58,6 +58,7 @@ import org.apache.cxf.common.WSDLConstan
 import org.apache.cxf.common.util.ASMHelper;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.jaxb_element_test.JaxbElementTest;
@@ -87,7 +88,14 @@ public class ClientServerMiscTest extend
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly", launchServer(ServerMisc.class));
     }
-
+    @Test
+    public void testCXF3170() throws Exception {
+        URL url = new URL(ServerMisc.DOCLITBARE_CODEFIRST_URL + "/foo");
+        HttpURLConnection con = (HttpURLConnection)url.openConnection();
+        con.getResponseCode();
+        String  str = IOUtils.readStringFromStream(con.getErrorStream());
+        assertTrue(str.contains("/foo"));  //No such operation
+    }
     @Test
     public void testWSDLDocs() throws Exception {
         Map<String, String> ns = new HashMap<String, String>();

Modified: cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java?rev=1062002&r1=1062001&r2=1062002&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java
(original)
+++ cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java
Fri Jan 21 20:11:28 2011
@@ -22,7 +22,9 @@ package org.apache.cxf.systest.jaxws;
 import javax.xml.ws.Endpoint;
 
 import org.apache.cxf.anonymous_complex_type.AnonymousComplexTypeImpl;
+import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
 import org.apache.cxf.jaxb_element_test.JaxbElementTestImpl;
+import org.apache.cxf.jaxws.EndpointImpl;
 import org.apache.cxf.jaxws.JAXWSMethodInvoker;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.apache.cxf.ordered_param_holder.OrderedParamHolderImpl;
@@ -82,7 +84,9 @@ public class ServerMisc extends Abstract
         //Endpoint.publish(DOCLIT_CODEFIRST_URL, implementor4);
         
         Object implementor7 = new DocLitBareCodeFirstServiceImpl();
-        Endpoint.publish(DOCLITBARE_CODEFIRST_URL, implementor7);
+        EndpointImpl ep = (EndpointImpl)Endpoint.publish(DOCLITBARE_CODEFIRST_URL, implementor7);
+        ep.getServer().getEndpoint().getInInterceptors().add(new SAAJInInterceptor());
+
         
         Object implementor6 = new InterfaceInheritTestImpl();
         Endpoint.publish(DOCLIT_CODEFIRST_BASE_URL, implementor6);
@@ -107,6 +111,7 @@ public class ServerMisc extends Abstract
         
         Endpoint.publish("http://localhost:" + PORT + "/InheritContext/InheritPort",
                          new InheritImpl());
+
     }
 
     public static void main(String[] args) {



Mime
View raw message