JBossWS SVN: r14468 - spi/branches.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-06-04 06:37:17 -0400 (Sat, 04 Jun 2011)
New Revision: 14468
Added:
spi/branches/JBWS-3286/
Log:
Create JBWS-3286 workspace
13 years, 6 months
JBossWS SVN: r14467 - stack/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-06-04 06:35:24 -0400 (Sat, 04 Jun 2011)
New Revision: 14467
Added:
stack/cxf/branches/JBWS-3286/
Log:
Create JBWS-3286 workspace
13 years, 6 months
JBossWS SVN: r14466 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-06-03 11:54:11 -0400 (Fri, 03 Jun 2011)
New Revision: 14466
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3306] excluding test
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-06-03 15:31:05 UTC (rev 14465)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-06-03 15:54:11 UTC (rev 14466)
@@ -1058,6 +1058,9 @@
<!-- # [JBWS-2941] HTTP Proxy authentication for JBossWS Web Service clients -->
<exclude>org/jboss/test/ws/jaxws/cxf/httpproxy/**</exclude>
+ <!-- # [JBWS-3306] No XPathFactory implementation found by a JAXWS client on AS7 -->
+ <exclude>org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase*</exclude>
+
<!-- JAXR not available -->
<exclude>org/jboss/test/ws/jaxws/samples/jaxr/**</exclude>
13 years, 6 months
JBossWS SVN: r14465 - in shared-testsuite/trunk/testsuite/src/test: java/org/jboss/test/helper and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-06-03 11:31:05 -0400 (Fri, 03 Jun 2011)
New Revision: 14465
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/helper/ClientHelper.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/helper/TestServlet.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3Helper.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionHelper.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3TestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java
Log:
[JBWS-3306] Adding testcase
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml 2011-06-03 14:20:11 UTC (rev 14464)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-samples-jaxws.xml 2011-06-03 15:31:05 UTC (rev 14465)
@@ -103,6 +103,14 @@
<include name="org/jboss/test/ws/jaxws/samples/exception/server/jaxws-handlers-server.xml"/>
</fileset>
</jar>
+ <war warfile="${tests.output.dir}/test-libs/jaxws-samples-exception-client.war" needxmlfile='false'>
+ <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/helper/ClientHelper.class"/>
+ <include name="org/jboss/test/helper/TestServlet.class"/>
+ </classes>
+ </war>
<!-- jaxws-samples-handlerchain -->
<war warfile="${tests.output.dir}/test-libs/jaxws-samples-handlerchain.war" webxml="${tests.output.dir}/test-resources/jaxws/samples/handlerchain/WEB-INF/web.xml">
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/helper/ClientHelper.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/helper/ClientHelper.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/helper/ClientHelper.java 2011-06-03 15:31:05 UTC (rev 14465)
@@ -0,0 +1,27 @@
+/*
+ * 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.helper;
+
+public interface ClientHelper
+{
+ public void setTargetEndpoint(String address);
+}
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/helper/TestServlet.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/helper/TestServlet.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/helper/TestServlet.java 2011-06-03 15:31:05 UTC (rev 14465)
@@ -0,0 +1,136 @@
+/*
+ * 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.helper;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 01-Apr-2011
+ *
+ */
+@WebServlet(name = "TestServlet", urlPatterns = "/*")
+public class TestServlet extends HttpServlet
+{
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ String helperClassName = req.getParameter("helper");
+ if (helperClassName == null || helperClassName.length() == 0)
+ throw new ServletException("helper not specified!");
+ String path = req.getParameter("path");
+ if (path == null || path.length() == 0)
+ throw new ServletException("path not specified!");
+ try
+ {
+ ClientHelper helper = (ClientHelper) Class.forName(helperClassName).newInstance();
+ helper.setTargetEndpoint("http://" + System.getProperty("jboss.bind.address", "localhost") + ":8080" + path);
+ List<String> failedTests = new LinkedList<String>();
+ List<String> errorTests = new LinkedList<String>();
+ Method[] methods = helper.getClass().getMethods();
+ String methodName = req.getParameter("method");
+ int testsRun = 0;
+ if (methodName != null && methodName.length() > 0)
+ {
+ Method m = null;
+ m = helper.getClass().getMethod(methodName);
+ testsRun++;
+ invokeMethod(m, helper, failedTests, errorTests);
+ }
+ else
+ {
+ for (Method m : methods)
+ {
+ if (m.getName().startsWith("test") && m.getParameterTypes().length == 0
+ && m.getReturnType().equals(boolean.class))
+ {
+ testsRun++;
+ invokeMethod(m, helper, failedTests, errorTests);
+ }
+ }
+ }
+ if (failedTests.isEmpty() && errorTests.isEmpty())
+ {
+ res.getWriter().print(testsRun);
+ }
+ else
+ {
+ PrintWriter w = res.getWriter();
+ w.print("# Failed tests: ");
+ for (Iterator<String> it = failedTests.iterator(); it.hasNext();)
+ {
+ w.print(it.next());
+ if (it.hasNext())
+ w.print(", ");
+ }
+ res.getWriter().print(" # Error tests: ");
+ for (Iterator<String> it = errorTests.iterator(); it.hasNext();)
+ {
+ w.print(it.next());
+ if (it.hasNext())
+ w.print(", ");
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ throw new ServletException(e);
+ }
+ }
+
+ private void invokeMethod(Method m, ClientHelper helper, List<String> failedTests, List<String> errorTests) throws ServletException
+ {
+ try
+ {
+ Object obj = m.invoke(helper);
+ if (obj != null && !(Boolean)obj)
+ {
+ failedTests.add(m.getName());
+ }
+ }
+ catch (InvocationTargetException e)
+ {
+ Throwable thrownException = e.getTargetException();
+ errorTests.add(m.getName() + ": " + thrownException.getClass().getName() + " " + thrownException.getMessage());
+ thrownException.printStackTrace();
+ }
+ catch (Exception e)
+ {
+ throw new ServletException(e);
+ }
+ }
+}
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3Helper.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3Helper.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3Helper.java 2011-06-03 15:31:05 UTC (rev 14465)
@@ -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 ExceptionEJB3Helper extends ExceptionHelper
+{
+ public ExceptionEJB3Helper(String targetEndpoint)
+ {
+ super(targetEndpoint);
+ }
+
+ public ExceptionEJB3Helper()
+ {
+ super();
+ }
+
+ protected ExceptionEndpoint getProxy() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "ExceptionEndpointEJB3ImplService");
+ URL wsdlURL = new URL(targetEndpoint + "?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ return service.getPort(ExceptionEndpoint.class);
+ }
+}
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3TestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3TestCase.java 2011-06-03 14:20:11 UTC (rev 14464)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionEJB3TestCase.java 2011-06-03 15:31:05 UTC (rev 14465)
@@ -21,14 +21,8 @@
*/
package org.jboss.test.ws.jaxws.samples.exception;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
import junit.framework.Test;
-import org.jboss.test.ws.jaxws.samples.exception.client.ExceptionEndpoint;
import org.jboss.wsf.test.JBossWSTestSetup;
/**
@@ -44,13 +38,8 @@
return new JBossWSTestSetup(ExceptionEJB3TestCase.class, "jaxws-samples-exception.jar");
}
- @Override
- protected ExceptionEndpoint getProxy() throws Exception
+ protected ExceptionHelper getHelper()
{
- QName serviceName = new QName(targetNS, "ExceptionEndpointEJB3ImplService");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-exception/ExceptionEndpointEJB3Impl?wsdl");
-
- Service service = Service.create(wsdlURL, serviceName);
- return service.getPort(ExceptionEndpoint.class);
+ return new ExceptionEJB3Helper("http://" + getServerHost() + ":8080/jaxws-samples-exception/ExceptionEndpointEJB3Impl");
}
}
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionHelper.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionHelper.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionHelper.java 2011-06-03 15:31:05 UTC (rev 14465)
@@ -0,0 +1,150 @@
+/*
+ * 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 ExceptionHelper implements ClientHelper
+{
+ protected String targetEndpoint;
+ protected String targetNS = "http://server.exception.samples.jaxws.ws.test.jboss.org/";
+
+ public ExceptionHelper(String targetEndpoint)
+ {
+ this.targetEndpoint = targetEndpoint;
+ }
+
+ public ExceptionHelper()
+ {
+ //NOOP
+ }
+
+ protected ExceptionEndpoint getProxy() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "ExceptionEndpointImplService");
+ 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("FooCode", e.getFault().getFaultCodeAsName().getLocalName());
+ assertEquals("http://foo", e.getFault().getFaultCodeAsName().getURI());
+ 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;
+ }
+}
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionServletTestCase.java 2011-06-03 15:31:05 UTC (rev 14465)
@@ -0,0 +1,63 @@
+/*
+ * 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.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+public class ExceptionServletTestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(ExceptionServletTestCase.class, "jaxws-samples-exception.war, jaxws-samples-exception-client.war");
+ }
+
+ public void testRuntimeException() throws Exception
+ {
+ assertEquals("1", runTestInContainer("testRuntimeException"));
+ }
+
+ public void testSoapFaultException() throws Exception
+ {
+ assertEquals("1", runTestInContainer("testSoapFaultException"));
+ }
+
+ public void testApplicationException() throws Exception
+ {
+ assertEquals("1", runTestInContainer("testApplicationException"));
+ }
+
+ private String runTestInContainer(String test) throws Exception
+ {
+ URL url = new URL("http://" + getServerHost()
+ + ":8080/jaxws-samples-exception-client?path=/jaxws-samples-exception/ExceptionEndpointService&method=" + test
+ + "&helper=" + ExceptionHelper.class.getName());
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ return br.readLine();
+ }
+}
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java 2011-06-03 14:20:11 UTC (rev 14464)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/exception/ExceptionTestCase.java 2011-06-03 15:31:05 UTC (rev 14465)
@@ -21,20 +21,10 @@
*/
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 junit.framework.Test;
-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.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
-import org.w3c.dom.Element;
/**
* Test JAX-WS exception handling
@@ -43,50 +33,20 @@
*/
public class ExceptionTestCase extends JBossWSTest
{
- protected String targetNS = "http://server.exception.samples.jaxws.ws.test.jboss.org/";
-
public static Test suite()
{
return new JBossWSTestSetup(ExceptionTestCase.class, "jaxws-samples-exception.war");
}
- protected ExceptionEndpoint getProxy() throws Exception
- {
- QName serviceName = new QName(targetNS, "ExceptionEndpointImplService");
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-samples-exception/ExceptionEndpointService?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");
+ getHelper().testRuntimeException();
}
- catch (SOAPFaultException e)
+ catch (Exception e)
{
- String faultString = e.getFault().getFaultString();
- assertTrue(faultString.indexOf("OH NO, A RUNTIME EXCEPTION OCCURED.") >= 0);
+ fail(e.getMessage());
}
}
@@ -94,16 +54,11 @@
{
try
{
- getProxy().throwSoapFaultException();
- fail("Expected SOAPFaultException");
+ getHelper().testSoapFaultException();
}
- catch (SOAPFaultException e)
+ catch (Exception e)
{
- 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("test", ((Element)e.getFault().getDetail().getChildElements().next()).getLocalName());
+ fail(e.getMessage());
}
}
@@ -111,15 +66,16 @@
{
try
{
- getProxy().throwApplicationException();
- fail("Expected UserException");
+ getHelper().testApplicationException();
}
- catch (UserException_Exception e)
+ catch (Exception e)
{
- UserException ue = e.getFaultInfo();
- assertEquals("SOME VALIDATION ERROR", ue.getMessage());
- assertEquals("validation", ue.getErrorCategory());
- assertEquals(123, ue.getErrorCode());
+ fail(e.getMessage());
}
}
+
+ protected ExceptionHelper getHelper()
+ {
+ return new ExceptionHelper("http://" + getServerHost() + ":8080/jaxws-samples-exception/ExceptionEndpointService");
+ }
}
13 years, 6 months
JBossWS SVN: r14464 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-06-03 10:20:11 -0400 (Fri, 03 Jun 2011)
New Revision: 14464
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
updating excludes
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-06-03 13:50:20 UTC (rev 14463)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-06-03 14:20:11 UTC (rev 14464)
@@ -989,16 +989,12 @@
<!-- EJB3 endpoint deployments -->
<exclude>org/jboss/test/ws/jaxws/jbws1283/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1446/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1556/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1566/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1581/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1694/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1799/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1813/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1815/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1822/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1841/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1845/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1872/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws2074/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws2218/**</exclude>
13 years, 6 months
JBossWS SVN: r14463 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-06-03 09:50:20 -0400 (Fri, 03 Jun 2011)
New Revision: 14463
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
updating test excludes
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2011-06-03 13:49:44 UTC (rev 14462)
+++ stack/native/trunk/modules/testsuite/pom.xml 2011-06-03 13:50:20 UTC (rev 14463)
@@ -791,24 +791,19 @@
<exclude>org/jboss/test/ws/jaxws/samples/webservicerefsec/**</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/securityDomain/**</exclude>
- <!-- EJB3 Ann driven deployments -->
- <exclude>org/jboss/test/ws/jaxws/jbws1991/**</exclude> <!-- TODO: implement EJB security integration -->
- <exclude>org/jboss/test/ws/jaxws/jbws3026/**</exclude> <!-- F Failed to determine resource binding value for BindingDescription -->
+ <!-- TODO: implement EJB security integration -->
+ <exclude>org/jboss/test/ws/jaxws/jbws1991/**</exclude>
- <!-- EAR deployment is freezing -->
- <exclude>org/jboss/test/ws/jaxws/jbws1556/**</exclude>
+ <!-- TODO: Unexpected element 'class-loading' encountered -->
<exclude>org/jboss/test/ws/jaxws/jbws1581/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1813/**</exclude>
+
+ <!-- TODO: Classpath visibility issues - investigate -->
<exclude>org/jboss/test/ws/jaxws/jbws1822/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws3026/**</exclude>
- <!-- EJB3 support for @Remote views not yet implemented -->
- <exclude>org/jboss/test/ws/jaxws/jbws1845/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1283/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1694/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1799/**</exclude>
-
- <!-- EJB3 DD driven deployments -->
+ <!-- TODO: EJB3 DD driven deployments -->
<exclude>org/jboss/test/ws/jaxws/jbws1309/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws1813/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1841/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws2011/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws2074/**</exclude>
13 years, 6 months
JBossWS SVN: r14461 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-06-03 09:46:38 -0400 (Fri, 03 Jun 2011)
New Revision: 14461
Modified:
stack/cxf/trunk/pom.xml
Log:
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2011-06-01 04:50:06 UTC (rev 14460)
+++ stack/cxf/trunk/pom.xml 2011-06-03 13:46:38 UTC (rev 14461)
@@ -17,6 +17,7 @@
<artifactId>jbossws-cxf</artifactId>
<packaging>pom</packaging>
<description>JBossWS CXF stack</description>
+
<version>4.0.0-SNAPSHOT</version>
13 years, 6 months
JBossWS SVN: r14460 - spi/trunk/src/main/resources/schema.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-06-01 00:50:06 -0400 (Wed, 01 Jun 2011)
New Revision: 14460
Modified:
spi/trunk/src/main/resources/schema/jbossws-jaxws-config_4_0.xsd
Log:
Correct the schema
Modified: spi/trunk/src/main/resources/schema/jbossws-jaxws-config_4_0.xsd
===================================================================
--- spi/trunk/src/main/resources/schema/jbossws-jaxws-config_4_0.xsd 2011-06-01 02:26:06 UTC (rev 14459)
+++ spi/trunk/src/main/resources/schema/jbossws-jaxws-config_4_0.xsd 2011-06-01 04:50:06 UTC (rev 14460)
@@ -45,7 +45,7 @@
<xsd:element name="config-name" type="xsd:string"/>
<xsd:element name="pre-handler-chains" type="javaee:handler-chainsType" minOccurs="0"/>
<xsd:element name="post-handler-chains" type="javaee:handler-chainsType" minOccurs="0"/>
- <xsd:element name="feature" type="tns:featureType"" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="feature" type="tns:featureType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="property" type="tns:propertyType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
@@ -53,7 +53,7 @@
<xsd:complexType name="featureType">
<xsd:sequence>
<xsd:element name="feature-name" type="xsd:string"/>
- <xsd:element name="feature-data" type="xsd:any" minOccurs="0"/>
+ <xsd:element name="feature-data" type="xsd:anyType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
13 years, 6 months
JBossWS SVN: r14459 - stack/native/tags/jbossws-native-2.0.1.SP2_CP10.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-05-31 22:26:06 -0400 (Tue, 31 May 2011)
New Revision: 14459
Modified:
stack/native/tags/jbossws-native-2.0.1.SP2_CP10/version.properties
Log:
[JBPAPP-5507]:Update the version number
Modified: stack/native/tags/jbossws-native-2.0.1.SP2_CP10/version.properties
===================================================================
--- stack/native/tags/jbossws-native-2.0.1.SP2_CP10/version.properties 2011-06-01 02:15:44 UTC (rev 14458)
+++ stack/native/tags/jbossws-native-2.0.1.SP2_CP10/version.properties 2011-06-01 02:26:06 UTC (rev 14459)
@@ -6,8 +6,8 @@
specification.vendor=JBoss (http://www.jboss.org)
specification.version=jbossws-2.0
-version.id=2.0.1.SP2_CP-SNAPSHOT
-repository.id=2.0.1.SP2_CP-SNAPSHOT
+version.id=2.0.1.SP2_CP10
+repository.id=2.0.1.SP2_CP10
implementation.title=JBoss Web Services - Native
implementation.url=http://www.jboss.org/products/jbossws
@@ -25,9 +25,9 @@
wscommons-policy=1.0
# Dependend integration projects
-jbossws-spi=1.0.0.GA_CP02-brew
+jbossws-spi=1.0.0.GA_CP03-brew
jbossws-common=1.0.0.GA_CP06-brew
-jbossws-framework=2.0.1.GA_CP05-brew
+jbossws-framework=2.0.1.GA_CP06-brew
jbossws-jboss40=2.0.1.GA
jbossws-jboss42=2.0.1.GA_CP01
13 years, 6 months
JBossWS SVN: r14458 - stack/native/tags.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-05-31 22:15:44 -0400 (Tue, 31 May 2011)
New Revision: 14458
Added:
stack/native/tags/jbossws-native-2.0.1.SP2_CP10/
Log:
[JBPAPP-5507]:Tag jbossws-native-2.0.1.SP2_CP10
13 years, 6 months