Author: dkulp
Date: Mon Aug 20 14:48:44 2007
New Revision: 567840
URL: http://svn.apache.org/viewvc?rev=567840&view=rev
Log:
Add (commented out until fixed) testcase for CXF-926
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServiceTestFault.java
(with props)
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=567840&r1=567839&r2=567840&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
Mon Aug 20 14:48:44 2007
@@ -254,6 +254,16 @@
assertEquals(2, foos2.size());
assertEquals(2, foos2.get(0).length);
assertEquals(2, foos2.get(1).length);
+
+
+ /* CXF-926 test case - this should work, but doesn't right now
+ try {
+ port.throwException(10);
+ fail("Expected exception not found");
+ } catch (ServiceTestFault ex) {
+ assertEquals(10, ex.getFaultInfo().getId());
+ }
+ */
}
@Test
public void testRpcLitNoWsdl() throws Exception {
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java?rev=567840&r1=567839&r2=567840&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
Mon Aug 20 14:48:44 2007
@@ -72,6 +72,9 @@
@WebMethod
List<Foo[]> listObjectArrayOutput();
+
+ @WebMethod
+ int throwException(int i) throws ServiceTestFault;
static class Foo {
String name;
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java?rev=567840&r1=567839&r2=567840&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
Mon Aug 20 14:48:44 2007
@@ -113,5 +113,8 @@
return Arrays.asList(new Foo[] {a, b}, new Foo[] {c, d});
}
+ public int throwException(int i) throws ServiceTestFault {
+ throw new ServiceTestFault(new ServiceTestFault.ServiceTestDetails(i));
+ }
}
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServiceTestFault.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServiceTestFault.java?rev=567840&view=auto
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServiceTestFault.java
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServiceTestFault.java
Mon Aug 20 14:48:44 2007
@@ -0,0 +1,56 @@
+/**
+ * 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.
+ */
+package org.apache.cxf.systest.jaxws;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.ws.WebFault;
+
[EMAIL PROTECTED](name = "ServiceTestFault")
+public class ServiceTestFault extends Exception {
+ private ServiceTestDetails details;
+ public ServiceTestFault(String msg, ServiceTestDetails details) {
+ super(msg);
+ this.details = details;
+ }
+ public ServiceTestFault(ServiceTestDetails details) {
+ super();
+ this.details = details;
+ }
+ public ServiceTestDetails getFaultInfo() {
+ return details;
+ }
+
+ @XmlRootElement(name = "ServiceTestDetails")
+ public static class ServiceTestDetails {
+ private long id;
+
+ public ServiceTestDetails() {
+ }
+ public ServiceTestDetails(int i) {
+ id = i;
+ }
+
+ public long getId() {
+ return id;
+ }
+ public void setId(long id) {
+ this.id = id;
+ }
+ }
+}
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServiceTestFault.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServiceTestFault.java
------------------------------------------------------------------------------
svn:keywords = Rev Date