Author: dkulp
Date: Mon Jan 6 22:09:25 2014
New Revision: 1556050
URL: http://svn.apache.org/r1556050
Log:
Remove the deprecated (and security problematic) URIMappingInterceptor
Removed:
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/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/URIMappingInterceptor.java
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/httpget/JavaFirstHttpGetTest.java
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/httpget/MyEnum.java
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/httpget/MyImplementation.java
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/httpget/MyInterface.java
Modified:
cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
cxf/trunk/rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/aegisOptionsTestBeans.xml
cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/BareInInterceptor.java
cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java
cxf/trunk/systests/databinding/src/test/resources/webapp/WEB-INF/beans.xml
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.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/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Server.java
cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java
Modified:
cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java?rev=1556050&r1=1556049&r2=1556050&view=diff
==============================================================================
---
cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
(original)
+++
cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
Mon Jan 6 22:09:25 2014
@@ -50,7 +50,6 @@ import org.apache.cxf.service.model.Serv
import org.apache.cxf.staxutils.DepthXMLStreamReader;
import org.apache.cxf.staxutils.StaxUtils;
import org.apache.cxf.wsdl.interceptors.BareInInterceptor;
-import org.apache.cxf.wsdl.interceptors.URIMappingInterceptor;
public class RPCInInterceptor extends AbstractInDatabindingInterceptor {
private static final QName SOAP12_RESULT = new
QName("http://www.w3.org/2003/05/soap-rpc",
@@ -59,7 +58,6 @@ public class RPCInInterceptor extends Ab
public RPCInInterceptor() {
super(Phase.UNMARSHAL);
- addAfter(URIMappingInterceptor.class.getName());
}
private BindingOperationInfo getOperation(Message message, QName opName) {
Modified:
cxf/trunk/rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/aegisOptionsTestBeans.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/aegisOptionsTestBeans.xml?rev=1556050&r1=1556049&r2=1556050&view=diff
==============================================================================
---
cxf/trunk/rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/aegisOptionsTestBeans.xml
(original)
+++
cxf/trunk/rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/aegisOptionsTestBeans.xml
Mon Jan 6 22:09:25 2014
@@ -23,9 +23,9 @@
<bean id="aegisBean"
class="org.apache.cxf.aegis.databinding.AegisDatabinding">
<property name="aegisContext">
<bean class="org.apache.cxf.aegis.AegisContext">
- <!-- the test that uses this uses JDOM -->
+ <!-- the test that uses this uses JDOM -->
<property name="enableJDOMMappings" value="true"/>
- <property name="configuration">
+ <property name="typeCreationOptions">
<bean
class="org.apache.cxf.aegis.type.TypeCreationOptions">
<property name="defaultMinOccurs" value="3"/>
<property name="defaultNillable" value="false"/>
Modified:
cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java?rev=1556050&r1=1556049&r2=1556050&view=diff
==============================================================================
---
cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
(original)
+++
cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Mon Jan 6 22:09:25 2014
@@ -69,7 +69,6 @@ import org.apache.cxf.staxutils.StaxUtil
import org.apache.cxf.ws.security.SecurityConstants;
import org.apache.cxf.ws.security.tokenstore.SecurityToken;
import org.apache.cxf.ws.security.tokenstore.TokenStore;
-import org.apache.cxf.wsdl.interceptors.URIMappingInterceptor;
import org.apache.wss4j.common.cache.ReplayCache;
import org.apache.wss4j.common.crypto.Crypto;
import org.apache.wss4j.common.ext.WSPasswordCallback;
@@ -170,10 +169,6 @@ public class WSS4JInInterceptor extends
String method = (String)message.get(SoapMessage.HTTP_REQUEST_METHOD);
boolean isGet =
"GET".equals(method) && message.getContent(XMLStreamReader.class)
== null;
- if (isGet) {
- //make sure we skip the URIMapping as we cannot apply security
requirements to that
- message.put(URIMappingInterceptor.URIMAPPING_SKIP, Boolean.TRUE);
- }
return isGet;
}
Modified:
cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java?rev=1556050&r1=1556049&r2=1556050&view=diff
==============================================================================
---
cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
(original)
+++
cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
Mon Jan 6 22:09:25 2014
@@ -44,7 +44,6 @@ import org.apache.cxf.phase.Phase;
import org.apache.cxf.ws.security.SecurityConstants;
import org.apache.cxf.ws.security.tokenstore.SecurityToken;
import org.apache.cxf.ws.security.tokenstore.TokenStore;
-import org.apache.cxf.wsdl.interceptors.URIMappingInterceptor;
import org.apache.wss4j.common.ConfigurationConstants;
import org.apache.wss4j.common.cache.ReplayCache;
import org.apache.wss4j.common.crypto.Crypto;
@@ -79,13 +78,7 @@ public class WSS4JStaxInInterceptor exte
public final boolean isGET(SoapMessage message) {
String method = (String)message.get(SoapMessage.HTTP_REQUEST_METHOD);
- boolean isGet =
- "GET".equals(method) && message.getContent(XMLStreamReader.class)
== null;
- if (isGet) {
- //make sure we skip the URIMapping as we cannot apply security
requirements to that
- message.put(URIMappingInterceptor.URIMAPPING_SKIP, Boolean.TRUE);
- }
- return isGet;
+ return "GET".equals(method) &&
message.getContent(XMLStreamReader.class) == null;
}
@Override
Modified:
cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/BareInInterceptor.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/BareInInterceptor.java?rev=1556050&r1=1556049&r2=1556050&view=diff
==============================================================================
---
cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/BareInInterceptor.java
(original)
+++
cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/BareInInterceptor.java
Mon Jan 6 22:09:25 2014
@@ -59,7 +59,6 @@ public class BareInInterceptor extends A
public BareInInterceptor() {
super(Phase.UNMARSHAL);
- addAfter(URIMappingInterceptor.class.getName());
}
public void handleMessage(Message message) {
Modified:
cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java?rev=1556050&r1=1556049&r2=1556050&view=diff
==============================================================================
---
cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java
(original)
+++
cxf/trunk/rt/wsdl/src/main/java/org/apache/cxf/wsdl/interceptors/DocLiteralInInterceptor.java
Mon Jan 6 22:09:25 2014
@@ -60,7 +60,6 @@ public class DocLiteralInInterceptor ext
public DocLiteralInInterceptor() {
super(Phase.UNMARSHAL);
- addAfter(URIMappingInterceptor.class.getName());
}
public void handleMessage(Message message) {
Modified:
cxf/trunk/systests/databinding/src/test/resources/webapp/WEB-INF/beans.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/databinding/src/test/resources/webapp/WEB-INF/beans.xml?rev=1556050&r1=1556049&r2=1556050&view=diff
==============================================================================
--- cxf/trunk/systests/databinding/src/test/resources/webapp/WEB-INF/beans.xml
(original)
+++ cxf/trunk/systests/databinding/src/test/resources/webapp/WEB-INF/beans.xml
Mon Jan 6 22:09:25 2014
@@ -45,7 +45,7 @@
<bean
class="org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean">
<property name="serviceConfigurations">
<list>
- <bean
class="org.apache.cxf.aegis.databinding.AegisServiceConfiguration">
+ <bean
class="org.apache.cxf.aegis.databinding.XFireCompatibilityServiceConfiguration">
<property name="serviceNamespace"
value="http://foo.bar.com"/>
</bean>
<bean
class="org.apache.cxf.wsdl.service.factory.DefaultServiceConfiguration"/>
Modified:
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java?rev=1556050&r1=1556049&r2=1556050&view=diff
==============================================================================
---
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java
(original)
+++
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java
Mon Jan 6 22:09:25 2014
@@ -19,20 +19,14 @@
package org.apache.cxf.systest.jaxws;
-import java.io.InputStream;
import java.lang.reflect.UndeclaredThrowableException;
-import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
-import javax.xml.xpath.XPathConstants;
-
import org.w3c.dom.Document;
import org.w3c.dom.Node;
-
-import org.apache.cxf.binding.soap.Soap11;
import org.apache.cxf.greeter_control.Greeter;
import org.apache.cxf.greeter_control.GreeterService;
import org.apache.cxf.helpers.XPathUtils;
@@ -78,37 +72,4 @@ public class ClientServerGreeterNoWsdlTe
throw (Exception)ex.getCause();
}
}
-
- // test the http get invocation
-
- @Test
- public void testGetGreetMe() throws Exception {
- HttpURLConnection httpConnection =
- getHttpConnection("http://localhost:"
- + PORT +
"/SoapContext/GreeterPort/greetMe/requestType/cxf");
- httpConnection.connect();
-
- assertEquals(200, httpConnection.getResponseCode());
-
- assertEquals("text/xml;charset=utf-8",
httpConnection.getContentType().toLowerCase());
- assertEquals("OK", httpConnection.getResponseMessage());
-
- InputStream in = httpConnection.getInputStream();
- assertNotNull(in);
-
- Document doc = StaxUtils.read(in);
- assertNotNull(doc);
-
- Map<String, String> ns = new HashMap<String, String>();
- ns.put("soap", Soap11.SOAP_NAMESPACE);
- ns.put("ns2", "http://cxf.apache.org/greeter_control/types");
- XPathUtils xu = new XPathUtils(ns);
- Node body = (Node) xu.getValue("/soap:Envelope/soap:Body", doc,
XPathConstants.NODE);
- assertNotNull(body);
- String response = (String)
xu.getValue("//ns2:greetMeResponse/ns2:responseType/text()",
- body,
- XPathConstants.STRING);
- assertEquals("Hello cxf", response);
- }
-
}
Modified:
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=1556050&r1=1556049&r2=1556050&view=diff
==============================================================================
---
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
(original)
+++
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
Mon Jan 6 22:09:25 2014
@@ -94,14 +94,7 @@ public class ClientServerMiscTest extend
public static void startServers() throws Exception {
assertTrue("server did not launch correctly",
launchServer(ServerMisc.class, true));
}
- @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/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java?rev=1556050&r1=1556049&r2=1556050&view=diff
==============================================================================
---
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
(original)
+++
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
Mon Jan 6 22:09:25 2014
@@ -26,7 +26,6 @@ import java.lang.reflect.Proxy;
import java.lang.reflect.UndeclaredThrowableException;
import java.net.HttpURLConnection;
import java.net.URL;
-import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -47,20 +46,16 @@ import javax.xml.ws.Endpoint;
import javax.xml.ws.Response;
import javax.xml.ws.Service;
import javax.xml.ws.WebServiceException;
-import javax.xml.xpath.XPathConstants;
import org.w3c.dom.Document;
-import org.w3c.dom.Node;
import org.apache.cxf.Bus;
-import org.apache.cxf.binding.soap.Soap11;
import org.apache.cxf.bus.CXFBusFactory;
import org.apache.cxf.common.logging.LogUtils;
import org.apache.cxf.configuration.security.AuthorizationPolicy;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.endpoint.dynamic.DynamicClientFactory;
import org.apache.cxf.frontend.ClientProxy;
-import org.apache.cxf.helpers.XPathUtils;
import org.apache.cxf.message.Message;
import org.apache.cxf.staxutils.StaxUtils;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -760,69 +755,8 @@ public class ClientServerTest extends Ab
assertTrue(e.getCause().getStackTrace().length > 0);
}
}
-
- @Test
- public void testGetSayHi() throws Exception {
- HttpURLConnection httpConnection =
- getHttpConnection("http://localhost:" + PORT +
"/SoapContext/SoapPort/sayHi");
- httpConnection.connect();
-
- httpConnection.connect();
-
- assertEquals(200, httpConnection.getResponseCode());
-
- assertEquals("text/xml;charset=utf-8",
httpConnection.getContentType().toLowerCase());
- assertEquals("OK", httpConnection.getResponseMessage());
-
- InputStream in = httpConnection.getInputStream();
- assertNotNull(in);
-
- Document doc = StaxUtils.read(in);
- assertNotNull(doc);
-
- Map<String, String> ns = new HashMap<String, String>();
- ns.put("soap", Soap11.SOAP_NAMESPACE);
- ns.put("ns2", "http://apache.org/hello_world_soap_http/types");
- XPathUtils xu = new XPathUtils(ns);
- Node body = (Node) xu.getValue("/soap:Envelope/soap:Body", doc,
XPathConstants.NODE);
- assertNotNull(body);
- String response = (String)
xu.getValue("//ns2:sayHiResponse/ns2:responseType/text()",
- body,
- XPathConstants.STRING);
- assertEquals("Bonjour", response);
- }
@Test
- public void testGetGreetMe() throws Exception {
- HttpURLConnection httpConnection =
- getHttpConnection("http://localhost:" + PORT
- +
"/SoapContext/SoapPort/greetMe/requestType/cxf");
- httpConnection.connect();
-
- assertEquals(200, httpConnection.getResponseCode());
-
- assertEquals("text/xml;charset=utf-8",
httpConnection.getContentType().toLowerCase());
- assertEquals("OK", httpConnection.getResponseMessage());
-
- InputStream in = httpConnection.getInputStream();
- assertNotNull(in);
-
- Document doc = StaxUtils.read(in);
- assertNotNull(doc);
-
- Map<String, String> ns = new HashMap<String, String>();
- ns.put("soap", Soap11.SOAP_NAMESPACE);
- ns.put("ns2", "http://apache.org/hello_world_soap_http/types");
- XPathUtils xu = new XPathUtils(ns);
- Node body = (Node) xu.getValue("/soap:Envelope/soap:Body", doc,
XPathConstants.NODE);
- assertNotNull(body);
- String response = (String)
xu.getValue("//ns2:greetMeResponse/ns2:responseType/text()",
- body,
- XPathConstants.STRING);
- assertEquals("Hello cxf", response);
- }
-
- @Test
public void testGetWSDL() throws Exception {
String url = "http://localhost:" + PORT + "/SoapContext/SoapPort?wsdl";
HttpURLConnection httpConnection = getHttpConnection(url);
@@ -861,37 +795,6 @@ public class ClientServerTest extends Ab
}
@Test
- public void testGetGreetMeFromQuery() throws Exception {
- String url = "http://localhost:" + PORT +
"/SoapContext/SoapPort/greetMe?requestType="
- + URLEncoder.encode("cxf (was CeltixFire)", "UTF-8");
-
- HttpURLConnection httpConnection = getHttpConnection(url);
- httpConnection.connect();
-
- assertEquals(200, httpConnection.getResponseCode());
-
- assertEquals("text/xml;charset=utf-8",
httpConnection.getContentType().toLowerCase());
- assertEquals("OK", httpConnection.getResponseMessage());
-
- InputStream in = httpConnection.getInputStream();
- assertNotNull(in);
-
- Document doc = StaxUtils.read(in);
- assertNotNull(doc);
-
- Map<String, String> ns = new HashMap<String, String>();
- ns.put("soap", Soap11.SOAP_NAMESPACE);
- ns.put("ns2", "http://apache.org/hello_world_soap_http/types");
- XPathUtils xu = new XPathUtils(ns);
- Node body = (Node) xu.getValue("/soap:Envelope/soap:Body", doc,
XPathConstants.NODE);
- assertNotNull(body);
- String response = (String)
xu.getValue("//ns2:greetMeResponse/ns2:responseType/text()",
- body,
- XPathConstants.STRING);
- assertEquals("Hello cxf (was CeltixFire)", response);
- }
-
- @Test
public void testBasicAuth() throws Exception {
Service service = Service.create(serviceName);
service.addPort(fakePortName, "http://schemas.xmlsoap.org/soap/",
Modified:
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java?rev=1556050&r1=1556049&r2=1556050&view=diff
==============================================================================
---
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java
(original)
+++
cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerXMLTest.java
Mon Jan 6 22:09:25 2014
@@ -19,11 +19,8 @@
package org.apache.cxf.systest.jaxws;
-import java.io.InputStream;
import java.lang.reflect.UndeclaredThrowableException;
-import java.net.HttpURLConnection;
import java.net.URL;
-import java.util.HashMap;
import java.util.Map;
import javax.xml.namespace.QName;
@@ -31,13 +28,8 @@ import javax.xml.ws.BindingProvider;
import javax.xml.ws.Holder;
import javax.xml.ws.Service;
import javax.xml.ws.http.HTTPException;
-import javax.xml.xpath.XPathConstants;
-import org.w3c.dom.Document;
-
-import org.apache.cxf.helpers.XPathUtils;
import org.apache.cxf.message.Message;
-import org.apache.cxf.staxutils.StaxUtils;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.headers.HeaderTester;
import org.apache.headers.XMLHeaderService;
@@ -127,31 +119,6 @@ public class ClientServerXMLTest extends
}
@Test
- public void testBareGetGreetMe() throws Exception {
- HttpURLConnection httpConnection =
- getHttpConnection("http://localhost:" + REG_PORT
- + "/XMLService/XMLPort/greetMe/requestType/cxf");
- httpConnection.connect();
-
- assertEquals(200, httpConnection.getResponseCode());
-
- assertEquals("text/xml;charset=utf-8",
httpConnection.getContentType().toLowerCase());
- assertEquals("OK", httpConnection.getResponseMessage());
-
- InputStream in = httpConnection.getInputStream();
- assertNotNull(in);
-
- Document doc = StaxUtils.read(in);
- assertNotNull(doc);
-
- Map<String, String> ns = new HashMap<String, String>();
- ns.put("ns2", "http://apache.org/hello_world_xml_http/bare/types");
- XPathUtils xu = new XPathUtils(ns);
- String response = (String) xu.getValue("//ns2:responseType/text()",
doc, XPathConstants.STRING);
- assertEquals("Hello cxf", response);
- }
-
- @Test
public void testWrapBasicConnection() throws Exception {
org.apache.hello_world_xml_http.wrapped.XMLService service =
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=1556050&r1=1556049&r2=1556050&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
Mon Jan 6 22:09:25 2014
@@ -34,7 +34,6 @@ import org.apache.cxf.jaxws.ServerAsyncR
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
import org.apache.cxf.transport.common.gzip.GZIPInInterceptor;
import org.apache.cxf.transport.common.gzip.GZIPOutInterceptor;
-import org.apache.cxf.wsdl.interceptors.URIMappingInterceptor;
import org.apache.hello_world_soap_http.BaseGreeterImpl;
import org.apache.hello_world_soap_http.DocLitBareGreeterImpl;
import org.apache.hello_world_soap_http.GreeterImpl;
@@ -47,7 +46,6 @@ public class Server extends AbstractBusT
List<Endpoint> eps = new LinkedList<Endpoint>();
- @SuppressWarnings("deprecation")
protected void run() {
URL url = getClass().getResource("fault-stack-trace.xml");
if (url != null) {
@@ -71,7 +69,6 @@ public class Server extends AbstractBusT
implementor = new GreeterImpl();
address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
Endpoint ep = Endpoint.publish(address, implementor);
- ((EndpointImpl)ep).getService().getInInterceptors().add(new
URIMappingInterceptor());
eps.add(ep);
implementor = new GreeterImpl();
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=1556050&r1=1556049&r2=1556050&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
Mon Jan 6 22:09:25 2014
@@ -26,14 +26,11 @@ import javax.xml.ws.Endpoint;
import org.apache.cxf.frontend.WSDLGetUtils;
import org.apache.cxf.greeter_control.GreeterImplNoWsdl;
-import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-import org.apache.cxf.wsdl.interceptors.URIMappingInterceptor;
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";
@@ -42,7 +39,6 @@ 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=1556050&r1=1556049&r2=1556050&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
Mon Jan 6 22:09:25 2014
@@ -37,7 +37,6 @@ import org.apache.cxf.service.invoker.Po
import org.apache.cxf.service.model.MessagePartInfo;
import org.apache.cxf.systest.jaxws.cxf5064.SOAPHeaderServiceImpl;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-import org.apache.cxf.wsdl.interceptors.URIMappingInterceptor;
import org.apache.cxf.wsdl.service.factory.AbstractServiceConfiguration;
@@ -74,10 +73,7 @@ public class ServerMisc extends Abstract
endpoints.clear();
}
-
- @SuppressWarnings("deprecation")
protected void run() {
-
Factory factory = new
PerRequestFactory(DocLitWrappedCodeFirstServiceImpl.class);
factory = new PooledFactory(factory, 4);
@@ -111,7 +107,6 @@ 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());
endpoints.add(ep);
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=1556050&r1=1556049&r2=1556050&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
Mon Jan 6 22:09:25 2014
@@ -24,9 +24,7 @@ import java.util.List;
import javax.xml.ws.Endpoint;
-import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-import org.apache.cxf.wsdl.interceptors.URIMappingInterceptor;
import org.apache.headers.HeaderTesterImpl;
import org.apache.hello_world_xml_http.bare.GreeterImpl;
import org.apache.hello_world_xml_http.wrapped.GreeterFaultImpl;
@@ -39,14 +37,11 @@ public class ServerXMLBinding extends Ab
List<Endpoint> eps = new LinkedList<Endpoint>();
- @SuppressWarnings("deprecation")
protected void run() {
Object implementor = new GreeterImpl();
String address = "http://localhost:" + REG_PORT +
"/XMLService/XMLPort";
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";
eps.add(Endpoint.publish(address, implementor1));
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=1556050&r1=1556049&r2=1556050&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
Mon Jan 6 22:09:25 2014
@@ -21,9 +21,7 @@ package org.apache.cxf.systest.soap12;
import javax.xml.ws.Endpoint;
-import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-import org.apache.cxf.wsdl.interceptors.URIMappingInterceptor;
public class Server extends AbstractBusTestServerBase {
public static final String PORT = allocatePort(Server.class);
@@ -31,13 +29,10 @@ public class Server extends AbstractBusT
Endpoint ep;
Endpoint ep11;
- @SuppressWarnings("deprecation")
protected void run() {
Object implementor = new GreeterImpl();
String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
ep = Endpoint.publish(address, implementor);
- EndpointImpl epi = (EndpointImpl)ep;
- epi.getService().getInInterceptors().add(new URIMappingInterceptor());
implementor = new org.apache.hello_world_soap_http.GreeterImpl();
address = "http://localhost:" + PORT + "/SoapContext/Soap11Port";
Modified:
cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java?rev=1556050&r1=1556049&r2=1556050&view=diff
==============================================================================
---
cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java
(original)
+++
cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java
Mon Jan 6 22:09:25 2014
@@ -36,7 +36,6 @@ import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.apache.cxf.binding.soap.Soap11;
-import org.apache.cxf.binding.soap.Soap12;
import org.apache.cxf.helpers.IOUtils;
import org.apache.cxf.helpers.XPathUtils;
import org.apache.cxf.staxutils.StaxUtils;
@@ -86,103 +85,6 @@ public class Soap12ClientServerTest exte
}
@Test
- public void testGetSayHi() throws Exception {
- HttpURLConnection httpConnection =
- getHttpConnection("http://localhost:" + PORT +
"/SoapContext/SoapPort/sayHi");
- httpConnection.connect();
-
- InputStream in = httpConnection.getInputStream();
- assertNotNull(in);
- assertEquals("application/soap+xml; charset=utf-8",
httpConnection.getContentType().toLowerCase());
-
- Document doc = StaxUtils.read(in);
- assertNotNull(doc);
- Map<String, String> ns = new HashMap<String, String>();
- ns.put("soap12", Soap12.SOAP_NAMESPACE);
- ns.put("ns2", "http://apache.org/hello_world_soap12_http/types");
- XPathUtils xu = new XPathUtils(ns);
- Node body = (Node) xu.getValue("/soap12:Envelope/soap12:Body", doc,
XPathConstants.NODE);
- assertNotNull(body);
- String response = (String)
xu.getValue("//ns2:sayHiResponse/ns2:responseType/text()",
- body,
- XPathConstants.STRING);
- assertEquals("Bonjour", response);
- }
-
- @Test
- public void testGetPingMe() throws Exception {
- HttpURLConnection httpConnection =
- getHttpConnection("http://localhost:" + PORT +
"/SoapContext/SoapPort/pingMe");
- httpConnection.connect();
-
- assertEquals(500, httpConnection.getResponseCode());
-
- assertEquals("Server Error", httpConnection.getResponseMessage());
-
- InputStream in = httpConnection.getErrorStream();
- assertNotNull(in);
- assertEquals("application/soap+xml; charset=utf-8",
httpConnection.getContentType().toLowerCase());
-
- Document doc = StaxUtils.read(in);
- assertNotNull(doc);
-
- Map<String, String> ns = new HashMap<String, String>();
- ns.put("s", Soap12.SOAP_NAMESPACE);
- ns.put("ns2", "http://apache.org/hello_world_soap12_http/types");
- XPathUtils xu = new XPathUtils(ns);
- String codeValue = (String)
xu.getValue("/s:Envelope/s:Body/s:Fault/s:Code/s:Value/text()",
- doc,
- XPathConstants.STRING);
-
- assertEquals("soap:Receiver", codeValue);
- String reason = (String) xu.getValue("//s:Reason//text()",
- doc,
- XPathConstants.STRING);
- assertEquals("PingMeFault raised by server", reason);
-
- String minor = (String)
xu.getValue("//s:Detail//ns2:faultDetail/ns2:minor/text()",
- doc,
- XPathConstants.STRING);
- assertEquals("1", minor);
- String major = (String)
xu.getValue("//s:Detail//ns2:faultDetail/ns2:major/text()",
- doc,
- XPathConstants.STRING);
- assertEquals("2", major);
- }
-
- @Test
- public void testGetMethodNotExist() throws Exception {
- HttpURLConnection httpConnection =
- getHttpConnection("http://localhost:" + PORT +
"/SoapContext/SoapPort/greetMe");
- httpConnection.connect();
-
- assertEquals(500, httpConnection.getResponseCode());
-
- assertEquals("application/soap+xml; charset=utf-8",
httpConnection.getContentType().toLowerCase());
-
- assertEquals("Server Error", httpConnection.getResponseMessage());
-
- InputStream in = httpConnection.getErrorStream();
- assertNotNull(in);
-
- Document doc = StaxUtils.read(in);
- assertNotNull(doc);
- Map<String, String> ns = new HashMap<String, String>();
- ns.put("s", Soap12.SOAP_NAMESPACE);
- ns.put("ns2", "http://apache.org/hello_world_soap12_http/types");
- XPathUtils xu = new XPathUtils(ns);
- String codeValue = (String)
xu.getValue("/s:Envelope/s:Body/s:Fault/s:Code/s:Value/text()",
- doc,
- XPathConstants.STRING);
-
- assertEquals("soap:Receiver", codeValue);
- String reason = (String) xu.getValue("//s:Reason//text()",
- doc,
- XPathConstants.STRING);
- assertTrue(reason.contains("No such operation: greetMe"));
- }
-
- @Test
public void testSayHiSoap12ToSoap11() throws Exception {
HttpURLConnection httpConnection =
getHttpConnection("http://localhost:" + PORT +
"/SoapContext/Soap11Port/sayHi");