JBossWS SVN: r17777 - container/jboss71/branches/jbossws-jboss712/server-integration/src/main/java/org/jboss/as/webservices/invocation.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-07-12 09:16:57 -0400 (Fri, 12 Jul 2013)
New Revision: 17777
Modified:
container/jboss71/branches/jbossws-jboss712/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandlerEJB.java
Log:
[JBWS-3601] Porting WFLY-1667 fix to AS 7.1.2 ASIL
Modified: container/jboss71/branches/jbossws-jboss712/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandlerEJB.java
===================================================================
--- container/jboss71/branches/jbossws-jboss712/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandlerEJB.java 2013-07-12 13:06:02 UTC (rev 17776)
+++ container/jboss71/branches/jbossws-jboss712/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandlerEJB.java 2013-07-12 13:16:57 UTC (rev 17777)
@@ -25,9 +25,14 @@
import static org.jboss.as.webservices.metadata.model.EJBEndpoint.EJB_COMPONENT_VIEW_NAME;
import static org.jboss.as.webservices.util.ASHelper.getMSCService;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.lang.reflect.UndeclaredThrowableException;
import java.util.Collection;
+import javax.management.MBeanException;
+import javax.xml.ws.soap.SOAPFaultException;
+
import org.jboss.as.ee.component.Component;
import org.jboss.as.ee.component.ComponentView;
import org.jboss.as.naming.ManagedReference;
@@ -121,6 +126,33 @@
onAfterInvocation(wsInvocation);
}
}
+
+ protected void handleInvocationException(final Throwable t) throws Exception {
+ if (t instanceof MBeanException) {
+ throw ((MBeanException) t).getTargetException();
+ }
+ if (t instanceof Exception) {
+ SOAPFaultException ex = findSoapFaultException(t);
+ if(ex != null) {
+ throw new InvocationTargetException(ex);
+ }
+ throw (Exception)t;
+ }
+ if (t instanceof Error) {
+ throw (Error) t;
+ }
+ throw new UndeclaredThrowableException(t);
+ }
+
+ protected SOAPFaultException findSoapFaultException(Throwable ex) {
+ if (ex instanceof SOAPFaultException) {
+ return (SOAPFaultException)ex;
+ }
+ if (ex.getCause() != null) {
+ return findSoapFaultException(ex.getCause());
+ }
+ return null;
+ }
/**
* Translates SEI method to EJB view method.
11 years, 5 months
JBossWS SVN: r17776 - container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/invocation.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-07-12 09:06:02 -0400 (Fri, 12 Jul 2013)
New Revision: 17776
Modified:
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandlerEJB.java
Log:
[JBWS-3601] Porting WFLY-1667 fix to AS 7.1.3 ASIL
Modified: container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandlerEJB.java
===================================================================
--- container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandlerEJB.java 2013-07-12 12:35:20 UTC (rev 17775)
+++ container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandlerEJB.java 2013-07-12 13:06:02 UTC (rev 17776)
@@ -25,9 +25,14 @@
import static org.jboss.as.webservices.metadata.model.EJBEndpoint.EJB_COMPONENT_VIEW_NAME;
import static org.jboss.as.webservices.util.ASHelper.getMSCService;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.lang.reflect.UndeclaredThrowableException;
import java.util.Collection;
+import javax.management.MBeanException;
+import javax.xml.ws.soap.SOAPFaultException;
+
import org.jboss.as.ee.component.Component;
import org.jboss.as.ee.component.ComponentView;
import org.jboss.as.naming.ManagedReference;
@@ -121,6 +126,33 @@
onAfterInvocation(wsInvocation);
}
}
+
+ protected void handleInvocationException(final Throwable t) throws Exception {
+ if (t instanceof MBeanException) {
+ throw ((MBeanException) t).getTargetException();
+ }
+ if (t instanceof Exception) {
+ SOAPFaultException ex = findSoapFaultException(t);
+ if(ex != null) {
+ throw new InvocationTargetException(ex);
+ }
+ throw (Exception)t;
+ }
+ if (t instanceof Error) {
+ throw (Error) t;
+ }
+ throw new UndeclaredThrowableException(t);
+ }
+
+ protected SOAPFaultException findSoapFaultException(Throwable ex) {
+ if (ex instanceof SOAPFaultException) {
+ return (SOAPFaultException)ex;
+ }
+ if (ex.getCause() != null) {
+ return findSoapFaultException(ex.getCause());
+ }
+ return null;
+ }
/**
* Translates SEI method to EJB view method.
11 years, 5 months
JBossWS SVN: r17775 - projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1198.
by jbossws-commits@lists.jboss.org
Author: rsvoboda(a)redhat.com
Date: 2013-07-12 08:35:20 -0400 (Fri, 12 Jul 2013)
New Revision: 17775
Modified:
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1198/Test1198TestCase.java
Log:
Removing unused import
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1198/Test1198TestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1198/Test1198TestCase.java 2013-07-12 12:29:07 UTC (rev 17774)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1198/Test1198TestCase.java 2013-07-12 12:35:20 UTC (rev 17775)
@@ -31,7 +31,6 @@
import org.jboss.test.ws.jaxws.bp12.common.BP12Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
-import org.junit.Assert;
public class Test1198TestCase extends BP12Test
{
11 years, 5 months
JBossWS SVN: r17774 - in projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss: test/ws/jaxws/bp12/wsa/test1198 and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: rsvoboda(a)redhat.com
Date: 2013-07-12 08:29:07 -0400 (Fri, 12 Jul 2013)
New Revision: 17774
Modified:
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1197/Test1197TestCase.java
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1198/Test1198TestCase.java
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/wsf/test/TestServlet.java
Log:
Code fixes - Unused Assignment, fail asserts for expected exceptions
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1197/Test1197TestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1197/Test1197TestCase.java 2013-07-12 12:16:32 UTC (rev 17773)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1197/Test1197TestCase.java 2013-07-12 12:29:07 UTC (rev 17774)
@@ -92,7 +92,8 @@
headerText.value = "Hello";
try
{
- response = port.sign1("world");
+ port.sign1("world");
+ fail("Exception is expected.");
}
catch (Exception e)
{
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1198/Test1198TestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1198/Test1198TestCase.java 2013-07-12 12:16:32 UTC (rev 17773)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1198/Test1198TestCase.java 2013-07-12 12:29:07 UTC (rev 17774)
@@ -31,6 +31,7 @@
import org.jboss.test.ws.jaxws.bp12.common.BP12Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.junit.Assert;
public class Test1198TestCase extends BP12Test
{
@@ -69,7 +70,8 @@
System.out.println("Invoking sign2 and exception is expected...");
try
{
- response = port.sign2("Fault","World");
+ port.sign2("Fault","World");
+ fail("Exception is expected.");
}
catch (Exception e)
{
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/wsf/test/TestServlet.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/wsf/test/TestServlet.java 2013-07-12 12:16:32 UTC (rev 17773)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/wsf/test/TestServlet.java 2013-07-12 12:29:07 UTC (rev 17774)
@@ -71,8 +71,7 @@
int testsRun = 0;
if (methodName != null && methodName.length() > 0)
{
- Method m = null;
- m = helper.getClass().getMethod(methodName);
+ Method m = helper.getClass().getMethod(methodName);
testsRun++;
invokeMethod(m, helper, failedTests, errorTests);
}
11 years, 5 months
JBossWS SVN: r17773 - in projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss: wsf/test and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: rsvoboda(a)redhat.com
Date: 2013-07-12 08:16:32 -0400 (Fri, 12 Jul 2013)
New Revision: 17773
Modified:
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/basedoc/utf16/IBaseDataTypesDocLitW.java
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java
Log:
Code fixes - Import From The Same Package
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/basedoc/utf16/IBaseDataTypesDocLitW.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/basedoc/utf16/IBaseDataTypesDocLitW.java 2013-07-12 12:02:14 UTC (rev 17772)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/basedoc/utf16/IBaseDataTypesDocLitW.java 2013-07-12 12:16:32 UTC (rev 17773)
@@ -30,8 +30,6 @@
import javax.xml.ws.ResponseWrapper;
import javax.xml.ws.soap.Addressing;
-import org.jboss.test.ws.jaxws.bp12.basedoc.utf16.ObjectFactory;
-
@WebService(targetNamespace = "http://tempuri.org/", name = "IBaseDataTypesDocLitW")
@XmlSeeAlso({ObjectFactory.class})
@Addressing
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java 2013-07-12 12:02:14 UTC (rev 17772)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/wsf/test/JBossWSCXFTestSetup.java 2013-07-12 12:16:32 UTC (rev 17773)
@@ -26,7 +26,6 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.jboss.logging.Logger;
-import org.jboss.wsf.test.JBossWSTestSetup;
/**
*
11 years, 5 months
JBossWS SVN: r17772 - projects/wsi-bp-test/trunk.
by jbossws-commits@lists.jboss.org
Author: rsvoboda(a)redhat.com
Date: 2013-07-12 08:02:14 -0400 (Fri, 12 Jul 2013)
New Revision: 17772
Modified:
projects/wsi-bp-test/trunk/pom.xml
Log:
Removing Include for Test.java, keeping just TestCase.java - avoiding MVN failure - No tests found in org.jboss.test.ws.jaxws.bp12.common.BP12TestCase
Modified: projects/wsi-bp-test/trunk/pom.xml
===================================================================
--- projects/wsi-bp-test/trunk/pom.xml 2013-07-12 11:52:42 UTC (rev 17771)
+++ projects/wsi-bp-test/trunk/pom.xml 2013-07-12 12:02:14 UTC (rev 17772)
@@ -242,7 +242,6 @@
<configuration>
<skip>false</skip>
<includes>
- <include>**/*Test.java</include>
<include>**/*TestCase.java</include>
</includes>
<parallel>classes</parallel>
11 years, 5 months
JBossWS SVN: r17771 - in projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12: basedoc/utf16 and 10 other directories.
by jbossws-commits@lists.jboss.org
Author: rsvoboda(a)redhat.com
Date: 2013-07-12 07:52:42 -0400 (Fri, 12 Jul 2013)
New Revision: 17771
Added:
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/common/BP12Test.java
Removed:
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/common/BP12TestCase.java
Modified:
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/basedoc/BaseTypesDocTestCase.java
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/basedoc/utf16/BaseTypesDocTestCase.java
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/baserpc/BaseTypesRPCTestCase.java
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/complexdoc/ComplexTypesDocTestCase.java
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/complexrpc/ComplexTypesRPCTestCase.java
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/Test1189TestCase.java
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/anon/Test1189AnonTestCase.java
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/nonanon/Test1189NonAnonTestCase.java
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/Test119XTestCase.java
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1197/Test1197TestCase.java
projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1198/Test1198TestCase.java
Log:
BP12TestCase rename to BP12Test - avoiding MVN failure - No tests found in org.jboss.test.ws.jaxws.bp12.common.BP12TestCase
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/basedoc/BaseTypesDocTestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/basedoc/BaseTypesDocTestCase.java 2013-07-12 10:36:58 UTC (rev 17770)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/basedoc/BaseTypesDocTestCase.java 2013-07-12 11:52:42 UTC (rev 17771)
@@ -34,11 +34,11 @@
import junit.framework.Test;
-import org.jboss.test.ws.jaxws.bp12.common.BP12TestCase;
+import org.jboss.test.ws.jaxws.bp12.common.BP12Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
-public class BaseTypesDocTestCase extends BP12TestCase
+public class BaseTypesDocTestCase extends BP12Test
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-bp12basedoc/BPBaseDoc";
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/basedoc/utf16/BaseTypesDocTestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/basedoc/utf16/BaseTypesDocTestCase.java 2013-07-12 10:36:58 UTC (rev 17770)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/basedoc/utf16/BaseTypesDocTestCase.java 2013-07-12 11:52:42 UTC (rev 17771)
@@ -34,10 +34,10 @@
import junit.framework.Test;
-import org.jboss.test.ws.jaxws.bp12.common.BP12TestCase;
+import org.jboss.test.ws.jaxws.bp12.common.BP12Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
-public class BaseTypesDocTestCase extends BP12TestCase
+public class BaseTypesDocTestCase extends BP12Test
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-bp12basedoc-utf16/BPBaseDoc";
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/baserpc/BaseTypesRPCTestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/baserpc/BaseTypesRPCTestCase.java 2013-07-12 10:36:58 UTC (rev 17770)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/baserpc/BaseTypesRPCTestCase.java 2013-07-12 11:52:42 UTC (rev 17771)
@@ -34,10 +34,10 @@
import junit.framework.Test;
-import org.jboss.test.ws.jaxws.bp12.common.BP12TestCase;
+import org.jboss.test.ws.jaxws.bp12.common.BP12Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
-public class BaseTypesRPCTestCase extends BP12TestCase
+public class BaseTypesRPCTestCase extends BP12Test
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-bp12baserpc/BPBaseRPC";
Copied: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/common/BP12Test.java (from rev 17757, projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/common/BP12TestCase.java)
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/common/BP12Test.java (rev 0)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/common/BP12Test.java 2013-07-12 11:52:42 UTC (rev 17771)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.bp12.common;
+
+import org.jboss.wsf.test.JBossWSTest;
+
+public class BP12Test extends JBossWSTest{
+ protected final String PROXY_ADDRESS = System.getProperty("proxy.address", "http://localhost:9090");
+
+}
Deleted: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/common/BP12TestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/common/BP12TestCase.java 2013-07-12 10:36:58 UTC (rev 17770)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/common/BP12TestCase.java 2013-07-12 11:52:42 UTC (rev 17771)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2012, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.bp12.common;
-
-import org.jboss.wsf.test.JBossWSTest;
-
-public class BP12TestCase extends JBossWSTest{
- protected final String PROXY_ADDRESS = System.getProperty("proxy.address", "http://localhost:9090");
-
-}
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/complexdoc/ComplexTypesDocTestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/complexdoc/ComplexTypesDocTestCase.java 2013-07-12 10:36:58 UTC (rev 17770)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/complexdoc/ComplexTypesDocTestCase.java 2013-07-12 11:52:42 UTC (rev 17771)
@@ -29,10 +29,10 @@
import junit.framework.Test;
-import org.jboss.test.ws.jaxws.bp12.common.BP12TestCase;
+import org.jboss.test.ws.jaxws.bp12.common.BP12Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
-public class ComplexTypesDocTestCase extends BP12TestCase
+public class ComplexTypesDocTestCase extends BP12Test
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-bp12complexdoc/ComplexDoc";
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/complexrpc/ComplexTypesRPCTestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/complexrpc/ComplexTypesRPCTestCase.java 2013-07-12 10:36:58 UTC (rev 17770)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/complexrpc/ComplexTypesRPCTestCase.java 2013-07-12 11:52:42 UTC (rev 17771)
@@ -29,10 +29,10 @@
import junit.framework.Test;
-import org.jboss.test.ws.jaxws.bp12.common.BP12TestCase;
+import org.jboss.test.ws.jaxws.bp12.common.BP12Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
-public class ComplexTypesRPCTestCase extends BP12TestCase
+public class ComplexTypesRPCTestCase extends BP12Test
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-bp12complexrpc/ComplexRPC";
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/Test1189TestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/Test1189TestCase.java 2013-07-12 10:36:58 UTC (rev 17770)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/Test1189TestCase.java 2013-07-12 11:52:42 UTC (rev 17771)
@@ -29,10 +29,10 @@
import junit.framework.Test;
-import org.jboss.test.ws.jaxws.bp12.common.BP12TestCase;
+import org.jboss.test.ws.jaxws.bp12.common.BP12Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
-public class Test1189TestCase extends BP12TestCase
+public class Test1189TestCase extends BP12Test
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-bp12test1189/Test1189";
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/anon/Test1189AnonTestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/anon/Test1189AnonTestCase.java 2013-07-12 10:36:58 UTC (rev 17770)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/anon/Test1189AnonTestCase.java 2013-07-12 11:52:42 UTC (rev 17771)
@@ -35,10 +35,10 @@
import org.apache.cxf.ws.addressing.EndpointReferenceType;
import org.apache.cxf.ws.addressing.JAXWSAConstants;
import org.apache.cxf.ws.addressing.impl.AddressingPropertiesImpl;
-import org.jboss.test.ws.jaxws.bp12.common.BP12TestCase;
+import org.jboss.test.ws.jaxws.bp12.common.BP12Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
-public class Test1189AnonTestCase extends BP12TestCase
+public class Test1189AnonTestCase extends BP12Test
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-bp12test1189-anon/Test1189Anon";
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/nonanon/Test1189NonAnonTestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/nonanon/Test1189NonAnonTestCase.java 2013-07-12 10:36:58 UTC (rev 17770)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1189/nonanon/Test1189NonAnonTestCase.java 2013-07-12 11:52:42 UTC (rev 17771)
@@ -30,10 +30,10 @@
import junit.framework.Test;
-import org.jboss.test.ws.jaxws.bp12.common.BP12TestCase;
+import org.jboss.test.ws.jaxws.bp12.common.BP12Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
-public class Test1189NonAnonTestCase extends BP12TestCase
+public class Test1189NonAnonTestCase extends BP12Test
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-bp12test1189-nonanon/Test1189NonAnon";
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/Test119XTestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/Test119XTestCase.java 2013-07-12 10:36:58 UTC (rev 17770)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1190/Test119XTestCase.java 2013-07-12 11:52:42 UTC (rev 17771)
@@ -41,10 +41,10 @@
import junit.framework.Test;
import org.apache.cxf.helpers.IOUtils;
-import org.jboss.test.ws.jaxws.bp12.common.BP12TestCase;
+import org.jboss.test.ws.jaxws.bp12.common.BP12Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
-public class Test119XTestCase extends BP12TestCase
+public class Test119XTestCase extends BP12Test
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-bp12test1190/Test1190";
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1197/Test1197TestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1197/Test1197TestCase.java 2013-07-12 10:36:58 UTC (rev 17770)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1197/Test1197TestCase.java 2013-07-12 11:52:42 UTC (rev 17771)
@@ -29,10 +29,10 @@
import junit.framework.Test;
-import org.jboss.test.ws.jaxws.bp12.common.BP12TestCase;
+import org.jboss.test.ws.jaxws.bp12.common.BP12Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
-public class Test1197TestCase extends BP12TestCase
+public class Test1197TestCase extends BP12Test
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-bp12test1197/Test1197";
Modified: projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1198/Test1198TestCase.java
===================================================================
--- projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1198/Test1198TestCase.java 2013-07-12 10:36:58 UTC (rev 17770)
+++ projects/wsi-bp-test/trunk/bp12-tests/src/test/java/org/jboss/test/ws/jaxws/bp12/wsa/test1198/Test1198TestCase.java 2013-07-12 11:52:42 UTC (rev 17771)
@@ -29,10 +29,10 @@
import junit.framework.Test;
-import org.jboss.test.ws.jaxws.bp12.common.BP12TestCase;
+import org.jboss.test.ws.jaxws.bp12.common.BP12Test;
import org.jboss.wsf.test.JBossWSCXFTestSetup;
-public class Test1198TestCase extends BP12TestCase
+public class Test1198TestCase extends BP12Test
{
private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-bp12test1198/Test1198";
11 years, 5 months
JBossWS SVN: r17770 - container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/invocation.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-07-12 06:36:58 -0400 (Fri, 12 Jul 2013)
New Revision: 17770
Modified:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java
Log:
[JBWS-3601] Porting WFLY-1667 fix to AS 7.2 ASIL
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java 2013-07-12 07:18:34 UTC (rev 17769)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java 2013-07-12 10:36:58 UTC (rev 17770)
@@ -31,6 +31,7 @@
import java.util.Collection;
import javax.management.MBeanException;
+import javax.xml.ws.soap.SOAPFaultException;
import org.jboss.as.ee.component.Component;
import org.jboss.as.ee.component.ComponentView;
@@ -149,6 +150,11 @@
if (t instanceof InvocationTargetException) {
throw (Exception) t;
} else {
+ SOAPFaultException ex = findSoapFaultException(t);
+ if (ex != null)
+ {
+ throw new InvocationTargetException(ex);
+ }
throw new InvocationTargetException(t);
}
}
@@ -157,6 +163,19 @@
}
throw new UndeclaredThrowableException(t);
}
+
+ protected SOAPFaultException findSoapFaultException(Throwable ex)
+ {
+ if (ex instanceof SOAPFaultException)
+ {
+ return (SOAPFaultException) ex;
+ }
+ if (ex.getCause() != null)
+ {
+ return findSoapFaultException(ex.getCause());
+ }
+ return null;
+ }
/**
* Compares two methods if they are identical.
11 years, 5 months
JBossWS SVN: r17768 - in stack/cxf/trunk/modules/testsuite/shared-tests/src/test: java/org/jboss/test/ws/jaxws/samples/exception and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-07-11 12:19:17 -0400 (Thu, 11 Jul 2013)
New Revision: 17768
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/SOAP12ExceptionEJB3Helper.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/SOAP12ExceptionHelper.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/SOAP12EndpointImpl.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/SOAP12ExceptionEndpointEJB3Impl.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/SOAP12ExceptionEndpointImpl.java
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-samples-jaxws.xml
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3TestCase.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionHelper.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/EndpointImpl.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/samples/exception/WEB-INF/web.xml
Log:
[JBWS-3601][WFLY-1667] Adding testcase
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-samples-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-samples-jaxws.xml 2013-07-11 12:37:03 UTC (rev 17767)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-samples-jaxws.xml 2013-07-11 16:19:17 UTC (rev 17768)
@@ -113,8 +113,10 @@
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/exception/server/jaxws/**"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/server/EndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/exception/server/SOAP12EndpointImpl.class"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/server/ExceptionEndpoint.class"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/server/ExceptionEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/exception/server/SOAP12ExceptionEndpointImpl.class"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/server/UserException.class"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/server/ServerHandler.class"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/server/jaxws-handlers-server.xml"/>
@@ -124,8 +126,10 @@
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/exception/server/jaxws/**"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/server/EndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/exception/server/SOAP12EndpointImpl.class"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/server/ExceptionEndpoint.class"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/server/ExceptionEndpointEJB3Impl.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/exception/server/SOAP12ExceptionEndpointEJB3Impl.class"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/server/UserException.class"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/server/ServerHandler.class"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/server/jaxws-handlers-server.xml"/>
@@ -135,6 +139,7 @@
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/samples/exception/client/**"/>
<include name="org/jboss/test/ws/jaxws/samples/exception/ExceptionHelper.class"/>
+ <include name="org/jboss/test/ws/jaxws/samples/exception/SOAP12ExceptionHelper.class"/>
<include name="org/jboss/test/helper/ClientHelper.class"/>
<include name="org/jboss/test/helper/TestServlet.class"/>
</classes>
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3TestCase.java 2013-07-11 12:37:03 UTC (rev 17767)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3TestCase.java 2013-07-11 16:19:17 UTC (rev 17768)
@@ -42,4 +42,9 @@
{
return new ExceptionEJB3Helper("http://" + getServerHost() + ":8080/jaxws-samples-exception/ExceptionEndpointEJB3Impl");
}
+
+ protected SOAP12ExceptionHelper getSOAP12Helper()
+ {
+ return new SOAP12ExceptionEJB3Helper("http://" + getServerHost() + ":8080/jaxws-samples-exception/SOAP12ExceptionEndpointEJB3Impl");
+ }
}
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionHelper.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionHelper.java 2013-07-11 12:37:03 UTC (rev 17767)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionHelper.java 2013-07-11 16:19:17 UTC (rev 17768)
@@ -99,8 +99,8 @@
{
assertEquals("THIS IS A FAULT STRING!", e.getFault().getFaultString());
assertEquals("mr.actor", e.getFault().getFaultActor());
- assertEquals("FooCode", e.getFault().getFaultCodeAsName().getLocalName());
- assertEquals("http://foo", e.getFault().getFaultCodeAsName().getURI());
+ assertEquals("VersionMismatch", e.getFault().getFaultCodeAsName().getLocalName());
+ assertEquals("http://www.w3.org/2003/05/soap-envelope", e.getFault().getFaultCodeAsName().getURI());
assertEquals("test", ((Element)e.getFault().getDetail().getChildElements().next()).getLocalName());
}
}
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java 2013-07-11 12:37:03 UTC (rev 17767)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java 2013-07-11 16:19:17 UTC (rev 17768)
@@ -52,6 +52,21 @@
assertEquals("1", runTestInContainer("testApplicationException"));
}
+ public void testRuntimeExceptionSOAP12() throws Exception
+ {
+ assertEquals("1", runTestInContainerSOAP12("testRuntimeException"));
+ }
+
+ public void testSoapFaultExceptionSOAP12() throws Exception
+ {
+ assertEquals("1", runTestInContainerSOAP12("testSoapFaultException"));
+ }
+
+ public void testApplicationExceptionSOAP12() throws Exception
+ {
+ assertEquals("1", runTestInContainerSOAP12("testApplicationException"));
+ }
+
private String runTestInContainer(String test) throws Exception
{
URL url = new URL("http://" + getServerHost()
@@ -60,4 +75,13 @@
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
return br.readLine();
}
+
+ private String runTestInContainerSOAP12(String test) throws Exception
+ {
+ URL url = new URL("http://" + getServerHost()
+ + ":8080/jaxws-samples-exception-client?path=/jaxws-samples-exception-jse/SOAP12ExceptionEndpointService&method=" + test
+ + "&helper=" + SOAP12ExceptionHelper.class.getName());
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ return br.readLine();
+ }
}
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java 2013-07-11 12:37:03 UTC (rev 17767)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java 2013-07-11 16:19:17 UTC (rev 17768)
@@ -21,6 +21,9 @@
*/
package org.jboss.test.ws.jaxws.samples.exception;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+
import junit.framework.Test;
import org.jboss.wsf.test.JBossWSTest;
@@ -46,7 +49,7 @@
}
catch (Exception e)
{
- fail(e.getMessage());
+ fail(e);
}
}
@@ -58,7 +61,7 @@
}
catch (Exception e)
{
- fail(e.getMessage());
+ fail(e);
}
}
@@ -70,12 +73,61 @@
}
catch (Exception e)
{
- fail(e.getMessage());
+ fail(e);
}
}
+ public void testSOAP12RuntimeException() throws Exception
+ {
+ try
+ {
+ getSOAP12Helper().testRuntimeException();
+ }
+ catch (Exception e)
+ {
+ fail(e);
+ }
+ }
+
+ public void testSOAP12SoapFaultException() throws Exception
+ {
+ try
+ {
+ getSOAP12Helper().testSoapFaultException();
+ }
+ catch (Exception e)
+ {
+ fail(e);
+ }
+ }
+
+ public void testSOAP12ApplicationException() throws Exception
+ {
+ try
+ {
+ getSOAP12Helper().testApplicationException();
+ }
+ catch (Exception e)
+ {
+ fail(e);
+ }
+ }
+
+ private static void fail(Exception e) {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ PrintStream ps = new PrintStream(bos);
+ e.printStackTrace(ps);
+ fail(bos.toString());
+ ps.close();
+ }
+
protected ExceptionHelper getHelper()
{
return new ExceptionHelper("http://" + getServerHost() + ":8080/jaxws-samples-exception-jse/ExceptionEndpointService");
}
+
+ protected SOAP12ExceptionHelper getSOAP12Helper()
+ {
+ return new SOAP12ExceptionHelper("http://" + getServerHost() + ":8080/jaxws-samples-exception-jse/SOAP12ExceptionEndpointService");
+ }
}
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/SOAP12ExceptionEJB3Helper.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/SOAP12ExceptionEJB3Helper.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/SOAP12ExceptionEJB3Helper.java 2013-07-11 16:19:17 UTC (rev 17768)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.exception;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.jboss.test.ws.jaxws.samples.exception.client.ExceptionEndpoint;
+
+public class SOAP12ExceptionEJB3Helper extends SOAP12ExceptionHelper
+{
+ public SOAP12ExceptionEJB3Helper(String targetEndpoint)
+ {
+ super(targetEndpoint);
+ }
+
+ public SOAP12ExceptionEJB3Helper()
+ {
+ super();
+ }
+
+ protected ExceptionEndpoint getProxy() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "SOAP12ExceptionEndpointEJB3ImplService");
+ URL wsdlURL = new URL(targetEndpoint + "?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ return service.getPort(ExceptionEndpoint.class);
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/SOAP12ExceptionHelper.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/SOAP12ExceptionHelper.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/SOAP12ExceptionHelper.java 2013-07-11 16:19:17 UTC (rev 17768)
@@ -0,0 +1,153 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.exception;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import org.jboss.test.helper.ClientHelper;
+import org.jboss.test.ws.jaxws.samples.exception.client.ExceptionEndpoint;
+import org.jboss.test.ws.jaxws.samples.exception.client.UserException;
+import org.jboss.test.ws.jaxws.samples.exception.client.UserException_Exception;
+import org.w3c.dom.Element;
+
+public class SOAP12ExceptionHelper implements ClientHelper
+{
+ protected String targetEndpoint;
+ protected String targetNS = "http://server.exception.samples.jaxws.ws.test.jboss.org/";
+
+ public SOAP12ExceptionHelper(String targetEndpoint)
+ {
+ this.targetEndpoint = targetEndpoint;
+ }
+
+ public SOAP12ExceptionHelper()
+ {
+ //NOOP
+ }
+
+ protected ExceptionEndpoint getProxy() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "SOAP12ExceptionEndpointImplService");
+ URL wsdlURL = new URL(targetEndpoint + "?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ return service.getPort(ExceptionEndpoint.class);
+ }
+
+ /*
+ * 10.2.2.3
+ *
+ * faultcode (Subcode in SOAP 1.2, Code set to env:Receiver)
+ * 1. SOAPFaultException.getFault().getFaultCodeAsQName()
+ * 2. env:Server (Subcode omitted for SOAP 1.2).
+ * faultstring (Reason/Text)
+ * 1. SOAPFaultException.getFault().getFaultString()
+ * 2. Exception.getMessage()
+ * 3. Exception.toString()
+ * faultactor (Role in SOAP 1.2)
+ * 1. SOAPFaultException.getFault().getFaultActor()
+ * 2. Empty
+ * detail (Detail in SOAP 1.2)
+ * 1. Serialized service specific exception (see WrapperException.getFaultInfo() in section 2.5)
+ * 2. SOAPFaultException.getFault().getDetail()
+ */
+ public void testRuntimeException() throws Exception
+ {
+ try
+ {
+ getProxy().throwRuntimeException();
+ fail("Expected SOAPFaultException");
+ }
+ catch (SOAPFaultException e)
+ {
+ String faultString = e.getFault().getFaultString();
+ assertTrue(faultString.indexOf("oh no, a runtime exception occured.") >= 0);
+ }
+ }
+
+ public void testSoapFaultException() throws Exception
+ {
+ try
+ {
+ getProxy().throwSoapFaultException();
+ fail("Expected SOAPFaultException");
+ }
+ catch (SOAPFaultException e)
+ {
+ assertEquals("this is a fault string!", e.getFault().getFaultString());
+ assertEquals("mr.actor", e.getFault().getFaultActor());
+ assertEquals("VersionMismatch", e.getFault().getFaultCodeAsName().getLocalName());
+ assertEquals("http://www.w3.org/2003/05/soap-envelope", e.getFault().getFaultCodeAsName().getURI());
+ final QName subcode = (QName)e.getFault().getFaultSubcodes().next();
+ assertEquals("http://ws.gss.redhat.com/", subcode.getNamespaceURI());
+ assertEquals("NullPointerException", subcode.getLocalPart());
+ assertEquals("test", ((Element)e.getFault().getDetail().getChildElements().next()).getLocalName());
+ }
+ }
+
+ public void testApplicationException() throws Exception
+ {
+ try
+ {
+ getProxy().throwApplicationException();
+ fail("Expected UserException");
+ }
+ catch (UserException_Exception e)
+ {
+ UserException ue = e.getFaultInfo();
+ assertEquals("Some validation error", ue.getMessage());
+ assertEquals("validation", ue.getErrorCategory());
+ assertEquals(123, ue.getErrorCode());
+ }
+ }
+
+ private static void fail(String s) throws Exception
+ {
+ throw new Exception(s);
+ }
+
+ private static void assertEquals(Object exp, Object actual) throws Exception
+ {
+ if (!(exp.equals(actual)))
+ {
+ throw new Exception("Expected #" + exp + "# but was #" + actual + "#");
+ }
+ }
+
+ private static void assertTrue(boolean actual) throws Exception
+ {
+ if (!(actual))
+ {
+ throw new Exception("Expected true");
+ }
+ }
+
+ @Override
+ public void setTargetEndpoint(String address)
+ {
+ targetEndpoint = address;
+ }
+}
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/EndpointImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/EndpointImpl.java 2013-07-11 12:37:03 UTC (rev 17767)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/EndpointImpl.java 2013-07-11 16:19:17 UTC (rev 17768)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.ws.jaxws.samples.exception.server;
-import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPConstants;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFactory;
import javax.xml.soap.SOAPFault;
@@ -40,7 +40,7 @@
try
{
SOAPFactory factory = SOAPFactory.newInstance();
- SOAPFault fault = factory.createFault("this is a fault string!", new QName("http://foo", "FooCode"));
+ SOAPFault fault = factory.createFault("this is a fault string!", SOAPConstants.SOAP_VERSIONMISMATCH_FAULT);
fault.setFaultActor("mr.actor");
fault.addDetail().addChildElement("test");
throw new SOAPFaultException(fault);
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/SOAP12EndpointImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/SOAP12EndpointImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/SOAP12EndpointImpl.java 2013-07-11 16:19:17 UTC (rev 17768)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.exception.server;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPConstants;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPFault;
+import javax.xml.ws.soap.SOAPFaultException;
+
+public class SOAP12EndpointImpl extends EndpointImpl
+{
+ public void throwSoapFaultException()
+ {
+ // This should be thrown as-is
+ try
+ {
+ SOAPFactory factory = SOAPFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
+ SOAPFault fault = factory.createFault("this is a fault string!", SOAPConstants.SOAP_VERSIONMISMATCH_FAULT);
+ fault.setFaultActor("mr.actor");
+ fault.appendFaultSubcode(new QName("http://ws.gss.redhat.com/", "NullPointerException"));
+ fault.addDetail().addChildElement("test");
+ throw new SOAPFaultException(fault);
+ }
+ catch (SOAPException s)
+ {
+ throw new RuntimeException(s);
+ }
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/SOAP12ExceptionEndpointEJB3Impl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/SOAP12ExceptionEndpointEJB3Impl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/SOAP12ExceptionEndpointEJB3Impl.java 2013-07-11 16:19:17 UTC (rev 17768)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.exception.server;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.soap.SOAPBinding;
+
+@Stateless
+@WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.exception.server.ExceptionEndpoint")
+(a)BindingType(SOAPBinding.SOAP12HTTP_BINDING)
+public class SOAP12ExceptionEndpointEJB3Impl extends SOAP12EndpointImpl implements ExceptionEndpoint
+{
+
+}
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/SOAP12ExceptionEndpointImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/SOAP12ExceptionEndpointImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/exception/server/SOAP12ExceptionEndpointImpl.java 2013-07-11 16:19:17 UTC (rev 17768)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.exception.server;
+
+import javax.jws.WebService;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.soap.SOAPBinding;
+
+@WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.exception.server.ExceptionEndpoint")
+(a)BindingType(SOAPBinding.SOAP12HTTP_BINDING)
+public class SOAP12ExceptionEndpointImpl extends SOAP12EndpointImpl implements ExceptionEndpoint
+{
+
+}
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/samples/exception/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/samples/exception/WEB-INF/web.xml 2013-07-11 12:37:03 UTC (rev 17767)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/samples/exception/WEB-INF/web.xml 2013-07-11 16:19:17 UTC (rev 17768)
@@ -9,9 +9,17 @@
<servlet-name>ExceptionEndpointService</servlet-name>
<servlet-class>org.jboss.test.ws.jaxws.samples.exception.server.ExceptionEndpointImpl</servlet-class>
</servlet>
+ <servlet>
+ <servlet-name>SOAP12ExceptionEndpointService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.samples.exception.server.SOAP12ExceptionEndpointImpl</servlet-class>
+ </servlet>
<servlet-mapping>
<servlet-name>ExceptionEndpointService</servlet-name>
<url-pattern>/ExceptionEndpointService</url-pattern>
</servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>SOAP12ExceptionEndpointService</servlet-name>
+ <url-pattern>/SOAP12ExceptionEndpointService</url-pattern>
+ </servlet-mapping>
</web-app>
11 years, 5 months
JBossWS SVN: r17767 - projects/wsi-bp-test/trunk.
by jbossws-commits@lists.jboss.org
Author: rsvoboda(a)redhat.com
Date: 2013-07-11 08:37:03 -0400 (Thu, 11 Jul 2013)
New Revision: 17767
Modified:
projects/wsi-bp-test/trunk/pom.xml
Log:
removing dependencies on jbossws-cxf-server and wss4j, necessary dependencies should be available in jbossws-cxf-client, discussed with Jim via email
Modified: projects/wsi-bp-test/trunk/pom.xml
===================================================================
--- projects/wsi-bp-test/trunk/pom.xml 2013-07-11 10:01:21 UTC (rev 17766)
+++ projects/wsi-bp-test/trunk/pom.xml 2013-07-11 12:37:03 UTC (rev 17767)
@@ -64,24 +64,6 @@
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
- <artifactId>jbossws-cxf-server</artifactId>
- <version>${jbossws.cxf.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.ws.security</groupId>
- <artifactId>wss4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.apache.ws.security</groupId>
- <artifactId>wss4j</artifactId>
- <version>1.6.11-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
<version>${jbossws.cxf.version}</version>
</dependency>
11 years, 5 months