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 2012/11/14 20:50:48 UTC
svn commit: r1409326 - in /cxf/trunk:
api/src/main/java/org/apache/cxf/interceptor/
rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/
rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/
rt/databinding/aegis/src/test/java/org/apache/cxf/...
Author: dkulp
Date: Wed Nov 14 19:50:46 2012
New Revision: 1409326
URL: http://svn.apache.org/viewvc?rev=1409326&view=rev
Log:
[CXF-4629] Part 2 - remove the URIMappingInterceptor from the default chains
Modified:
cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java
cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java
cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java
cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorDocLitTest.java
cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorRPCTest.java
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/Server.java
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterNoWsdl.java
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerXMLBinding.java
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/httpget/JavaFirstHttpGetTest.java
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringAutoPublishServletTest.java
cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java
cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java
Modified: cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java?rev=1409326&r1=1409325&r2=1409326&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/URIMappingInterceptor.java Wed Nov 14 19:50:46 2012
@@ -60,6 +60,7 @@ public class URIMappingInterceptor exten
private static final Logger LOG = LogUtils.getL7dLogger(URIMappingInterceptor.class);
+ @Deprecated
public URIMappingInterceptor() {
super(Phase.UNMARSHAL);
}
Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?rev=1409326&r1=1409325&r2=1409326&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java (original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java Wed Nov 14 19:50:46 2012
@@ -88,7 +88,6 @@ import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.interceptor.InterceptorProvider;
import org.apache.cxf.interceptor.StaxInInterceptor;
import org.apache.cxf.interceptor.StaxOutInterceptor;
-import org.apache.cxf.interceptor.URIMappingInterceptor;
import org.apache.cxf.interceptor.WrappedOutInterceptor;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.Phase;
@@ -435,11 +434,6 @@ public class SoapBindingFactory extends
sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));
sb.getOutFaultInterceptors().add(SoapHeaderOutFilterInterceptor.INSTANCE);
- // REVISIT: The phase interceptor chain seems to freak out if this added
- // first. Not sure what the deal is at the moment, I suspect the
- // ordering algorithm needs to be improved
- sb.getInInterceptors().add(new URIMappingInterceptor());
-
if (version.getVersion() == 1.1) {
sb.getInFaultInterceptors().add(new Soap11FaultInInterceptor());
sb.getOutFaultInterceptors().add(new Soap11FaultOutInterceptor());
Modified: cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java?rev=1409326&r1=1409325&r2=1409326&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java (original)
+++ cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java Wed Nov 14 19:50:46 2012
@@ -37,7 +37,6 @@ import org.apache.cxf.interceptor.Attach
import org.apache.cxf.interceptor.DocLiteralInInterceptor;
import org.apache.cxf.interceptor.StaxInInterceptor;
import org.apache.cxf.interceptor.StaxOutInterceptor;
-import org.apache.cxf.interceptor.URIMappingInterceptor;
import org.apache.cxf.interceptor.WrappedOutInterceptor;
import org.apache.cxf.service.model.BindingInfo;
import org.apache.cxf.service.model.BindingOperationInfo;
@@ -65,7 +64,6 @@ public class XMLBindingFactory extends A
xb.getInInterceptors().add(new AttachmentInInterceptor());
xb.getInInterceptors().add(new StaxInInterceptor());
- xb.getInInterceptors().add(new URIMappingInterceptor());
xb.getInInterceptors().add(new DocLiteralInInterceptor());
xb.getInInterceptors().add(new XMLMessageInInterceptor());
Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java?rev=1409326&r1=1409325&r2=1409326&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java (original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java Wed Nov 14 19:50:46 2012
@@ -34,6 +34,7 @@ import org.apache.cxf.aegis.services.Ech
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.frontend.ServerFactoryBean;
import org.apache.cxf.interceptor.AbstractInDatabindingInterceptor;
+import org.apache.cxf.interceptor.URIMappingInterceptor;
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
import org.apache.cxf.staxutils.StaxUtils;
import org.apache.cxf.test.AbstractCXFTest;
@@ -50,12 +51,14 @@ public class AegisJaxwsGetTest extends A
public static final String PORT = TestUtil.getPortNumber(AegisJaxwsGetTest.class);
+ @SuppressWarnings("deprecation")
@Before
public void before() throws Exception {
JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
sf.setAddress("http://localhost:" + PORT + "/Echo");
sf.setDataBinding(new AegisDatabinding());
sf.setServiceBean(new Echo());
+ sf.getInInterceptors().add(new URIMappingInterceptor());
Server server = sf.create();
// turn off nanny in URIMappingInterceptor
server.getEndpoint()
@@ -65,6 +68,7 @@ public class AegisJaxwsGetTest extends A
sf2.setAddress("http://localhost:" + PORT + "/SimpleEcho");
sf2.setDataBinding(new AegisDatabinding());
sf2.setServiceBean(new Echo());
+ sf2.getInInterceptors().add(new URIMappingInterceptor());
server = sf2.create();
// turn off nanny in URIMappingInterceptor
server.getEndpoint()
Modified: cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorDocLitTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorDocLitTest.java?rev=1409326&r1=1409325&r2=1409326&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorDocLitTest.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorDocLitTest.java Wed Nov 14 19:50:46 2012
@@ -45,6 +45,7 @@ import org.apache.cxf.test.AbstractCXFTe
import org.junit.Before;
import org.junit.Test;
+@SuppressWarnings("deprecation")
public class URIMappingInterceptorDocLitTest extends AbstractCXFTest {
Message message;
Modified: cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorRPCTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorRPCTest.java?rev=1409326&r1=1409325&r2=1409326&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorRPCTest.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/URIMappingInterceptorRPCTest.java Wed Nov 14 19:50:46 2012
@@ -45,6 +45,7 @@ import org.apache.hello_world_soap_http.
import org.junit.Before;
import org.junit.Test;
+@SuppressWarnings("deprecation")
public class URIMappingInterceptorRPCTest extends AbstractCXFTest {
Message message;
Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/Server.java?rev=1409326&r1=1409325&r2=1409326&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/Server.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/Server.java Wed Nov 14 19:50:46 2012
@@ -20,6 +20,8 @@
package org.apache.cxf.systest.jaxws;
import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
import java.util.concurrent.Future;
import javax.jws.WebService;
@@ -27,6 +29,7 @@ import javax.xml.ws.AsyncHandler;
import javax.xml.ws.Endpoint;
import org.apache.cxf.annotations.UseAsyncMethod;
+import org.apache.cxf.interceptor.URIMappingInterceptor;
import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.jaxws.ServerAsyncResponse;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
@@ -40,6 +43,9 @@ public class Server extends AbstractBusT
static final String BARE_PORT = allocatePort(Server.class, 1);
static final String BOGUS_REAL_PORT = allocatePort(Server.class, 2);
+ List<Endpoint> eps = new LinkedList<Endpoint>();
+
+ @SuppressWarnings("deprecation")
protected void run() {
URL url = getClass().getResource("fault-stack-trace.xml");
if (url != null) {
@@ -50,23 +56,25 @@ public class Server extends AbstractBusT
implementor = new AsyncGreeter();
address = "http://localhost:" + PORT + "/SoapContext/AsyncSoapPort";
- Endpoint.publish(address, implementor);
+ eps.add(Endpoint.publish(address, implementor));
implementor = new GreeterImplMultiPort();
address = "http://localhost:" + PORT + "/MultiPort/GreeterPort";
- Endpoint.publish(address, implementor);
+ eps.add(Endpoint.publish(address, implementor));
implementor = new DocLitBareGreeterMultiPort();
address = "http://localhost:" + PORT + "/MultiPort/DocBarePort";
- Endpoint.publish(address, implementor);
+ eps.add(Endpoint.publish(address, implementor));
implementor = new GreeterImpl();
address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
- Endpoint.publish(address, implementor);
+ Endpoint ep = Endpoint.publish(address, implementor);
+ ((EndpointImpl)ep).getService().getInInterceptors().add(new URIMappingInterceptor());
+ eps.add(ep);
implementor = new RefGreeterImpl();
address = "http://localhost:" + PORT + "/SoapContext/SoapPort2";
- Endpoint.publish(address, implementor);
+ eps.add(Endpoint.publish(address, implementor));
//publish port with soap12 binding
address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
@@ -75,17 +83,25 @@ public class Server extends AbstractBusT
EndpointImpl e = (EndpointImpl) Endpoint.create(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING,
new Greeter12Impl());
e.publish(address);
+ eps.add(e);
implementor = new DocLitBareGreeterImpl();
address = "http://localhost:" + BARE_PORT + "/SoapContext/SoapPort";
- Endpoint.publish(address, implementor);
+ eps.add(Endpoint.publish(address, implementor));
implementor = new GreeterImplBogus();
address = "http://localhost:" + BOGUS_REAL_PORT + "/SoapContext/SoapPort";
- Endpoint.publish(address, implementor);
+ eps.add(Endpoint.publish(address, implementor));
}
+ public void tearDown() {
+ while (!eps.isEmpty()) {
+ Endpoint ep = eps.remove(0);
+ ep.stop();
+ }
+ }
+
@WebService(endpointInterface = "org.apache.hello_world_soap_http.Greeter",
targetNamespace = "http://apache.org/hello_world_soap_http")
public class Greeter12Impl extends BaseGreeterImpl {
Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterNoWsdl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterNoWsdl.java?rev=1409326&r1=1409325&r2=1409326&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterNoWsdl.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterNoWsdl.java Wed Nov 14 19:50:46 2012
@@ -26,11 +26,14 @@ import javax.xml.ws.Endpoint;
import org.apache.cxf.frontend.WSDLGetUtils;
import org.apache.cxf.greeter_control.GreeterImplNoWsdl;
+import org.apache.cxf.interceptor.URIMappingInterceptor;
+import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
public class ServerGreeterNoWsdl extends AbstractBusTestServerBase {
static final String PORT = allocatePort(ServerGreeterNoWsdl.class);
+ @SuppressWarnings("deprecation")
protected void run() {
Object implementor = new GreeterImplNoWsdl();
String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort";
@@ -39,6 +42,7 @@ public class ServerGreeterNoWsdl extends
props.put(WSDLGetUtils.WSDL_CREATE_IMPORTS, Boolean.TRUE);
ep.setProperties(props);
ep.publish(address);
+ ((EndpointImpl)ep).getService().getInInterceptors().add(new URIMappingInterceptor());
}
public static void main(String[] args) {
Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java?rev=1409326&r1=1409325&r2=1409326&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerMisc.java Wed Nov 14 19:50:46 2012
@@ -23,6 +23,7 @@ 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.interceptor.URIMappingInterceptor;
import org.apache.cxf.jaxb_element_test.JaxbElementTestImpl;
import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.jaxws.JAXWSMethodInvoker;
@@ -51,6 +52,7 @@ public class ServerMisc extends Abstract
public static final String DOCLIT_CODEFIRST_SETTINGS_URL =
"http://localhost:" + PORT + "/DocLitWrappedCodeFirstServiceSettings/";
+ @SuppressWarnings("deprecation")
protected void run() {
Factory factory = new PerRequestFactory(DocLitWrappedCodeFirstServiceImpl.class);
@@ -86,6 +88,7 @@ public class ServerMisc extends Abstract
Object implementor7 = new DocLitBareCodeFirstServiceImpl();
EndpointImpl ep = (EndpointImpl)Endpoint.publish(DOCLITBARE_CODEFIRST_URL, implementor7);
ep.getServer().getEndpoint().getInInterceptors().add(new SAAJInInterceptor());
+ ep.getServer().getEndpoint().getInInterceptors().add(new URIMappingInterceptor());
Object implementor6 = new InterfaceInheritTestImpl();
Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerXMLBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerXMLBinding.java?rev=1409326&r1=1409325&r2=1409326&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerXMLBinding.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ServerXMLBinding.java Wed Nov 14 19:50:46 2012
@@ -19,8 +19,13 @@
package org.apache.cxf.systest.jaxws;
+import java.util.LinkedList;
+import java.util.List;
+
import javax.xml.ws.Endpoint;
+import org.apache.cxf.interceptor.URIMappingInterceptor;
+import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
import org.apache.headers.HeaderTesterImpl;
import org.apache.hello_world_xml_http.bare.GreeterImpl;
@@ -32,26 +37,38 @@ public class ServerXMLBinding extends Ab
static final String WRAP_PORT = allocatePort(ServerXMLBinding.class, 1);
static final String MIX_PORT = allocatePort(ServerXMLBinding.class, 2);
+ List<Endpoint> eps = new LinkedList<Endpoint>();
+
+ @SuppressWarnings("deprecation")
protected void run() {
Object implementor = new GreeterImpl();
String address = "http://localhost:" + REG_PORT + "/XMLService/XMLPort";
- Endpoint.publish(address, implementor);
+ eps.add(Endpoint.publish(address, implementor));
+
+ ((EndpointImpl)eps.get(0)).getService().getInInterceptors().add(new URIMappingInterceptor());
Object implementor1 = new org.apache.hello_world_xml_http.wrapped.GreeterImpl();
address = "http://localhost:" + WRAP_PORT + "/XMLService/XMLPort";
- Endpoint.publish(address, implementor1);
+ eps.add(Endpoint.publish(address, implementor1));
Object faultImplementor = new GreeterFaultImpl();
String faultAddress = "http://localhost:" + REG_PORT + "/XMLService/XMLFaultPort";
- Endpoint.publish(faultAddress, faultImplementor);
+ eps.add(Endpoint.publish(faultAddress, faultImplementor));
Object implementor2 = new HeaderTesterImpl();
address = "http://localhost:" + REG_PORT + "/XMLContext/XMLPort";
- Endpoint.publish(address, implementor2);
+ eps.add(Endpoint.publish(address, implementor2));
Object implementor3 = new org.apache.hello_world_xml_http.mixed.GreeterImpl();
address = "http://localhost:" + MIX_PORT + "/XMLService/XMLPort";
- Endpoint.publish(address, implementor3);
+ eps.add(Endpoint.publish(address, implementor3));
+ }
+
+ public void tearDown() {
+ while (!eps.isEmpty()) {
+ Endpoint ep = eps.remove(0);
+ ep.stop();
+ }
}
public static void main(String[] args) {
Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/httpget/JavaFirstHttpGetTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/httpget/JavaFirstHttpGetTest.java?rev=1409326&r1=1409325&r2=1409326&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/httpget/JavaFirstHttpGetTest.java (original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/httpget/JavaFirstHttpGetTest.java Wed Nov 14 19:50:46 2012
@@ -26,6 +26,7 @@ import java.net.URLConnection;
import org.apache.cxf.helpers.IOUtils;
import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.interceptor.URIMappingInterceptor;
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
@@ -41,10 +42,12 @@ public class JavaFirstHttpGetTest extend
+ PORT + "/JavaFirstHttpGetTest";
public static class Server extends AbstractBusTestServerBase {
+ @SuppressWarnings("deprecation")
protected void run() {
MyImplementation implementor = new MyImplementation();
JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
svrFactory.setServiceClass(MyInterface.class);
+ svrFactory.getInInterceptors().add(new URIMappingInterceptor());
svrFactory.setAddress(BASE_URL);
svrFactory.setServiceBean(implementor);
svrFactory.getInInterceptors().add(new LoggingInInterceptor());
Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringAutoPublishServletTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringAutoPublishServletTest.java?rev=1409326&r1=1409325&r2=1409326&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringAutoPublishServletTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringAutoPublishServletTest.java Wed Nov 14 19:50:46 2012
@@ -71,33 +71,7 @@ public class SpringAutoPublishServletTes
assertValid("/s:Envelope/s:Body", doc);
assertValid("//h:sayHiResponse", doc);
}
-
- @Test
- public void testGreetMeGetRequest() throws Exception {
- ServletUnitClient client = newClient();
- client.setExceptionsThrownOnErrorStatus(true);
-
- WebRequest req =
- new GetMethodQueryWebRequest(CONTEXT_URL + "/services/SOAPService/greetMe?"
- + "requestType=hello");
-
- WebResponse response = client.getResponse(req);
- Document doc = DOMUtils.readXml(response.getInputStream());
- addNamespace("h", "http://apache.org/hello_world_soap_http/types");
- assertValid("/s:Envelope/s:Body", doc);
- assertValid("//h:greetMeResponse", doc);
-
- req =
- new GetMethodQueryWebRequest(CONTEXT_URL + "/services/DerivedGreeterService/greetMe?"
- + "requestType=hello");
-
- response = client.getResponse(req);
- doc = DOMUtils.readXml(response.getInputStream());
- addNamespace("h", "http://apache.org/hello_world_soap_http/types");
- assertValid("/s:Envelope/s:Body", doc);
- assertValid("//h:greetMeResponse", doc);
- }
-
+
@Test
public void testGetWSDL() throws Exception {
Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java?rev=1409326&r1=1409325&r2=1409326&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java Wed Nov 14 19:50:46 2012
@@ -74,33 +74,7 @@ public class SpringServletTest extends A
assertValid("/s:Envelope/s:Body", doc);
assertValid("//h:sayHiResponse", doc);
}
-
- @Test
- public void testGreetMeGetRequest() throws Exception {
- ServletUnitClient client = newClient();
- client.setExceptionsThrownOnErrorStatus(true);
-
- WebRequest req =
- new GetMethodQueryWebRequest(CONTEXT_URL + "/services/Greeter/greetMe?"
- + "requestType=hello");
-
- WebResponse response = client.getResponse(req);
- Document doc = DOMUtils.readXml(response.getInputStream());
- addNamespace("h", "http://apache.org/hello_world_soap_http/types");
- assertValid("/s:Envelope/s:Body", doc);
- assertValid("//h:greetMeResponse", doc);
-
- req =
- new GetMethodQueryWebRequest(CONTEXT_URL + "/services/Greeter1/greetMe?"
- + "requestType=hello");
-
- response = client.getResponse(req);
- doc = DOMUtils.readXml(response.getInputStream());
- addNamespace("h", "http://apache.org/hello_world_soap_http/types");
- assertValid("/s:Envelope/s:Body", doc);
- assertValid("//h:greetMeResponse", doc);
- }
-
+
@Test
public void testGetWSDL() throws Exception {
Modified: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java?rev=1409326&r1=1409325&r2=1409326&view=diff
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java (original)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java Wed Nov 14 19:50:46 2012
@@ -21,18 +21,27 @@ package org.apache.cxf.systest.soap12;
import javax.xml.ws.Endpoint;
+import org.apache.cxf.interceptor.URIMappingInterceptor;
+import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
public class Server extends AbstractBusTestServerBase {
public static final String PORT = allocatePort(Server.class);
+ Endpoint ep;
+ @SuppressWarnings("deprecation")
protected void run() {
Object implementor = new GreeterImpl();
String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
- Endpoint.publish(address, implementor);
+ ep = Endpoint.publish(address, implementor);
+ EndpointImpl epi = (EndpointImpl)ep;
+ epi.getService().getInInterceptors().add(new URIMappingInterceptor());
}
+ public void tearDown() throws Exception {
+ ep.stop();
+ }
public static void main(String[] args) {
try {