Author: dkulp
Date: Tue Sep 1 19:59:26 2009
New Revision: 810203
URL: http://svn.apache.org/viewvc?rev=810203&view=rev
Log:
Add least get 2.2.x compiling now by removing the tests that only test 2.3.x
stuff. Tests are failing, but compiling is a good start
Removed:
cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/sdo/
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/jms/testsuite/
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jms/GreeterSpecImpl.java
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jms/GreeterSpecWithPortError.java
cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/security/SecurityPolicyTest.java
cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssc/
cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec10/
cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/wssec11/
cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/resources/wsdl_systest_wsspec/DoubleIt.wsdl
cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/resources/wsdl_systest_wsspec/wssc/
cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/resources/wsdl_systest_wsspec/wssec10/
cxf/branches/2.2.x-fixes/systests/ws-specs/src/test/resources/wsdl_systest_wsspec/wssec11/
Modified:
cxf/branches/2.2.x-fixes/systests/jaxrs/pom.xml
cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSDataBindingTest.java
cxf/branches/2.2.x-fixes/systests/uncategorized/pom.xml
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.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/schema_validation/SchemaValidationImpl.java
cxf/branches/2.2.x-fixes/systests/ws-specs/pom.xml
Modified: cxf/branches/2.2.x-fixes/systests/jaxrs/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/pom.xml?rev=810203&r1=810202&r2=810203&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxrs/pom.xml (original)
+++ cxf/branches/2.2.x-fixes/systests/jaxrs/pom.xml Tue Sep 1 19:59:26 2009
@@ -220,12 +220,6 @@
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-databinding-sdo</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-testsupport</artifactId>
<version>${project.version}</version>
<scope>test</scope>
Modified:
cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSDataBindingTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSDataBindingTest.java?rev=810203&r1=810202&r2=810203&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSDataBindingTest.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSDataBindingTest.java
Tue Sep 1 19:59:26 2009
@@ -19,20 +19,10 @@
package org.apache.cxf.systest.jaxrs;
-import java.util.ArrayList;
import java.util.Collections;
-import java.util.List;
-import org.apache.cxf.databinding.DataBinding;
-import org.apache.cxf.interceptor.Interceptor;
-import org.apache.cxf.interceptor.LoggingInInterceptor;
-import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
import org.apache.cxf.jaxrs.client.WebClient;
import org.apache.cxf.jaxrs.provider.AegisElementProvider;
-import org.apache.cxf.jaxrs.provider.DataBindingJSONProvider;
-import org.apache.cxf.sdo.SDODataBinding;
-import org.apache.cxf.systest.jaxrs.sdo.SDOResource;
-import org.apache.cxf.systest.jaxrs.sdo.Structure;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.junit.BeforeClass;
@@ -64,39 +54,5 @@
assertEquals("CXF in Action", book.getName());
}
- @Test
- public void testSDOStructure() throws Exception {
- JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
- bean.setDataBinding(new SDODataBinding());
- bean.setAddress("http://localhost:9080/databinding/sdo");
- bean.setResourceClass(SDOResource.class);
- SDOResource client = bean.create(SDOResource.class);
- Structure struct = client.getStructure();
- assertEquals("sdo", struct.getText());
- assertEquals(123.5, struct.getDbl(), 0.01);
- assertEquals(3, struct.getInt());
- }
-
- @Test
- public void testSDOStructureJSON() throws Exception {
- JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
- DataBinding db = new SDODataBinding();
- bean.setDataBinding(db);
- DataBindingJSONProvider provider = new DataBindingJSONProvider();
-
provider.setNamespaceMap(Collections.singletonMap("http://apache.org/structure/types",
"p0"));
- provider.setDataBinding(db);
- bean.setProvider(provider);
- bean.setAddress("http://localhost:9080/databinding/sdo");
- bean.setResourceClass(SDOResource.class);
- List<Interceptor> list = new ArrayList<Interceptor>();
- list.add(new LoggingInInterceptor());
- bean.setInInterceptors(list);
- SDOResource client = bean.create(SDOResource.class);
- WebClient.client(client).accept("application/json");
- Structure struct = client.getStructure();
- assertEquals("sdo", struct.getText());
- assertEquals(123.5, struct.getDbl(), 0.01);
- assertEquals(3, struct.getInt());
- }
}
Modified: cxf/branches/2.2.x-fixes/systests/uncategorized/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/pom.xml?rev=810203&r1=810202&r2=810203&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/uncategorized/pom.xml (original)
+++ cxf/branches/2.2.x-fixes/systests/uncategorized/pom.xml Tue Sep 1 19:59:26
2009
@@ -464,13 +464,6 @@
<dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-databinding-sdo</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-acl</artifactId>
<version>2.0.4</version>
Modified:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java?rev=810203&r1=810202&r2=810203&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
Tue Sep 1 19:59:26 2009
@@ -38,10 +38,6 @@
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
-import org.apache.cxf.annotations.FastInfoset;
-import org.apache.cxf.annotations.GZIP;
-import org.apache.cxf.annotations.WSDLDocumentation;
-import org.apache.cxf.annotations.WSDLDocumentationCollection;
import org.apache.cxf.message.Exchange;
import org.apache.cxf.systest.jaxws.types.Bar;
@@ -49,19 +45,6 @@
targetNamespace =
"http://cxf.apache.org/systest/jaxws/DocLitWrappedCodeFirstService")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT,
use = SOAPBinding.Use.LITERAL)
-...@wsdldocumentationcollection(
- {
- @WSDLDocumentation("DocLitWrappedCodeFirstService interface"),
- @WSDLDocumentation(value = "DocLitWrappedCodeFirstService top level
doc",
- placement = WSDLDocumentation.Placement.TOP),
- @WSDLDocumentation(value = "DocLitWrappedCodeFirstService binding
doc",
- placement = WSDLDocumentation.Placement.BINDING),
- @WSDLDocumentation(value = "DocLitWrappedCodeFirstService service/port
doc",
- placement =
WSDLDocumentation.Placement.SERVICE_PORT)
- }
-)
-...@gzip
-...@fastinfoset
public interface DocLitWrappedCodeFirstService {
@Oneway
@@ -92,25 +75,6 @@
String multiListInput(List<String> inputs1, List<String> inputs2, String
x, int y);
@WebMethod
- @WSDLDocumentationCollection(
- {
- @WSDLDocumentation("multiInOut doc"),
- @WSDLDocumentation(value = "multiInOut Input doc",
- placement =
WSDLDocumentation.Placement.PORT_TYPE_OPERATION_INPUT),
- @WSDLDocumentation(value = "multiInOut Output doc",
- placement =
WSDLDocumentation.Placement.PORT_TYPE_OPERATION_OUTPUT),
- @WSDLDocumentation(value = "multiInOut InputMessage doc",
- placement =
WSDLDocumentation.Placement.INPUT_MESSAGE),
- @WSDLDocumentation(value = "multiInOut OutputMessage doc",
- placement =
WSDLDocumentation.Placement.OUTPUT_MESSAGE),
- @WSDLDocumentation(value = "multiInOut binding doc",
- placement =
WSDLDocumentation.Placement.BINDING_OPERATION),
- @WSDLDocumentation(value = "multiInOut binding Input doc",
- placement =
WSDLDocumentation.Placement.BINDING_OPERATION_INPUT),
- @WSDLDocumentation(value = "multiInOut binding Output doc",
- placement =
WSDLDocumentation.Placement.BINDING_OPERATION_OUTPUT)
- }
- )
String multiInOut(@WebParam(mode = WebParam.Mode.OUT)
Holder<String> a,
@WebParam(mode = WebParam.Mode.INOUT)
@@ -142,18 +106,6 @@
@WebParam(mode = WebParam.Mode.OUT) Holder<String> out2);
@WebMethod
- @WSDLDocumentationCollection({
- @WSDLDocumentation(value = "fault message doc",
- placement =
WSDLDocumentation.Placement.FAULT_MESSAGE,
- faultClass = CustomException.class),
- @WSDLDocumentation(value = "fault binding doc",
- placement =
WSDLDocumentation.Placement.BINDING_OPERATION_FAULT,
- faultClass = CustomException.class),
- @WSDLDocumentation(value = "fault porttype doc",
- placement =
WSDLDocumentation.Placement.PORT_TYPE_OPERATION_FAULT,
- faultClass = CustomException.class)
- }
- )
int throwException(int i)
throws ServiceTestFault,
CustomException,
Modified:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java?rev=810203&r1=810202&r2=810203&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
Tue Sep 1 19:59:26 2009
@@ -29,9 +29,6 @@
import javax.xml.ws.Holder;
import javax.xml.ws.WebServiceContext;
-import org.apache.cxf.annotations.FastInfoset;
-import org.apache.cxf.annotations.GZIP;
-import org.apache.cxf.annotations.WSDLDocumentation;
import org.apache.cxf.message.Exchange;
import org.apache.cxf.systest.jaxws.DocLitWrappedCodeFirstService.Foo;
import org.apache.cxf.systest.jaxws.types.Bar;
@@ -41,9 +38,6 @@
serviceName = "DocLitWrappedCodeFirstService",
portName = "DocLitWrappedCodeFirstServicePort",
targetNamespace =
"http://cxf.apache.org/systest/jaxws/DocLitWrappedCodeFirstService")
-...@wsdldocumentation("DocLitWrappedCodeFirstService impl")
-...@gzip(threshold = 10)
-...@fastinfoset(force = true)
public class DocLitWrappedCodeFirstServiceImpl implements
DocLitWrappedCodeFirstService {
public static final String DATA[] = new String[] {"string1", "string2",
"string3"};
Modified:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java?rev=810203&r1=810202&r2=810203&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
Tue Sep 1 19:59:26 2009
@@ -18,23 +18,21 @@
*/
package org.apache.cxf.systest.jms;
-import java.lang.Thread.State;
import java.lang.reflect.UndeclaredThrowableException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
+import java.util.UUID;
import javax.activation.DataHandler;
-import javax.jms.DeliveryMode;
import javax.xml.namespace.QName;
import javax.xml.ws.Binding;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Endpoint;
import javax.xml.ws.Holder;
import javax.xml.ws.soap.SOAPBinding;
-import javax.xml.ws.soap.SOAPFaultException;
import org.apache.cxf.endpoint.Client;
@@ -48,21 +46,15 @@
import org.apache.cxf.hello_world_jms.HelloWorldPubSubService;
import org.apache.cxf.hello_world_jms.HelloWorldQueueDecoupledOneWaysService;
import org.apache.cxf.hello_world_jms.HelloWorldService;
-import org.apache.cxf.hello_world_jms.HelloWorldServiceAppCorrelationID;
import
org.apache.cxf.hello_world_jms.HelloWorldServiceAppCorrelationIDNoPrefix;
import
org.apache.cxf.hello_world_jms.HelloWorldServiceAppCorrelationIDStaticPrefix;
import
org.apache.cxf.hello_world_jms.HelloWorldServiceRuntimeCorrelationIDDynamicPrefix;
import
org.apache.cxf.hello_world_jms.HelloWorldServiceRuntimeCorrelationIDStaticPrefix;
import org.apache.cxf.hello_world_jms.NoSuchCodeLitFault;
import org.apache.cxf.helpers.IOUtils;
-import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
-import org.apache.cxf.jms_greeter.JMSGreeterPortType;
-import org.apache.cxf.jms_greeter.JMSGreeterService;
-import org.apache.cxf.jms_greeter.JMSGreeterService2;
import org.apache.cxf.jms_mtom.JMSMTOMPortType;
import org.apache.cxf.jms_mtom.JMSMTOMService;
import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.systest.jaxws.Hello;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.transport.jms.AddressType;
import org.apache.cxf.transport.jms.JMSConduit;
@@ -70,7 +62,6 @@
import org.apache.cxf.transport.jms.JMSMessageHeadersType;
import org.apache.cxf.transport.jms.JMSNamingPropertyType;
import org.apache.cxf.transport.jms.JMSPropertyType;
-import org.apache.cxf.transport.jms.spec.JMSSpecConstants;
import org.apache.hello_world_doc_lit.Greeter;
import org.apache.hello_world_doc_lit.PingMeFault;
import org.apache.hello_world_doc_lit.SOAPService2;
@@ -587,21 +578,20 @@
}
}
}
-
@Test
- public void testTwoWayQueueAppCorrelationID() throws Exception {
+ public void testTwoWayQueueAppCorrelationIDStaticPrefix() throws Exception
{
QName serviceName = getServiceName(new
QName("http://cxf.apache.org/hello_world_jms",
- "HelloWorldServiceAppCorrelationID"));
+
"HelloWorldServiceAppCorrelationIDStaticPrefix"));
QName portNameEng = getPortName(new
QName("http://cxf.apache.org/hello_world_jms",
-
"HelloWorldPortAppCorrelationIDEng"));
+
"HelloWorldPortAppCorrelationIDStaticPrefixEng"));
QName portNameSales = getPortName(new
QName("http://cxf.apache.org/hello_world_jms",
-
"HelloWorldPortAppCorrelationIDSales"));
+
"HelloWorldPortAppCorrelationIDStaticPrefixSales"));
URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
assertNotNull(wsdl);
- HelloWorldServiceAppCorrelationID service =
- new HelloWorldServiceAppCorrelationID(wsdl, serviceName);
+ HelloWorldServiceAppCorrelationIDStaticPrefix service =
+ new HelloWorldServiceAppCorrelationIDStaticPrefix(wsdl,
serviceName);
assertNotNull(service);
ClientRunnable engClient =
@@ -629,53 +619,7 @@
}
for (Thread t : threads) {
- t.join(5000);
- }
-
- Throwable e = (engClient.getException() != null)
- ? engClient.getException()
- : (salesClient.getException() != null)
- ? salesClient.getException() : null;
-
- if (e != null) {
- StringBuffer message = new StringBuffer();
- for (StackTraceElement ste : e.getStackTrace()) {
- message.append(ste.toString() +
System.getProperty("line.separator"));
- }
- fail(message.toString());
- }
- }
-
- @Test
- public void testTwoWayQueueAppCorrelationIDStaticPrefix() throws Exception
{
- QName serviceName = getServiceName(new
QName("http://cxf.apache.org/hello_world_jms",
-
"HelloWorldServiceAppCorrelationIDStaticPrefix"));
- QName portNameEng = getPortName(new
QName("http://cxf.apache.org/hello_world_jms",
-
"HelloWorldPortAppCorrelationIDStaticPrefixEng"));
- QName portNameSales = getPortName(new
QName("http://cxf.apache.org/hello_world_jms",
-
"HelloWorldPortAppCorrelationIDStaticPrefixSales"));
-
- URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
- assertNotNull(wsdl);
-
- HelloWorldServiceAppCorrelationIDStaticPrefix service =
- new HelloWorldServiceAppCorrelationIDStaticPrefix(wsdl,
serviceName);
- assertNotNull(service);
-
- ClientRunnable engClient =
- new ClientRunnable(service.getPort(portNameEng,
HelloWorldPortType.class));
-
- ClientRunnable salesClient =
- new ClientRunnable(service.getPort(portNameSales,
HelloWorldPortType.class));
-
- Thread[] threads = new Thread[] {new Thread(engClient), new
Thread(salesClient)};
-
- for (Thread t : threads) {
- t.start();
- }
-
- for (Thread t : threads) {
- t.join(1000);
+ t.join(10000);
}
Throwable e = (engClient.getException() != null)
@@ -718,26 +662,39 @@
HelloWorldPortType port = service.getPort(portName,
HelloWorldPortType.class);
- for (int i = 0; i < 1; ++i) {
- ClientRunnable client = new ClientRunnable(port);
+ for (int i = 0; i < 10; ++i) {
+ ClientRunnable client =
+ new ClientRunnable(port,
+ new CorrelationIDFactory() {
+ public String createCorrealtionID() {
+ return UUID.randomUUID().toString();
+ }
+ });
+
Thread thread = new Thread(client);
threads.add(thread);
clients.add(client);
thread.start();
}
- for (Thread t : threads) {
- t.join(5000);
- assertTrue("Not terminated state: " + t.getState(), t.getState()
== State.TERMINATED);
- }
-
- for (ClientRunnable client : clients) {
- if (client.getException() != null
- && client.getException().getMessage().contains("Timeout")) {
- fail(client.getException().getMessage());
+ //Sleep for up to 10 seconds. The timeout should be at 5 seconds so
this
+ //should bail earlier
+ for (int x = 0; x < 10; x++) {
+ Thread.sleep(1000);
+
+ for (ClientRunnable client : clients) {
+ if (client.getException() != null
+ && client.getException().getMessage().contains("Timeout"))
{
+ // exceptions expected
+ return;
+ }
}
}
+ fail("This is a negative pass. If this test passed this means that the
missing QoS"
+ + " has been added to the runtime or an unexpected exception
received. "
+ + " If latter is true, then read method comments for details on
missing QoS"
+ + " and change this test to fail on exception");
}
/*
@@ -789,7 +746,7 @@
HelloWorldPortType portEng = service.getPort(portNameEng,
HelloWorldPortType.class);
HelloWorldPortType portSales = service.getPort(portNameSales,
HelloWorldPortType.class);
- for (int i = 0; i < 10; ++i) {
+ for (int i = 0; i < 5; ++i) {
ClientRunnable client = new ClientRunnable(portEng,
"com.mycompany.eng:");
Thread thread = new Thread(client);
threads.add(thread);
@@ -801,11 +758,12 @@
clients.add(client);
thread.start();
}
-
+
for (Thread t : threads) {
- t.join(1000);
+ t.join(10000);
}
+
for (ClientRunnable client : clients) {
if (client.getException() != null
&& client.getException().getMessage().contains("Timeout")) {
@@ -835,7 +793,8 @@
HelloWorldPortType port = service.getPort(portName,
HelloWorldPortType.class);
for (int i = 0; i < 10; ++i) {
- ClientRunnable client = new ClientRunnable(port);
+ ClientRunnable client =
+ new ClientRunnable(port);
Thread thread = new Thread(client);
threads.add(thread);
@@ -844,7 +803,7 @@
}
for (Thread t : threads) {
- t.join(1000);
+ t.join(10000);
}
for (ClientRunnable client : clients) {
@@ -937,146 +896,4 @@
byte bytes[] =
IOUtils.readBytesFromStream(handler1.value.getInputStream());
assertEquals("The response file is not same with the sent file.",
size, bytes.length);
}
-
- @Test
- public void testSpecJMS() throws Exception {
- QName serviceName = getServiceName(new
QName("http://cxf.apache.org/jms_greeter",
- "JMSGreeterService"));
- QName portName = getPortName(new
QName("http://cxf.apache.org/jms_greeter", "GreeterPort"));
- URL wsdl = getWSDLURL("/wsdl/jms_spec_test.wsdl");
- assertNotNull(wsdl);
-
- JMSGreeterService service = new JMSGreeterService(wsdl, serviceName);
- assertNotNull(service);
-
- String response1 = new String("Hello Milestone-");
- String response2 = new String("Bonjour");
- JMSGreeterPortType greeter = service.getPort(portName,
JMSGreeterPortType.class);
- for (int idx = 0; idx < 5; idx++) {
-
- greeter.greetMeOneWay("test String");
-
- String greeting = greeter.greetMe("Milestone-" + idx);
- assertNotNull("no response received from service", greeting);
- String exResponse = response1 + idx;
- assertEquals(exResponse, greeting);
-
- String reply = greeter.sayHi();
- assertNotNull("no response received from service", reply);
- assertEquals(response2, reply);
- }
- }
-
- @Test
- public void testWsdlExtensionSpecJMS() throws Exception {
- QName serviceName = getServiceName(new
QName("http://cxf.apache.org/jms_greeter",
- "JMSGreeterService"));
- QName portName = getPortName(new
QName("http://cxf.apache.org/jms_greeter", "GreeterPort"));
- URL wsdl = getWSDLURL("/wsdl/jms_spec_test.wsdl");
- assertNotNull(wsdl);
-
- JMSGreeterService service = new JMSGreeterService(wsdl, serviceName);
- assertNotNull(service);
-
- String response = new String("Bonjour");
- try {
- JMSGreeterPortType greeter = service.getPort(portName,
JMSGreeterPortType.class);
- Map<String, Object> requestContext =
((BindingProvider)greeter).getRequestContext();
- JMSMessageHeadersType requestHeader = new JMSMessageHeadersType();
- requestContext.put(JMSConstants.JMS_CLIENT_REQUEST_HEADERS,
requestHeader);
-
- String reply = greeter.sayHi();
- assertNotNull("no response received from service", reply);
- assertEquals(response, reply);
-
- requestContext = ((BindingProvider)greeter).getRequestContext();
- requestHeader = (JMSMessageHeadersType)requestContext
- .get(JMSConstants.JMS_CLIENT_REQUEST_HEADERS);
- assertEquals(requestHeader.getSOAPJMSBindingVersion(), "1.0");
- assertEquals(requestHeader.getSOAPJMSSOAPAction(), "\"test\"");
- assertEquals(requestHeader.getTimeToLive(), 3000);
- assertEquals(requestHeader.getJMSDeliveryMode(),
DeliveryMode.PERSISTENT);
- assertEquals(requestHeader.getJMSPriority(), 7);
-
- Map<String, Object> responseContext =
((BindingProvider)greeter).getResponseContext();
- JMSMessageHeadersType responseHeader =
(JMSMessageHeadersType)responseContext
- .get(JMSConstants.JMS_CLIENT_RESPONSE_HEADERS);
- assertEquals(responseHeader.getSOAPJMSBindingVersion(), "1.0");
- assertEquals(responseHeader.getSOAPJMSSOAPAction(), null);
- assertEquals(responseHeader.getJMSDeliveryMode(),
DeliveryMode.PERSISTENT);
- assertEquals(responseHeader.getJMSPriority(), 7);
-
- } catch (UndeclaredThrowableException ex) {
- throw (Exception)ex.getCause();
- }
- }
-
- @Test
- public void testWsdlExtensionSpecJMSPortError() throws Exception {
- QName serviceName = getServiceName(new
QName("http://cxf.apache.org/jms_greeter",
- "JMSGreeterService2"));
- QName portName = getPortName(new
QName("http://cxf.apache.org/jms_greeter", "GreeterPort2"));
- URL wsdl = getWSDLURL("/wsdl/jms_spec_test.wsdl");
- assertNotNull(wsdl);
-
- JMSGreeterService2 service = new JMSGreeterService2(wsdl, serviceName);
- assertNotNull(service);
-
- String response = new String("Bonjour");
- JMSGreeterPortType greeter = service.getPort(portName,
JMSGreeterPortType.class);
- String reply = greeter.sayHi();
- assertNotNull("no response received from service", reply);
- assertEquals(response, reply);
- }
-
- @Test
- public void testSpecNoWsdlService() throws Exception {
- String address = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue3"
- + "?jndiInitialContextFactory"
- + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
- +
"&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500";
-
- JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
-
factory.setTransportId(JMSSpecConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID);
- factory.setServiceClass(Hello.class);
- factory.setAddress(address);
- Hello client = (Hello)factory.create();
- String reply = client.sayHi(" HI");
- assertEquals(reply, "get HI");
- }
-
- @Test
- public void testBindingVersionError() throws Exception {
- QName serviceName = getServiceName(new
QName("http://cxf.apache.org/jms_greeter",
- "JMSGreeterService"));
- QName portName = getPortName(new
QName("http://cxf.apache.org/jms_greeter", "GreeterPort"));
- URL wsdl = getWSDLURL("/wsdl/jms_spec_test.wsdl");
- assertNotNull(wsdl);
-
- JMSGreeterService service = new JMSGreeterService(wsdl, serviceName);
- assertNotNull(service);
-
- JMSGreeterPortType greeter = service.getPort(portName,
JMSGreeterPortType.class);
- BindingProvider bp = (BindingProvider)greeter;
-
- Map<String, Object> requestContext = bp.getRequestContext();
- JMSMessageHeadersType requestHeader = new JMSMessageHeadersType();
- requestHeader.setSOAPJMSBindingVersion("0.3");
- requestContext.put(JMSConstants.JMS_CLIENT_REQUEST_HEADERS,
requestHeader);
-
- try {
- greeter.greetMe("Milestone-");
- fail("Should have thrown a fault");
- } catch (SOAPFaultException ex) {
- assertTrue(ex.getMessage().contains("0.3"));
- Map<String, Object> responseContext = bp.getResponseContext();
- JMSMessageHeadersType responseHdr =
-
(JMSMessageHeadersType)responseContext.get(JMSConstants.JMS_CLIENT_RESPONSE_HEADERS);
- if (responseHdr == null) {
- fail("response Header should not be null");
- }
- assertTrue(responseHdr.isSOAPJMSIsFault());
- }
-
- }
}
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=810203&r1=810202&r2=810203&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 19:59:26 2009
@@ -27,7 +27,6 @@
import org.apache.cxf.systest.jaxws.Hello;
import org.apache.cxf.systest.jaxws.HelloImpl;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-import org.apache.cxf.transport.jms.spec.JMSSpecConstants;
public class Server extends AbstractBusTestServerBase {
@@ -69,40 +68,6 @@
EndpointImpl ep =
(EndpointImpl)Endpoint.publish("http://cxf.apache.org/transports/jms", mtom);
Binding binding = ep.getBinding();
((SOAPBinding)binding).setMTOMEnabled(true);
-
- Object spec1 = new GreeterSpecImpl();
- String address1 = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue2"
- + "?jndiInitialContextFactory"
- +
"=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
- +
"&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500";
- Endpoint.publish(address1, spec1);
-
- Object spec2 = new GreeterSpecWithPortError();
- String address2 = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue5"
- + "?jndiInitialContextFactory"
- + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
- +
"&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500";
- Endpoint.publish(address2, spec2);
-
- initNoWsdlServer();
- }
-
-
- /**
- *
- */
- private void initNoWsdlServer() {
- String address = "jms:jndi:dynamicQueues/test.cxf.jmstransport.queue3"
- + "?jndiInitialContextFactory"
- + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
- +
"&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500";
- Hello implementor = new HelloImpl();
- JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
- svrFactory.setServiceClass(Hello.class);
- svrFactory.setAddress(address);
-
svrFactory.setTransportId(JMSSpecConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID);
- svrFactory.setServiceBean(implementor);
- svrFactory.create();
}
Modified:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/SchemaValidationImpl.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/SchemaValidationImpl.java?rev=810203&r1=810202&r2=810203&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/SchemaValidationImpl.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/schema_validation/SchemaValidationImpl.java
Tue Sep 1 19:59:26 2009
@@ -32,7 +32,6 @@
portName = "SoapPort",
endpointInterface =
"org.apache.schema_validation.SchemaValidation",
targetNamespace = "http://apache.org/schema_validation")
[email protected]
public class SchemaValidationImpl implements SchemaValidation {
public boolean setComplexStruct(ComplexStruct in) {
Modified: cxf/branches/2.2.x-fixes/systests/ws-specs/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/ws-specs/pom.xml?rev=810203&r1=810202&r2=810203&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/ws-specs/pom.xml (original)
+++ cxf/branches/2.2.x-fixes/systests/ws-specs/pom.xml Tue Sep 1 19:59:26 2009
@@ -73,58 +73,6 @@
</executions>
</plugin>
<plugin>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-codegen-plugin</artifactId>
- <version>${project.version}</version>
- <executions>
- <execution>
- <id>generate-wssec10-test-sources</id>
- <phase>generate-test-sources</phase>
- <configuration>
-
<testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
- <wsdlOptions>
- <wsdlOption>
-
<wsdl>${basedir}/src/test/resources/wsdl_systest_wsspec/wssec10/WsSecurity10.wsdl</wsdl>
- </wsdlOption>
- </wsdlOptions>
- </configuration>
- <goals>
- <goal>wsdl2java</goal>
- </goals>
- </execution>
- <execution>
- <id>generate-wssec11-test-sources</id>
- <phase>generate-test-sources</phase>
- <configuration>
-
<testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
- <wsdlOptions>
- <wsdlOption>
-
<wsdl>${basedir}/src/test/resources/wsdl_systest_wsspec/wssec11/WsSecurity11.wsdl</wsdl>
- </wsdlOption>
- </wsdlOptions>
- </configuration>
- <goals>
- <goal>wsdl2java</goal>
- </goals>
- </execution>
- <execution>
- <id>generate-wssc-test-sources</id>
- <phase>generate-test-sources</phase>
- <configuration>
-
<testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
- <wsdlOptions>
- <wsdlOption>
-
<wsdl>${basedir}/src/test/resources/wsdl_systest_wsspec/wssc/WSSecureConversation.wsdl</wsdl>
- </wsdlOption>
- </wsdlOptions>
- </configuration>
- <goals>
- <goal>wsdl2java</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>