cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1493341 - in /cxf/trunk/rt/frontend/jaxws/src: main/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestination.java test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestinationTest.java
Date Sat, 15 Jun 2013 11:35:07 GMT
Author: dkulp
Date: Sat Jun 15 11:35:07 2013
New Revision: 1493341

URL: http://svn.apache.org/r1493341
Log:
Fix jaxws2 profile

Modified:
    cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestination.java
    cxf/trunk/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestinationTest.java

Modified: cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestination.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestination.java?rev=1493341&r1=1493340&r2=1493341&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestination.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestination.java
Sat Jun 15 11:35:07 2013
@@ -30,7 +30,6 @@ import org.apache.cxf.BusFactory;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.continuations.SuspendedInvocationException;
 import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.message.ExchangeImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
@@ -38,9 +37,6 @@ import org.apache.cxf.service.model.Endp
 import org.apache.cxf.transport.http.AbstractHTTPDestination;
 import org.apache.cxf.transport.http.DestinationRegistry;
 import org.apache.cxf.transport.http.HTTPSession;
-import org.apache.cxf.transports.http.QueryHandler;
-import org.apache.cxf.transports.http.QueryHandlerRegistry;
-import org.apache.cxf.transports.http.StemMatchingQueryHandler;
 
 public class JAXWSHttpSpiDestination extends AbstractHTTPDestination {
 
@@ -67,54 +63,6 @@ public class JAXWSHttpSpiDestination ext
      */
     protected void doService(HttpServletRequest req, HttpServletResponse resp)
         throws IOException {
-
-        QueryHandlerRegistry queryHandlerRegistry = bus.getExtension(QueryHandlerRegistry.class);
-        
-        if (null != req.getQueryString() && queryHandlerRegistry != null) {   
-            String reqAddr = req.getRequestURL().toString();
-            String requestURL =  reqAddr + "?" + req.getQueryString();
-            String pathInfo = req.getPathInfo();                     
-            for (QueryHandler qh : queryHandlerRegistry.getHandlers()) {
-                boolean recognized =
-                    qh instanceof StemMatchingQueryHandler
-                    ? ((StemMatchingQueryHandler)qh).isRecognizedQuery(requestURL,
-                                                                       pathInfo,
-                                                                       endpointInfo,
-                                                                       contextMatchOnExact())
-                    : qh.isRecognizedQuery(requestURL, pathInfo, endpointInfo);
-                if (recognized) {
-                    //replace the endpointInfo address with request url only for get wsdl
-                    String errorMsg = null;
-                    CachedOutputStream out = new CachedOutputStream();
-                    try {
-                        synchronized (endpointInfo) {
-                            String oldAddress = endpointInfo.getAddress(); 
-                            endpointInfo.setAddress(reqAddr);   
-                            resp.setContentType(qh.getResponseContentType(requestURL, pathInfo));
-                            try {
-                                qh.writeResponse(requestURL, pathInfo, endpointInfo, out);
-                            } catch (Exception ex) {
-                                LOG.log(Level.WARNING, "writeResponse failed: ", ex);
-                                errorMsg = ex.getMessage();
-                            }
-                            endpointInfo.setAddress(oldAddress);
-                        }
-                        if (errorMsg != null) {
-                            resp.sendError(500, errorMsg);
-                        } else {
-                            out.writeCacheTo(resp.getOutputStream());
-                            resp.getOutputStream().flush();                     
-                        }
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                        throw new RuntimeException(e);
-                    } finally {
-                        out.close();
-                    }
-                    return;
-                }
-            }
-        }
         
         Bus origBus = BusFactory.getAndSetThreadDefaultBus(bus); 
         try {

Modified: cxf/trunk/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestinationTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestinationTest.java?rev=1493341&r1=1493340&r2=1493341&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestinationTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/test/jaxws22/org/apache/cxf/transport/http_jaxws_spi/JAXWSHttpSpiDestinationTest.java
Sat Jun 15 11:35:07 2013
@@ -32,7 +32,6 @@ import org.apache.cxf.message.Message;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.MessageObserver;
 import org.apache.cxf.transport.http.DestinationRegistryImpl;
-import org.apache.cxf.transports.http.QueryHandlerRegistry;
 import org.easymock.EasyMock;
 import org.easymock.IMocksControl;
 import org.junit.After;
@@ -87,7 +86,6 @@ public class JAXWSHttpSpiDestinationTest
     
     @Test
     public void testMessage() throws Exception {
-        expect(bus.getExtension(QueryHandlerRegistry.class)).andReturn(null);
         HttpExchange exchange = setUpExchange();
         control.replay();
 



Mime
View raw message