Author: dkulp
Date: Tue Sep 1 20:41:29 2009
New Revision: 810224
URL: http://svn.apache.org/viewvc?rev=810224&view=rev
Log:
Get most of tests passing again. Remove tests testing 2.3 things
Added:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml
(with props)
Removed:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDEng.java
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDSales.java
Modified:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jms/Server.java
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/JarResolverTest.java
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml
Modified:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=810224&r1=810223&r2=810224&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
Tue Sep 1 20:41:29 2009
@@ -78,91 +78,6 @@
}
@Test
- public void testWSDLDocs() throws Exception {
- Map<String, String> ns = new HashMap<String, String>();
- ns.put("wsdl", WSDLConstants.NS_WSDL11);
- XPathUtils xpu = new XPathUtils(ns);
- Document wsdl =
XMLUtils.parse(this.getHttpConnection(ServerMisc.DOCLIT_CODEFIRST_URL + "?wsdl")
- .getInputStream());
- //XMLUtils.printDOM(wsdl.getDocumentElement());
- assertEquals("DocLitWrappedCodeFirstService impl",
-
xpu.getValue("/wsdl:definitions/wsdl:service/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("DocLitWrappedCodeFirstService interface",
-
xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("DocLitWrappedCodeFirstService top level doc",
- xpu.getValue("/wsdl:definitions/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("DocLitWrappedCodeFirstService binding doc",
-
xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("DocLitWrappedCodeFirstService service/port doc",
-
xpu.getValue("/wsdl:definitions/wsdl:service/wsdl:port/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("multiInOut doc",
-
xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:operati...@name='multiInOut']"
- + "/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("multiInOut Input doc",
-
xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:operati...@name='multiInOut']"
- + "/wsdl:input/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("multiInOut Output doc",
-
xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:operati...@name='multiInOut']"
- + "/wsdl:output/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("multiInOut InputMessage doc",
-
xpu.getValue("/wsdl:definitions/wsdl:messa...@name='multiInOut']"
- + "/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("multiInOut OutputMessage doc",
-
xpu.getValue("/wsdl:definitions/wsdl:messa...@name='multiInOutResponse']"
- + "/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("multiInOut binding doc",
-
xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:operati...@name='multiInOut']"
- + "/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("multiInOut binding Input doc",
-
xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:operati...@name='multiInOut']"
- + "/wsdl:input/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("multiInOut binding Output doc",
-
xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:operati...@name='multiInOut']"
- + "/wsdl:output/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("fault binding doc",
-
xpu.getValue("/wsdl:definitions/wsdl:binding/wsdl:operati...@name='throwException']"
- + "/wsdl:fault/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("fault porttype doc",
-
xpu.getValue("/wsdl:definitions/wsdl:portType/wsdl:operati...@name='throwException']"
- + "/wsdl:fault/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- assertEquals("fault message doc",
-
xpu.getValue("/wsdl:definitions/wsdl:messa...@name='CustomException']"
- + "/wsdl:documentation",
- wsdl.getDocumentElement(),
- XPathConstants.STRING));
- }
-
- @Test
public void testDocLitBare() throws Exception {
QName portName = new
QName("http://cxf.apache.org/systest/jaxws/DocLitBareCodeFirstService",
"DocLitBareCodeFirstServicePort");
Modified:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jms/Server.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jms/Server.java?rev=810224&r1=810223&r2=810224&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jms/Server.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jms/Server.java
Tue Sep 1 20:41:29 2009
@@ -42,8 +42,6 @@
Object i4 = new
GreeterImplTwoWayJMSRuntimeCorrelationIDDynamicPrefix();
Object i5 = new
GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixEng();
Object i6 = new
GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixSales();
- Object i7 = new GreeterImplTwoWayJMSAppCorrelationIDEng();
- Object i8 = new GreeterImplTwoWayJMSAppCorrelationIDSales();
Object mtom = new JMSMTOMImpl();
Endpoint.publish(null, impleDoc);
@@ -60,8 +58,6 @@
Endpoint.publish("", i4);
Endpoint.publish("", i5);
Endpoint.publish("", i6);
- Endpoint.publish("", i7);
- Endpoint.publish("", i8);
EndpointImpl ep =
(EndpointImpl)Endpoint.publish("http://cxf.apache.org/transports/jms", mtom);
Binding binding = ep.getBinding();
((SOAPBinding)binding).setMTOMEnabled(true);
Modified:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java?rev=810224&r1=810223&r2=810224&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/outofband/header/OOBHeaderTest.java
Tue Sep 1 20:41:29 2009
@@ -183,7 +183,7 @@
priceData.setTickerPrice(1.0f);
priceData.setTickerSymbol("CELTIX");
- assertFalse(check(0, putLastTradedPrice, false, true, priceData));
+ assertTrue(check(0, putLastTradedPrice, false, true, priceData));
assertFalse(check(1, putLastTradedPrice, false, true, priceData));
assertTrue(check(2, putLastTradedPrice, false, true, priceData));
Modified:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/JarResolverTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/JarResolverTest.java?rev=810224&r1=810223&r2=810224&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/JarResolverTest.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/JarResolverTest.java
Tue Sep 1 20:41:29 2009
@@ -52,6 +52,7 @@
ServiceContractResolverRegistryImpl registry =
new ServiceContractResolverRegistryImpl();
registry.setBus(bus);
+ registry.init();
assertNotNull(bus.getExtension(ServiceContractResolverRegistry.class));
JarServiceContractResolver resolver = new JarServiceContractResolver();
Modified:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java?rev=810224&r1=810223&r2=810224&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationClientServerTest.java
Tue Sep 1 20:41:29 2009
@@ -24,10 +24,8 @@
import java.util.List;
import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
import javax.xml.ws.WebServiceException;
-import org.apache.cxf.message.Message;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.schema_validation.SchemaValidation;
import org.apache.schema_validation.SchemaValidationService;
@@ -45,7 +43,12 @@
@BeforeClass
public static void startservers() throws Exception {
- assertTrue("server did not launch correctly",
launchServer(ValidationServer.class, true));
+ // set up configuration to enable schema validation
+ URL url =
ValidationClientServerTest.class.getResource("cxf-config.xml");
+ assertNotNull("cannot find test resource", url);
+ defaultConfigFileName = url.toString();
+
+ assertTrue("server did not launch correctly",
launchServer(ValidationServer.class));
}
// TODO : Change this test so that we test the combinations of
@@ -53,6 +56,7 @@
// Only tests client side validation enabled/server side disabled.
@Test
public void testSchemaValidation() throws Exception {
+ System.setProperty("cxf.config.file.url",
getClass().getResource("cxf-config.xml").toString());
URL wsdl = getClass().getResource("/wsdl/schema_validation.wsdl");
assertNotNull(wsdl);
@@ -60,8 +64,6 @@
assertNotNull(service);
SchemaValidation validation = service.getPort(portName,
SchemaValidation.class);
- ((BindingProvider)validation).getRequestContext()
- .put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.TRUE);
ComplexStruct complexStruct = new ComplexStruct();
complexStruct.setElem1("one");
@@ -72,7 +74,7 @@
try {
/*boolean result =*/
validation.setComplexStruct(complexStruct);
- fail("Set ComplexStruct should have thrown ProtocolException");
+ fail("Set ComplexStruct hould have thrown ProtocolException");
} catch (WebServiceException e) {
String expected =
"'{\"http://apache.org/schema_validation/types\":elem2}' is expected.";
assertTrue(e.getMessage(), e.getMessage().indexOf(expected) != -1);
@@ -88,13 +90,11 @@
try {
/*boolean result =*/
validation.setOccuringStruct(occuringStruct);
- fail("Set OccuringStruct should have thrown ProtocolException");
+ fail("Set OccuringStruct hould have thrown ProtocolException");
} catch (WebServiceException e) {
String expected =
"'{\"http://apache.org/schema_validation/types\":varFloat}' is expected.";
assertTrue(e.getMessage().indexOf(expected) != -1);
}
- ((BindingProvider)validation).getRequestContext()
- .put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.FALSE);
try {
// The server will attempt to return an invalid ComplexStruct
@@ -109,8 +109,6 @@
e.getMessage().indexOf(expected) != -1);
}
- ((BindingProvider)validation).getRequestContext()
- .put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.TRUE);
try {
// The server will attempt to return an invalid OccuringStruct
// When validation is disabled on the server side, we'll get the
Modified:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java?rev=810224&r1=810223&r2=810224&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/ValidationServer.java
Tue Sep 1 20:41:29 2009
@@ -19,6 +19,7 @@
package org.apache.cxf.systest.schema_validation;
+import java.net.URL;
import javax.xml.ws.Endpoint;
@@ -26,7 +27,14 @@
public class ValidationServer extends AbstractBusTestServerBase {
+ private String oldConfig;
+
public ValidationServer() {
+ oldConfig = System.getProperty("cxf.config.file.url");
+ URL url = getClass().getResource("cxf-config.xml");
+ if (url != null) {
+ System.setProperty("cxf.config.file.url", url.toString());
+ }
}
protected void run() {
@@ -35,7 +43,12 @@
Endpoint.publish(address, implementor);
}
-
+ public boolean stopInProcess() throws Exception {
+ if (oldConfig != null) {
+ System.setProperty("cxf.config.file.url", oldConfig);
+ }
+ return super.stopInProcess();
+ }
public static void main(String[] args) {
try {
Added:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml?rev=810224&view=auto
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml
(added)
+++
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml
Tue Sep 1 20:41:29 2009
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+ <jaxws:endpoint name="{http://apache.org/schema_validation}SoapPort"
createdFromAPI="true">
+ <jaxws:properties>
+ <entry key="schema-validation-enabled" value="true" />
+ </jaxws:properties>
+ </jaxws:endpoint>
+
+ <bean name="{http://apache.org/schema_validation}SchemaValidationService"
abstract="true">
+ <property name="properties">
+ <map>
+ <entry key="schema-validation-enabled" value="true" />
+ </map>
+ </property>
+ </bean>
+
+</beans>
Propchange:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/cxf-config.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml?rev=810224&r1=810223&r2=810224&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml
(original)
+++
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/xmlbeans/cxf.xml
Tue Sep 1 20:41:29 2009
@@ -33,9 +33,9 @@
<!-- jaxws:properties>
<entry key="schema-validation-enabled" value="true" />
</jaxws:properties-->
- <!-- jaxws:dataBinding>
+ <jaxws:dataBinding>
<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding"/>
- </jaxws:dataBinding-->
+ </jaxws:dataBinding>
</jaxws:client>
<jaxws:endpoint
name="{http://apache.org/hello_world_soap_http/xmlbeans}SoapPort"
@@ -44,9 +44,9 @@
<jaxws:properties>
<entry key="schema-validation-enabled" value="true" />
</jaxws:properties>
- <!-- jaxws:dataBinding>
+ <jaxws:dataBinding>
<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding"/>
- </jaxws:dataBinding-->
+ </jaxws:dataBinding>
</jaxws:endpoint>
</beans>
Modified:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml?rev=810224&r1=810223&r2=810224&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml
(original)
+++
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/xmlbeans/cxf_no_wsdl.xml
Tue Sep 1 20:41:29 2009
@@ -33,9 +33,9 @@
<!-- jaxws:properties>
<entry key="schema-validation-enabled" value="true" />
</jaxws:properties-->
- <!-- jaxws:dataBinding>
+ <jaxws:dataBinding>
<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding"/>
- </jaxws:dataBinding-->
+ </jaxws:dataBinding>
</jaxws:client>
<jaxws:endpoint
name="{http://apache.org/hello_world_soap_http/xmlbeans}SoapPort"
@@ -43,9 +43,9 @@
<jaxws:properties>
<entry key="schema-validation-enabled" value="true" />
</jaxws:properties>
- <!-- jaxws:dataBinding>
+ <jaxws:dataBinding>
<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding"/>
- </jaxws:dataBinding-->
+ </jaxws:dataBinding>
</jaxws:endpoint>
</beans>