cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1171659 - /cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/
Date Fri, 16 Sep 2011 16:53:29 GMT
Author: dkulp
Date: Fri Sep 16 16:53:28 2011
New Revision: 1171659

URL: http://svn.apache.org/viewvc?rev=1171659&view=rev
Log:
[CXF-3805] Add testcase for CXF-3805
Test from Tomasz Bech added

Added:
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/AddNumbersPortType.java
  (with props)
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/BeanInCreationExceptionTest.java
  (with props)
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/DummyPlatformTransactionManager.java
  (with props)
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABO.java
  (with props)
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABOImpl.java
  (with props)
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/beans.xml
  (with props)

Added: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/AddNumbersPortType.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/AddNumbersPortType.java?rev=1171659&view=auto
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/AddNumbersPortType.java
(added)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/AddNumbersPortType.java
Fri Sep 16 16:53:28 2011
@@ -0,0 +1,67 @@
+/**
+ * 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.beanincreationexception;
+
+import java.util.List;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlList;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+@WebService(name = "AddNumbersPortType", targetNamespace = "http://apache.org/xmllist")
+public interface AddNumbersPortType {
+
+    /**
+     * @param arg
+     * @return returns java.util.List<java.lang.Integer>
+     */
+    @WebMethod
+    @WebResult(name = "arg0", targetNamespace = "http://apache.org/xmllist")
+    @RequestWrapper(localName = "addNumbers", targetNamespace = "http://apache.org/xmllist")
+    @ResponseWrapper(localName = "addNumbersResponse", targetNamespace = "http://apache.org/xmllist")
+    List<Integer> addNumbers(
+        @WebParam(name = "arg", targetNamespace = "http://apache.org/xmllist") 
+        @XmlList List<String> arg);
+
+    // test for CXF-1752
+    @WebMethod(action = "testCXF1752")
+    @WebResult(name = "result")
+    UserObject testCXF1752(@WebParam(name = "receivers") List<Long> receivers,
+                           @WebParam(name = "item") UserObject item,
+                           @WebParam(name = "binaryContent") byte[] binaryContent,
+                           @WebParam(name = "userObjects") UserObject[] objects,
+                           @WebParam(name = "userObjectList") List<UserObject> objectList,
+                           @WebParam(name = "fileName") String fileName);
+
+    static class UserObject {
+        String myData;
+
+        public void setMyData(String s) {
+            myData = s;
+        }
+
+        public String getMyData() {
+            return myData;
+        }
+    }
+}

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/AddNumbersPortType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/AddNumbersPortType.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/BeanInCreationExceptionTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/BeanInCreationExceptionTest.java?rev=1171659&view=auto
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/BeanInCreationExceptionTest.java
(added)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/BeanInCreationExceptionTest.java
Fri Sep 16 16:53:28 2011
@@ -0,0 +1,43 @@
+/**
+ * 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.beanincreationexception;
+
+import org.apache.cxf.test.AbstractCXFSpringTest;
+import org.apache.cxf.testutil.common.TestUtil;
+
+import org.junit.Test;
+
+/**
+ * 
+ */
+public class BeanInCreationExceptionTest extends AbstractCXFSpringTest {
+    static String port = TestUtil.getPortNumber("springport");
+
+    @Override
+    protected String[] getConfigLocations() {
+        return new String[] {"classpath:/org/apache/cxf/systest/beanincreationexception/beans.xml"};
+    }
+
+    @Test
+    public void testBeanInCreationExceptionTest() throws Exception {
+        //CXF-3805
+        //if it gets in here, creation of the context worked.   
+    }
+}

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/BeanInCreationExceptionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/BeanInCreationExceptionTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/DummyPlatformTransactionManager.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/DummyPlatformTransactionManager.java?rev=1171659&view=auto
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/DummyPlatformTransactionManager.java
(added)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/DummyPlatformTransactionManager.java
Fri Sep 16 16:53:28 2011
@@ -0,0 +1,46 @@
+/**
+ * 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.beanincreationexception;
+
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.TransactionDefinition;
+import org.springframework.transaction.TransactionException;
+import org.springframework.transaction.TransactionStatus;
+
+public class DummyPlatformTransactionManager implements PlatformTransactionManager {
+
+    @Override
+    public void commit(TransactionStatus arg0) throws TransactionException {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public TransactionStatus getTransaction(TransactionDefinition arg0) throws TransactionException
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public void rollback(TransactionStatus arg0) throws TransactionException {
+        // TODO Auto-generated method stub
+
+    }
+
+}

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/DummyPlatformTransactionManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/DummyPlatformTransactionManager.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABO.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABO.java?rev=1171659&view=auto
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABO.java
(added)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABO.java
Fri Sep 16 16:53:28 2011
@@ -0,0 +1,23 @@
+/**
+ * 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.beanincreationexception;
+
+public interface TestBeanABO {
+
+}

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABO.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABO.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABOImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABOImpl.java?rev=1171659&view=auto
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABOImpl.java
(added)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABOImpl.java
Fri Sep 16 16:53:28 2011
@@ -0,0 +1,37 @@
+/**
+ * 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.beanincreationexception;
+
+public class TestBeanABOImpl implements TestBeanABO {
+    private TestBeanABO bean;
+    private AddNumbersPortType client;
+
+    public void setBean(TestBeanABO bean) {
+        this.bean = bean;
+    }
+
+    public void setClient(AddNumbersPortType client) {
+        this.client = client;
+    }
+
+    public String nothing() {
+        return "" + bean + client;
+    }
+
+}

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABOImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/TestBeanABOImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/beans.xml?rev=1171659&view=auto
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/beans.xml
(added)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/beans.xml
Fri Sep 16 16:53:28 2011
@@ -0,0 +1,102 @@
+<?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" 
+xmlns:cxf="http://cxf.apache.org/core" 
+xsi:schemaLocation=" 
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd

+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd 
+http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> 
+<import resource="classpath:META-INF/cxf/cxf.xml" /> 
+
+	<bean id="transactionManager" class="org.apache.cxf.systest.beanincreationexception.DummyPlatformTransactionManager">
+	</bean>
+
+	<bean id="testBeanABOImpl" class="org.apache.cxf.systest.beanincreationexception.TestBeanABOImpl">
+		<property name="client" ref="client1"/>
+	</bean>
+	<bean id="testBeanABO" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
+		<property name="transactionManager">
+			<ref bean="transactionManager"/>
+		</property> 
+		<property name="target">
+			<ref local="testBeanABOImpl"/>
+		</property>
+		<property name="transactionAttributes">
+			<props>
+				<prop key="*">PROPAGATION_REQUIRED</prop>
+			</props>
+		</property>
+	</bean> 
+
+	<bean id="client1" class="org.apache.cxf.systest.beanincreationexception.AddNumbersPortType"

+      factory-bean="clientFactory1" factory-method="create"/>
+
+	<bean id="clientFactory1" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
+		<property name="serviceClass"
+			value="org.apache.cxf.systest.beanincreationexception.AddNumbersPortType" />
+		<property name="address" value="http://localhost:9002/HelloWorld" />
+	</bean>
+	
+	<bean id="testBeanBBOImpl" class="org.apache.cxf.systest.beanincreationexception.TestBeanABOImpl">
+		<property name="bean" ref="testBeanABO"/>
+ 		<property name="client" ref="client2"/> 
+	</bean>
+	<bean id="testBeanBBO" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
+		<property name="transactionManager">
+			<ref bean="transactionManager"/>
+		</property> 
+		<property name="target">
+			<ref local="testBeanBBOImpl"/>
+		</property>
+		<property name="transactionAttributes">
+			<props>
+				<prop key="*">PROPAGATION_REQUIRED</prop>
+			</props>
+		</property>
+	</bean> 
+
+	<bean id="client2" class="org.apache.cxf.systest.beanincreationexception.AddNumbersPortType"

+      factory-bean="clientFactory1" factory-method="create"/>
+
+	<bean id="clientFactory2" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
+		<property name="serviceClass"
+			value="org.apache.cxf.systest.beanincreationexception.AddNumbersPortType" />
+		<property name="address" value="http://localhost:9002/HelloWorld" />
+	</bean>
+	 
+	<bean id="testBeanCBOImpl" class="org.apache.cxf.systest.beanincreationexception.TestBeanABOImpl">
+		<property name="bean" ref="testBeanBBO"/>
+	</bean>
+	<bean id="testBeanCBO" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
+		<property name="transactionManager">
+			<ref bean="transactionManager"/>
+		</property> 
+		<property name="target">
+			<ref local="testBeanCBOImpl"/>
+		</property>
+		<property name="transactionAttributes">
+			<props>
+				<prop key="*">PROPAGATION_REQUIRED</prop>
+			</props>
+		</property>
+	</bean> 
+</beans> 

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/beans.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/beans.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/beanincreationexception/beans.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message