JBossWS SVN: r12950 - in stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws: jbws3124 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: sergeyb
Date: 2010-09-10 06:50:41 -0400 (Fri, 10 Sep 2010)
New Revision: 12950
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3124/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3124/JBWS3124TestCase.java
Log:
[JBWS-3124] : Adding a Native specific version of JBWS2942TestCase
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3124/JBWS3124TestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3124/JBWS3124TestCase.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3124/JBWS3124TestCase.java 2010-09-10 10:50:41 UTC (rev 12950)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3124;
+
+import java.io.StringReader;
+
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.EndpointReference;
+
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * [JBWS-2942] Do not add empty Metadata tag to EndpointReference.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class JBWS3124TestCase extends JBossWSTest
+{
+ private static final String XML_SOURCE = "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\n" +
+ "<EndpointReference xmlns='http://www.w3.org/2005/08/addressing'>\n" +
+ " <Address>http://localhost:8080/jaxws-endpointReference</Address>\n" +
+ " <Metadata/>\n" +
+ "</EndpointReference>\n";
+
+ public void testToString() throws Exception
+ {
+ assertTrue("Lost empty <Metadata/>", this.getXML(XML_SOURCE).indexOf("<Metadata") != -1);
+ StreamSource source = new StreamSource(new StringReader(XML_SOURCE));
+ EndpointReference epRef = EndpointReference.readFrom(source);
+ assertTrue("Empty <Metadata/> serialized", epRef.toString().indexOf("<Metadata") == -1);
+ }
+
+ private String getXML(final String s) throws Exception
+ {
+ return DOMUtils.node2String(DOMUtils.parse(s));
+ }
+}
Property changes on: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3124/JBWS3124TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
15 years, 8 months
JBossWS SVN: r12949 - in framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws: jbws2942 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: sergeyb
Date: 2010-09-10 06:49:26 -0400 (Fri, 10 Sep 2010)
New Revision: 12949
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2942/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2942/JBWS2942TestCase.java
Removed:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2942/JBWS2942TestCase.java
Log:
[JBWS-3124] Restoring JBWS2942TestCase but removing toString test
Copied: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2942 (from rev 12943, framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2942)
Deleted: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2942/JBWS2942TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2942/JBWS2942TestCase.java 2010-09-09 15:54:01 UTC (rev 12943)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2942/JBWS2942TestCase.java 2010-09-10 10:49:26 UTC (rev 12949)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.jbws2942;
-
-import java.io.StringReader;
-import java.io.StringWriter;
-
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
-
-import org.jboss.wsf.common.DOMUtils;
-import org.jboss.wsf.test.JBossWSTest;
-
-/**
- * [JBWS-2942] Do not add empty Metadata tag to EndpointReference.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class JBWS2942TestCase extends JBossWSTest
-{
- private static final String XML_SOURCE = "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>\n" +
- "<EndpointReference xmlns='http://www.w3.org/2005/08/addressing'>\n" +
- " <Address>http://localhost:8080/jaxws-endpointReference</Address>\n" +
- " <Metadata/>\n" +
- "</EndpointReference>\n";
-
- public void testToString() throws Exception
- {
- assertTrue("Lost empty <Metadata/>", this.getXML(XML_SOURCE).indexOf("<Metadata") != -1);
- StreamSource source = new StreamSource(new StringReader(XML_SOURCE));
- EndpointReference epRef = EndpointReference.readFrom(source);
- assertTrue("Empty <Metadata/> serialized", epRef.toString().indexOf("<Metadata") == -1);
- }
-
-
- public void testEmptyMetadataDropped()
- {
- W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
- builder.address("http://bar");
- W3CEndpointReference epr = builder.build();
- StringWriter writer = new StringWriter();
- epr.writeTo(new StreamResult(writer));
- String eprString = writer.toString();
- assertTrue(eprString.contains("EndpointReference"));
- assertTrue(eprString.contains("Address"));
- assertFalse(eprString.contains("Metadata"));
- }
-
- private String getXML(final String s) throws Exception
- {
- return DOMUtils.node2String(DOMUtils.parse(s));
- }
-}
Copied: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2942/JBWS2942TestCase.java (from rev 12943, framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2942/JBWS2942TestCase.java)
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2942/JBWS2942TestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2942/JBWS2942TestCase.java 2010-09-10 10:49:26 UTC (rev 12949)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws2942;
+
+import java.io.StringWriter;
+
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * [JBWS-2942] Do not add empty Metadata tag to EndpointReference.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class JBWS2942TestCase extends JBossWSTest
+{
+
+ public void testEmptyMetadataDropped()
+ {
+ W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder.address("http://bar");
+ W3CEndpointReference epr = builder.build();
+ StringWriter writer = new StringWriter();
+ epr.writeTo(new StreamResult(writer));
+ String eprString = writer.toString();
+ assertTrue(eprString.contains("EndpointReference"));
+ assertTrue(eprString.contains("Address"));
+ assertFalse(eprString.contains("Metadata"));
+ }
+
+}
15 years, 8 months
JBossWS SVN: r12948 - in framework/trunk/testsuite/test: java/org/jboss/test/ws/jaxws and 8 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-09-10 06:04:53 -0400 (Fri, 10 Sep 2010)
New Revision: 12948
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/EchoBean.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/JBWS3123TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/ServletClient.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/EchoBean.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/EchoService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/ObjectFactory.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/SayHello.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/SayHelloResponse.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/package-info.java
framework/trunk/testsuite/test/resources/jaxws/jbws3123/
framework/trunk/testsuite/test/resources/jaxws/jbws3123/META-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws3123/META-INF/jboss.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3123/META-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/jbws3123/META-INF/wsdl/EchoService.wsdl
framework/trunk/testsuite/test/resources/jaxws/jbws3123/WEB-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws3123/WEB-INF/jboss-web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws3123/WEB-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/jbws3123/WEB-INF/wsdl/EchoService.wsdl
framework/trunk/testsuite/test/resources/jaxws/jbws3123/application.xml
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-3123] providing test case
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-09-09 17:09:02 UTC (rev 12947)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-09-10 10:04:53 UTC (rev 12948)
@@ -1021,6 +1021,43 @@
</webinf>
</war>
+ <!-- jaxws-jbws3123 -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws3123-ejb.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws3123/*.class" />
+ <include name="org/jboss/test/ws/jaxws/jbws3123/generated/*.class" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws3123/ServletClient.class" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws3123/JBWS3123TestCase.class" />
+ </fileset>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/jbws3123/META-INF">
+ <include name="wsdl/**" />
+ <include name="jboss.xml" />
+ </metainf>
+ </jar>
+
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws3123-web.war" needxmlfile="false">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws3123/*.class" />
+ <include name="org/jboss/test/ws/jaxws/jbws3123/generated/*.class" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws3123/EchoBean.class" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws3123/JBWS3123TestCase.class" />
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws3123/WEB-INF">
+ <include name="wsdl/**" />
+ <include name="jboss-web.xml" />
+ </webinf>
+ </war>
+
+ <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws3123.ear">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxws-jbws3123-ejb.jar" />
+ <include name="jaxws-jbws3123-web.war" />
+ </fileset>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/jbws3123">
+ <include name="application.xml" />
+ </metainf>
+ </jar>
+
<!-- jaxws-endpoint-servlet -->
<war warfile="${tests.output.dir}/test-libs/jaxws-endpoint-servlet.war" webxml="${tests.output.dir}/test-resources/jaxws/endpoint/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/EchoBean.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/EchoBean.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/EchoBean.java 2010-09-10 10:04:53 UTC (rev 12948)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3123;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+@Stateless
+@WebService(
+ portName="EchoPort",
+ serviceName="EchoService",
+ targetNamespace="http://Echo.org",
+ wsdlLocation="META-INF/wsdl/EchoService.wsdl",
+ endpointInterface="org.jboss.test.ws.jaxws.jbws3123.generated.EchoBean")
+public class EchoBean {
+ public String sayHello() {
+ return "hello";
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/JBWS3123TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/JBWS3123TestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/JBWS3123TestCase.java 2010-09-10 10:04:53 UTC (rev 12948)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3123;
+
+import java.io.BufferedReader;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLConnection;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+public class JBWS3123TestCase extends JBossWSTest
+{
+
+ private String servletUrl = "http://" + getServerHost() + ":8080/jaxws-jbws3123-web/ServletTest";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS3123TestCase.class, "jaxws-jbws3123.ear");
+ }
+
+ public void testServletWithWebServiceRef() throws Exception
+ {
+ final URL url = new URL(servletUrl);
+ URLConnection urlConn = null;
+ urlConn = this.sendPostData(url);
+ final String result = this.getResponse(urlConn);
+ if (!"hello".equals(result))
+ fail();
+ }
+
+ private URLConnection sendPostData(final URL url) throws IOException
+ {
+ final URLConnection urlConn = url.openConnection();
+ urlConn.setDoOutput(true);
+ urlConn.setDoInput(true);
+ urlConn.setUseCaches(false);
+ final DataOutputStream out = new DataOutputStream(urlConn.getOutputStream());
+ out.writeBytes("say hello");
+ out.flush();
+ out.close();
+ return urlConn;
+ }
+
+ private String getResponse(final URLConnection connection) throws IOException
+ {
+ final BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+ final String result;
+ try
+ {
+ result = in.readLine();
+ }
+ finally
+ {
+ in.close();
+ }
+ return result;
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/ServletClient.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/ServletClient.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/ServletClient.java 2010-09-10 10:04:53 UTC (rev 12948)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3123;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.soap.Addressing;
+
+import org.jboss.test.ws.jaxws.jbws3123.generated.EchoBean;
+import org.jboss.test.ws.jaxws.jbws3123.generated.EchoService;
+
+@SuppressWarnings("serial")
+@WebServlet("/ServletTest")
+public class ServletClient extends HttpServlet
+{
+ @Addressing
+ @WebServiceRef(name = "service/wsejbwsrefandaddrcombtestenabledechoport", type = EchoBean.class, value = EchoService.class)
+ EchoBean enabledEchoPort = null;
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+ if (enabledEchoPort == null)
+ {
+ throw new ServletException("port injection failed");
+ }
+ }
+
+ public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ res.setContentType("text/plain");
+ PrintWriter out = res.getWriter();
+ out.print(enabledEchoPort.sayHello());
+ out.close();
+ }
+
+ public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ this.doGet(req, res);
+ }
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/EchoBean.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/EchoBean.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/EchoBean.java 2010-09-10 10:04:53 UTC (rev 12948)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3123.generated;
+
+import javax.jws.WebMethod;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+/**
+ * This class was generated by Apache CXF 2.3.0-SNAPSHOT
+ * Thu Sep 09 16:04:02 CEST 2010
+ * Generated source version: 2.3.0-SNAPSHOT
+ *
+ */
+
+@WebService(targetNamespace = "http://Echo.org", name = "EchoBean")
+(a)XmlSeeAlso({ObjectFactory.class})
+public interface EchoBean {
+
+ @WebResult(name = "return", targetNamespace = "")
+ @RequestWrapper(localName = "sayHello", targetNamespace = "http://Echo.org", className = "org.jboss.test.ws.jaxws.jbws3123.generated.SayHello")
+ @WebMethod
+ @ResponseWrapper(localName = "sayHelloResponse", targetNamespace = "http://Echo.org", className = "org.jboss.test.ws.jaxws.jbws3123.generated.SayHelloResponse")
+ public java.lang.String sayHello();
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/EchoService.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/EchoService.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/EchoService.java 2010-09-10 10:04:53 UTC (rev 12948)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3123.generated;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.Service;
+
+/**
+ * This class was generated by Apache CXF 2.3.0-SNAPSHOT
+ * Thu Sep 09 16:04:02 CEST 2010
+ * Generated source version: 2.3.0-SNAPSHOT
+ *
+ */
+
+
+@WebServiceClient(name = "EchoService",
+ wsdlLocation = "WEB-INF/wsdl/EchoService.wsdl",
+ targetNamespace = "http://Echo.org")
+public class EchoService extends Service {
+
+ public final static URL WSDL_LOCATION;
+ public final static QName SERVICE = new QName("http://Echo.org", "EchoService");
+ public final static QName EchoPort = new QName("http://Echo.org", "EchoPort");
+ static {
+ URL url = null;
+ try {
+ url = new URL("file:/opt/svn/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/bin/EchoService.wsdl");
+ } catch (MalformedURLException e) {
+ System.err.println("Can not initialize the default wsdl from file:/opt/svn/jbossas/trunk/build/target/jboss-6.0.0-SNAPSHOT/bin/EchoService.wsdl");
+ // e.printStackTrace();
+ }
+ WSDL_LOCATION = url;
+ }
+
+ public EchoService(URL wsdlLocation) {
+ super(wsdlLocation, SERVICE);
+ }
+
+ public EchoService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public EchoService() {
+ super(WSDL_LOCATION, SERVICE);
+ }
+
+ public EchoService(WebServiceFeature ... features) {
+ super(WSDL_LOCATION, SERVICE, features);
+ }
+ public EchoService(URL wsdlLocation, WebServiceFeature ... features) {
+ super(wsdlLocation, SERVICE, features);
+ }
+
+ public EchoService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ /**
+ *
+ * @return
+ * returns EchoBean
+ */
+ @WebEndpoint(name = "EchoPort")
+ public EchoBean getEchoPort() {
+ return super.getPort(EchoPort, EchoBean.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
+ * @return
+ * returns EchoBean
+ */
+ @WebEndpoint(name = "EchoPort")
+ public EchoBean getEchoPort(WebServiceFeature... features) {
+ return super.getPort(EchoPort, EchoBean.class, features);
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/ObjectFactory.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/ObjectFactory.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/ObjectFactory.java 2010-09-10 10:04:53 UTC (rev 12948)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3123.generated;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.test.ws.jaxws.jbws3123.generated package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _SayHello_QNAME = new QName("http://Echo.org", "sayHello");
+ private final static QName _SayHelloResponse_QNAME = new QName("http://Echo.org", "sayHelloResponse");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.test.ws.jaxws.jbws3123.generated
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link SayHello }
+ *
+ */
+ public SayHello createSayHello() {
+ return new SayHello();
+ }
+
+ /**
+ * Create an instance of {@link SayHelloResponse }
+ *
+ */
+ public SayHelloResponse createSayHelloResponse() {
+ return new SayHelloResponse();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link SayHello }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://Echo.org", name = "sayHello")
+ public JAXBElement<SayHello> createSayHello(SayHello value) {
+ return new JAXBElement<SayHello>(_SayHello_QNAME, SayHello.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link SayHelloResponse }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://Echo.org", name = "sayHelloResponse")
+ public JAXBElement<SayHelloResponse> createSayHelloResponse(SayHelloResponse value) {
+ return new JAXBElement<SayHelloResponse>(_SayHelloResponse_QNAME, SayHelloResponse.class, null, value);
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/SayHello.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/SayHello.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/SayHello.java 2010-09-10 10:04:53 UTC (rev 12948)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3123.generated;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for sayHello complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="sayHello">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sayHello")
+public class SayHello {
+
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/SayHelloResponse.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/SayHelloResponse.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/SayHelloResponse.java 2010-09-10 10:04:53 UTC (rev 12948)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws3123.generated;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for sayHelloResponse complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="sayHelloResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="return" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sayHelloResponse", propOrder = {
+ "_return"
+})
+public class SayHelloResponse {
+
+ @XmlElement(name = "return")
+ protected String _return;
+
+ /**
+ * Gets the value of the return property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getReturn() {
+ return _return;
+ }
+
+ /**
+ * Sets the value of the return property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setReturn(String value) {
+ this._return = value;
+ }
+
+}
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/package-info.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/package-info.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3123/generated/package-info.java 2010-09-10 10:04:53 UTC (rev 12948)
@@ -0,0 +1,23 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.
+ */
+(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://Echo.org")
+package org.jboss.test.ws.jaxws.jbws3123.generated;
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3123/META-INF/jboss.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3123/META-INF/jboss.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3123/META-INF/jboss.xml 2010-09-10 10:04:53 UTC (rev 12948)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss
+ xmlns="http://www.jboss.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
+ http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
+ version="3.0">
+ <webservices>
+ <webservice-description>
+ <webservice-description-name>EchoService</webservice-description-name>
+ <wsdl-publish-location>http://localhost:8080/jaxws-jbws3123-ejb/EchoBean?WSDL</wsdl-publish-location>
+ </webservice-description>
+ </webservices>
+ <enterprise-beans>
+ <ejb>
+ <ejb-name>EchoBean</ejb-name>
+ <jndi-name>EchoBean</jndi-name>
+ <home-jndi-name>EchoBean</home-jndi-name>
+ <port-component>
+ <port-component-name>EchoBean</port-component-name>
+ <port-component-uri>jaxws-jbws3123-ejb/EchoBean</port-component-uri>
+ </port-component>
+ </ejb>
+ </enterprise-beans>
+</jboss>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3123/META-INF/wsdl/EchoService.wsdl
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3123/META-INF/wsdl/EchoService.wsdl (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3123/META-INF/wsdl/EchoService.wsdl 2010-09-10 10:04:53 UTC (rev 12948)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions
+ name="EchoService"
+ targetNamespace="http://Echo.org"
+ xmlns:ns1="http://schemas.xmlsoap.org/soap/http"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://Echo.org"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:wsa="http://www.w3.org/2005/08/addressing"
+ xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
+<wsdl:types>
+<xs:schema elementFormDefault="unqualified" targetNamespace="http://Echo.org" version="1.0" xmlns:tns="http://Echo.org" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<xs:element name="sayHello" type="tns:sayHello"/>
+<xs:element name="sayHelloResponse" type="tns:sayHelloResponse"/>
+<xs:complexType name="sayHello">
+<xs:sequence/>
+</xs:complexType>
+<xs:complexType name="sayHelloResponse">
+<xs:sequence>
+<xs:element minOccurs="0" name="return" type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+</xs:schema>
+ </wsdl:types>
+ <wsdl:message name="sayHelloResponse">
+ <wsdl:part element="tns:sayHelloResponse" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="sayHello">
+ <wsdl:part element="tns:sayHello" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="EchoBean">
+ <wsdl:operation name="sayHello">
+ <wsdl:input message="tns:sayHello" name="sayHello">
+ </wsdl:input>
+ <wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="EchoServiceSoapBinding" type="tns:EchoBean">
+ <wsp:Policy>
+ <wsam:Addressing wsp:Optional="true">
+ <wsp:Policy/>
+ </wsam:Addressing>
+ </wsp:Policy>
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="sayHello">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="sayHello">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="sayHelloResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="EchoService">
+ <wsdl:port binding="tns:EchoServiceSoapBinding" name="EchoPort">
+ <soap:address location="http://foo:9999/bar"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3123/WEB-INF/jboss-web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3123/WEB-INF/jboss-web.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3123/WEB-INF/jboss-web.xml 2010-09-10 10:04:53 UTC (rev 12948)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-web>
+ <security-domain>java:/jaas/JBossWS</security-domain>
+ <service-ref>
+ <service-ref-name>service/wsejbwsrefandaddrcombtestenabledechoport</service-ref-name>
+ <port-component-ref>
+ <service-endpoint-interface>org.jboss.test.ws.jaxws.jbws3123.generated.EchoBean</service-endpoint-interface>
+ <port-qname>{http://Echo.org}EchoPort</port-qname>
+ </port-component-ref>
+ <wsdl-override>http://localhost:8080/jaxws-jbws3123-ejb/EchoBean?WSDL</wsdl-override>
+ </service-ref>
+</jboss-web>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3123/WEB-INF/wsdl/EchoService.wsdl
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3123/WEB-INF/wsdl/EchoService.wsdl (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3123/WEB-INF/wsdl/EchoService.wsdl 2010-09-10 10:04:53 UTC (rev 12948)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions
+ name="EchoService"
+ targetNamespace="http://Echo.org"
+ xmlns:ns1="http://schemas.xmlsoap.org/soap/http"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://Echo.org"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:wsa="http://www.w3.org/2005/08/addressing"
+ xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
+<wsdl:types>
+<xs:schema elementFormDefault="unqualified" targetNamespace="http://Echo.org" version="1.0" xmlns:tns="http://Echo.org" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<xs:element name="sayHello" type="tns:sayHello"/>
+<xs:element name="sayHelloResponse" type="tns:sayHelloResponse"/>
+<xs:complexType name="sayHello">
+<xs:sequence/>
+</xs:complexType>
+<xs:complexType name="sayHelloResponse">
+<xs:sequence>
+<xs:element minOccurs="0" name="return" type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+</xs:schema>
+ </wsdl:types>
+ <wsdl:message name="sayHelloResponse">
+ <wsdl:part element="tns:sayHelloResponse" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="sayHello">
+ <wsdl:part element="tns:sayHello" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="EchoBean">
+ <wsdl:operation name="sayHello">
+ <wsdl:input message="tns:sayHello" name="sayHello">
+ </wsdl:input>
+ <wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="EchoServiceSoapBinding" type="tns:EchoBean">
+ <wsp:Policy>
+ <wsam:Addressing wsp:Optional="true">
+ <wsp:Policy/>
+ </wsam:Addressing>
+ </wsp:Policy>
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="sayHello">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="sayHello">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="sayHelloResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="EchoService">
+ <wsdl:port binding="tns:EchoServiceSoapBinding" name="EchoPort">
+ <soap:address location="http://foo:9999/bar"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: framework/trunk/testsuite/test/resources/jaxws/jbws3123/application.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws3123/application.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws3123/application.xml 2010-09-10 10:04:53 UTC (rev 12948)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="6" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd">
+ <description>Application description</description>
+ <display-name>JBWS3123 Test</display-name>
+ <module>
+ <java>jaxws-jbws3123-ejb.jar</java>
+ </module>
+ <module>
+ <web>
+ <web-uri>jaxws-jbws3123-web.war</web-uri>
+ <context-root>jaxws-jbws3123-web</context-root>
+ </web>
+ </module>
+</application>
15 years, 8 months
JBossWS SVN: r12947 - in stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests: src/test/java/org/jboss/test/ws/jaxws and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-09-09 13:09:02 -0400 (Thu, 09 Sep 2010)
New Revision: 12947
Added:
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractEndpoint.java
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/Endpoint.java
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointJSE.java
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2934/
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2934/WEB-INF/
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2934/WEB-INF/web.xml
Removed:
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractEndpoint.java
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/Endpoint.java
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointJSE.java
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2934/WEB-INF/
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2934/WEB-INF/web.xml
Modified:
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
Log:
[JBPAPP-5053] Added test case to reproduce failure.
Modified: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-09-09 16:51:24 UTC (rev 12946)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-09-09 17:09:02 UTC (rev 12947)
@@ -603,6 +603,23 @@
</webinf>
</war>
+ <!-- jaxws-jbws2934 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2934.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2934/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2934/*.class" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.class" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws2934/*TestCase*.class" />
+ </classes>
+ </war>
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2934.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2934/*.class" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws2934/EndpointJSE.class" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws2934/*TestCase*.class" />
+ </fileset>
+ </jar>
+
+
<!-- jaxws-webserviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxws-webserviceref.war" webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Copied: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934 (from rev 11594, framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934)
Deleted: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractEndpoint.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractEndpoint.java 2010-02-16 10:12:53 UTC (rev 11594)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractEndpoint.java 2010-09-09 17:09:02 UTC (rev 12947)
@@ -1,86 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.jbws2934;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.handler.MessageContext;
-
-/**
- * Abstract endpoint implementation reused in both JSE and EJB endpoint.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-abstract class AbstractEndpoint implements Endpoint
-{
-
- protected AbstractEndpoint()
- {
- super();
- }
-
- @Resource
- WebServiceContext wsCtx1;
- WebServiceContext wsCtx2;
-
- @Resource
- void setWebServiceContext(WebServiceContext wsCtx)
- {
- this.wsCtx2 = wsCtx;
- }
-
- @PostConstruct
- private void init()
- {
- this.assertWebServiceContexts();
- }
-
- protected int getQueryParameterInternal(String key)
- {
- this.assertWebServiceContexts();
- int ctx1Value = this.getValue(this.wsCtx1, key);
- int ctx2Value = this.getValue(this.wsCtx2, key);
- if (ctx1Value != ctx2Value)
- throw new WebServiceException("Values have to be equivalent, they're comming from the same request");
-
- return ++ctx1Value;
- }
-
- protected int getValue(WebServiceContext wsCtx, String queryKey)
- {
- HttpServletRequest servletReq = (HttpServletRequest)wsCtx.getMessageContext().get(MessageContext.SERVLET_REQUEST);
- String queryString = servletReq.getQueryString();
- int equalsSignPosition = queryString.indexOf('=');
- return Integer.valueOf(queryString.substring(equalsSignPosition + 1));
- }
-
- protected void assertWebServiceContexts()
- {
- if (this.wsCtx1 == null)
- throw new WebServiceException("Web service context 1 is null");
- if (this.wsCtx2 == null)
- throw new WebServiceException("Web service context 2 is null");
- }
-}
Copied: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractEndpoint.java (from rev 11594, framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractEndpoint.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractEndpoint.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractEndpoint.java 2010-09-09 17:09:02 UTC (rev 12947)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws2934;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.MessageContext;
+
+/**
+ * Abstract endpoint implementation reused in both JSE and EJB endpoint.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+abstract class AbstractEndpoint implements Endpoint
+{
+
+ protected AbstractEndpoint()
+ {
+ super();
+ }
+
+ @Resource
+ WebServiceContext wsCtx1;
+ WebServiceContext wsCtx2;
+
+ @Resource
+ void setWebServiceContext(WebServiceContext wsCtx)
+ {
+ this.wsCtx2 = wsCtx;
+ }
+
+ @PostConstruct
+ private void init()
+ {
+ this.assertWebServiceContexts();
+ }
+
+ protected int getQueryParameterInternal(String key)
+ {
+ this.assertWebServiceContexts();
+ int ctx1Value = this.getValue(this.wsCtx1, key);
+ int ctx2Value = this.getValue(this.wsCtx2, key);
+ if (ctx1Value != ctx2Value)
+ throw new WebServiceException("Values have to be equivalent, they're comming from the same request");
+
+ return ++ctx1Value;
+ }
+
+ protected int getValue(WebServiceContext wsCtx, String queryKey)
+ {
+ HttpServletRequest servletReq = (HttpServletRequest)wsCtx.getMessageContext().get(MessageContext.SERVLET_REQUEST);
+ String queryString = servletReq.getQueryString();
+ int equalsSignPosition = queryString.indexOf('=');
+ return Integer.valueOf(queryString.substring(equalsSignPosition + 1));
+ }
+
+ protected void assertWebServiceContexts()
+ {
+ if (this.wsCtx1 == null)
+ throw new WebServiceException("Web service context 1 is null");
+ if (this.wsCtx2 == null)
+ throw new WebServiceException("Web service context 2 is null");
+ }
+}
Deleted: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java 2010-02-16 10:12:53 UTC (rev 11594)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java 2010-09-09 17:09:02 UTC (rev 12947)
@@ -1,129 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.jbws2934;
-
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-
-import org.jboss.wsf.test.JBossWSTest;
-
-/**
- * [JBWS-2934] WebServiceContext implementation have to be ThreadLocal aware.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-abstract class AbstractTestCase extends JBossWSTest
-{
- private static final int THREADS_COUNT = 20;
- private static final int REQUESTS_COUNT = 20;
- private static final String ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2934";
- private final Endpoint[] proxies = new Endpoint[THREADS_COUNT];
- private final Thread[] threads = new Thread[THREADS_COUNT];
- private final TestJob[] jobs = new TestJob[THREADS_COUNT];
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- QName serviceName = new QName("http://jboss.org/jbws2934", "EndpointService");
- URL wsdlURL = new URL(ENDPOINT_ADDRESS + "?wsdl");
-
- Service service = Service.create(wsdlURL, serviceName);
- for (int i = 0; i < THREADS_COUNT; i++)
- proxies[i] = service.getPort(Endpoint.class);
- }
-
- public void testEndpointConcurrently() throws Exception
- {
- for (int i = 0; i < THREADS_COUNT; i++)
- {
- System.out.println("Creating thread " + (i + 1));
- jobs[i] = new TestJob(proxies[i], REQUESTS_COUNT, "TestJob" + i);
- threads[i] = new Thread(jobs[i]);
- }
- for (int i = 0; i < THREADS_COUNT; i++)
- {
- System.out.println("Starting thread " + (i + 1));
- threads[i].start();
- }
- Exception e = null;
- for (int i = 0; i < THREADS_COUNT; i++)
- {
- System.out.println("Joining thread " + (i + 1));
- threads[i].join();
- if (e == null)
- e = jobs[i].getException();
- }
- if (e != null) throw e;
- }
-
- private static final class TestJob implements Runnable
- {
- private final String jobName;
- private final Endpoint proxy;
- private final int countOfRequests;
- private Exception exception;
-
- TestJob(Endpoint proxy, int countOfRequests, String jobName)
- {
- this.proxy = proxy;
- this.countOfRequests = countOfRequests;
- this.jobName = jobName;
- }
-
- public void run()
- {
- try
- {
- for (int i = 0; i < this.countOfRequests; i++)
- {
- this.setQueryParameter(proxy, i);
- int retVal = proxy.getQueryParameter(jobName);
- System.out.println("Thread=" + this.jobName + ", iteration=" + i);
- if (retVal != (i + 1))
- throw new RuntimeException("Thread=" + this.jobName + ", iteration=" + i + ", received=" + retVal);
- }
- }
- catch (Exception e)
- {
- System.out.println("Exception caught: " + e.getMessage());
- this.exception = e;
- }
- }
-
- private void setQueryParameter(Endpoint proxy, int value)
- {
- BindingProvider bp = (BindingProvider)proxy;
- String queryString = "?" + this.jobName + "=" + value;
- bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, ENDPOINT_ADDRESS + queryString);
- }
-
- Exception getException()
- {
- return this.exception;
- }
- }
-}
Copied: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java (from rev 11594, framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/AbstractTestCase.java 2010-09-09 17:09:02 UTC (rev 12947)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws2934;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * [JBWS-2934] WebServiceContext implementation have to be ThreadLocal aware.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+abstract class AbstractTestCase extends JBossWSTest
+{
+ private static final int THREADS_COUNT = 20;
+ private static final int REQUESTS_COUNT = 20;
+ private static final String ENDPOINT_ADDRESS = "http://" + System.getProperty("jboss.bind.address", "localhost") + ":8080/jaxws-jbws2934";
+ private final Endpoint[] proxies = new Endpoint[THREADS_COUNT];
+ private final Thread[] threads = new Thread[THREADS_COUNT];
+ private final TestJob[] jobs = new TestJob[THREADS_COUNT];
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ QName serviceName = new QName("http://jboss.org/jbws2934", "EndpointService");
+ URL wsdlURL = new URL(ENDPOINT_ADDRESS + "?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ for (int i = 0; i < THREADS_COUNT; i++)
+ proxies[i] = service.getPort(Endpoint.class);
+ }
+
+ public void testEndpointConcurrently() throws Exception
+ {
+ for (int i = 0; i < THREADS_COUNT; i++)
+ {
+ System.out.println("Creating thread " + (i + 1));
+ jobs[i] = new TestJob(proxies[i], REQUESTS_COUNT, "TestJob" + i);
+ threads[i] = new Thread(jobs[i]);
+ }
+ for (int i = 0; i < THREADS_COUNT; i++)
+ {
+ System.out.println("Starting thread " + (i + 1));
+ threads[i].start();
+ }
+ Exception e = null;
+ for (int i = 0; i < THREADS_COUNT; i++)
+ {
+ System.out.println("Joining thread " + (i + 1));
+ threads[i].join();
+ if (e == null)
+ e = jobs[i].getException();
+ }
+ if (e != null) throw e;
+ }
+
+ private static final class TestJob implements Runnable
+ {
+ private final String jobName;
+ private final Endpoint proxy;
+ private final int countOfRequests;
+ private Exception exception;
+
+ TestJob(Endpoint proxy, int countOfRequests, String jobName)
+ {
+ this.proxy = proxy;
+ this.countOfRequests = countOfRequests;
+ this.jobName = jobName;
+ }
+
+ public void run()
+ {
+ try
+ {
+ for (int i = 0; i < this.countOfRequests; i++)
+ {
+ this.setQueryParameter(proxy, i);
+ int retVal = proxy.getQueryParameter(jobName);
+ System.out.println("Thread=" + this.jobName + ", iteration=" + i);
+ if (retVal != (i + 1))
+ throw new RuntimeException("Thread=" + this.jobName + ", iteration=" + i + ", received=" + retVal);
+ }
+ }
+ catch (Exception e)
+ {
+ System.out.println("Exception caught: " + e.getMessage());
+ this.exception = e;
+ }
+ }
+
+ private void setQueryParameter(Endpoint proxy, int value)
+ {
+ BindingProvider bp = (BindingProvider)proxy;
+ String queryString = "?" + this.jobName + "=" + value;
+ bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, ENDPOINT_ADDRESS + queryString);
+ }
+
+ Exception getException()
+ {
+ return this.exception;
+ }
+ }
+}
Deleted: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/Endpoint.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/Endpoint.java 2010-02-16 10:12:53 UTC (rev 11594)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/Endpoint.java 2010-09-09 17:09:02 UTC (rev 12947)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.jbws2934;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-
-/**
- * Endpoint interface.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-@WebService(name="Endpoint", targetNamespace="http://jboss.org/jbws2934")
-public interface Endpoint
-{
- @WebMethod
- public int getQueryParameter(String key);
-}
Copied: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/Endpoint.java (from rev 11594, framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/Endpoint.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/Endpoint.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/Endpoint.java 2010-09-09 17:09:02 UTC (rev 12947)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws2934;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * Endpoint interface.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@WebService(name="Endpoint", targetNamespace="http://jboss.org/jbws2934")
+public interface Endpoint
+{
+ @WebMethod
+ public int getQueryParameter(String key);
+}
Deleted: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java 2010-02-16 10:12:53 UTC (rev 11594)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java 2010-09-09 17:09:02 UTC (rev 12947)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.jbws2934;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.jws.soap.SOAPBinding.Style;
-import javax.xml.ws.WebServiceException;
-
-import javax.ejb.Stateless;
-import org.jboss.wsf.spi.annotation.AuthMethod;
-import org.jboss.wsf.spi.annotation.TransportGuarantee;
-import org.jboss.wsf.spi.annotation.WebContext;
-
-/**
- * Endpoint EJB implementation.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-@Stateless
-@WebService
-(
- name = "Endpoint",
- serviceName = "EndpointService",
- targetNamespace="http://jboss.org/jbws2934",
- endpointInterface="org.jboss.test.ws.jaxws.jbws2934.Endpoint"
-)
-@WebContext
-(
- contextRoot = "/jaxws-jbws2934",
- urlPattern = "/*"
-)
-public class EndpointEJB extends AbstractEndpoint
-{
- @WebMethod
- public int getQueryParameter(String key)
- {
- return super.getQueryParameterInternal(key);
- }
-}
Copied: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java (from rev 11594, framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointEJB.java 2010-09-09 17:09:02 UTC (rev 12947)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws2934;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+import javax.xml.ws.WebServiceException;
+
+import javax.ejb.Stateless;
+import org.jboss.wsf.spi.annotation.AuthMethod;
+import org.jboss.wsf.spi.annotation.TransportGuarantee;
+import org.jboss.wsf.spi.annotation.WebContext;
+
+/**
+ * Endpoint EJB implementation.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@Stateless
+@WebService
+(
+ name = "Endpoint",
+ serviceName = "EndpointService",
+ targetNamespace="http://jboss.org/jbws2934",
+ endpointInterface="org.jboss.test.ws.jaxws.jbws2934.Endpoint"
+)
+@WebContext
+(
+ contextRoot = "/jaxws-jbws2934",
+ urlPattern = "/*"
+)
+public class EndpointEJB extends AbstractEndpoint
+{
+ @WebMethod
+ public int getQueryParameter(String key)
+ {
+ return super.getQueryParameterInternal(key);
+ }
+}
Deleted: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointJSE.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointJSE.java 2010-02-16 10:12:53 UTC (rev 11594)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointJSE.java 2010-09-09 17:09:02 UTC (rev 12947)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.jbws2934;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-
-/**
- * Endpoint JSE implementation.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-@WebService
-(
- name = "Endpoint",
- serviceName = "EndpointService",
- targetNamespace="http://jboss.org/jbws2934",
- endpointInterface="org.jboss.test.ws.jaxws.jbws2934.Endpoint"
-)
-public class EndpointJSE extends AbstractEndpoint
-{
- @WebMethod
- public int getQueryParameter(String key)
- {
- return super.getQueryParameterInternal(key);
- }
-}
Copied: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointJSE.java (from rev 11594, framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointJSE.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointJSE.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/EndpointJSE.java 2010-09-09 17:09:02 UTC (rev 12947)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws2934;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * Endpoint JSE implementation.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@WebService
+(
+ name = "Endpoint",
+ serviceName = "EndpointService",
+ targetNamespace="http://jboss.org/jbws2934",
+ endpointInterface="org.jboss.test.ws.jaxws.jbws2934.Endpoint"
+)
+public class EndpointJSE extends AbstractEndpoint
+{
+ @WebMethod
+ public int getQueryParameter(String key)
+ {
+ return super.getQueryParameterInternal(key);
+ }
+}
Deleted: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java 2010-02-16 10:12:53 UTC (rev 11594)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java 2010-09-09 17:09:02 UTC (rev 12947)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.jbws2934;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * [JBWS-2934] WebServiceContext implementation have to be ThreadLocal aware - EJB version.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class JBWS2934EJBTestCase extends AbstractTestCase
-{
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS2934EJBTestCase.class, "jaxws-jbws2934.jar");
- }
-}
Copied: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java (from rev 11594, framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934EJBTestCase.java 2010-09-09 17:09:02 UTC (rev 12947)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws2934;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2934] WebServiceContext implementation have to be ThreadLocal aware - EJB version.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class JBWS2934EJBTestCase extends AbstractTestCase
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS2934EJBTestCase.class, "jaxws-jbws2934.jar");
+ }
+}
Deleted: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java 2010-02-16 10:12:53 UTC (rev 11594)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java 2010-09-09 17:09:02 UTC (rev 12947)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.jbws2934;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * [JBWS-2934] WebServiceContext implementation have to be ThreadLocal aware - JSE version.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class JBWS2934JSETestCase extends AbstractTestCase
-{
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS2934JSETestCase.class, "jaxws-jbws2934.war");
- }
-}
Copied: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java (from rev 11594, framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2934/JBWS2934JSETestCase.java 2010-09-09 17:09:02 UTC (rev 12947)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.jbws2934;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2934] WebServiceContext implementation have to be ThreadLocal aware - JSE version.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class JBWS2934JSETestCase extends AbstractTestCase
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS2934JSETestCase.class, "jaxws-jbws2934.war");
+ }
+}
Copied: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2934 (from rev 11594, framework/trunk/testsuite/test/resources/jaxws/jbws2934)
Copied: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2934/WEB-INF (from rev 11594, framework/trunk/testsuite/test/resources/jaxws/jbws2934/WEB-INF)
Deleted: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2934/WEB-INF/web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2934/WEB-INF/web.xml 2010-02-16 10:12:53 UTC (rev 11594)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2934/WEB-INF/web.xml 2010-09-09 17:09:02 UTC (rev 12947)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
-
- <servlet>
- <servlet-name>TestEndpoint</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.jbws2934.EndpointJSE</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>TestEndpoint</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
-
Copied: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2934/WEB-INF/web.xml (from rev 11594, framework/trunk/testsuite/test/resources/jaxws/jbws2934/WEB-INF/web.xml)
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2934/WEB-INF/web.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2934/WEB-INF/web.xml 2010-09-09 17:09:02 UTC (rev 12947)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws2934.EndpointJSE</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
15 years, 8 months
JBossWS SVN: r12946 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication.
by jbossws-commits@lists.jboss.org
Author: sergeyb
Date: 2010-09-09 12:51:24 -0400 (Thu, 09 Sep 2010)
New Revision: 12946
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingInterceptor.java
Log:
[JBWS-2210] Removing the workaround code to do with handling digest passwords from SubjectCreatingInterceptor
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingInterceptor.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingInterceptor.java 2010-09-09 16:27:59 UTC (rev 12945)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/SubjectCreatingInterceptor.java 2010-09-09 16:51:24 UTC (rev 12946)
@@ -28,14 +28,10 @@
import java.util.Map;
import javax.security.auth.Subject;
-import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
import org.apache.cxf.common.security.SimplePrincipal;
import org.apache.cxf.ws.security.wss4j.AbstractUsernameTokenAuthenticatingInterceptor;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.handler.RequestData;
import org.jboss.logging.Logger;
import org.jboss.security.AuthenticationManager;
import org.jboss.security.auth.callback.CallbackHandlerPolicyContextHandler;
@@ -71,8 +67,6 @@
private boolean decodeNonce = true;
- private boolean supportDigestPasswords;
-
public SubjectCreatingInterceptor()
{
this(Collections.<String, Object> emptyMap());
@@ -96,39 +90,7 @@
}
- // TODO : this code is a temporarily workaround; AbstractUsernameTokenAuthenticatingInterceptor
- // has a bug to do with handling digests; RequestData assumes PasswordDigest by default
@Override
- public void setSupportDigestPasswords(boolean support)
- {
- this.supportDigestPasswords = support;
- super.setSupportDigestPasswords(support);
- }
-
- // TODO : this code is a temporarily workaround; AbstractUsernameTokenAuthenticatingInterceptor
- // has a bug to do with handling digests; RequestData assumes PasswordDigest by default
- @Override
- protected CallbackHandler getCallback(RequestData reqData, int doAction) throws WSSecurityException
- {
-
- if (supportDigestPasswords)
- {
- return new CallbackHandler()
- {
- @Override
- public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
- {
- // dummy handler
- }
- };
- }
- else
- {
- return super.getCallback(reqData, doAction);
- }
- }
-
- @Override
public Subject createSubject(String name, String password, boolean isDigest, String nonce, String created)
{
if (isDigest)
15 years, 8 months
JBossWS SVN: r12945 - in stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053: src/main/scripts and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-09-09 12:27:59 -0400 (Thu, 09 Sep 2010)
New Revision: 12945
Modified:
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/pom.xml
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/src/main/scripts/assembly-deploy-artifacts.xml
Log:
[JBPAPP-5053] Bump version to correct build.
Modified: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/pom.xml 2010-09-09 16:15:43 UTC (rev 12944)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/pom.xml 2010-09-09 16:27:59 UTC (rev 12945)
@@ -69,7 +69,7 @@
<apache.scout.version>1.1.1</apache.scout.version>
<juddi.version>2.0.1</juddi.version>
<sun.fastinfoset.version>1.2.7</sun.fastinfoset.version>
- <sun.jaxws.version>2.1.3</sun.jaxws.version>
+ <sun.jaxws.version>2.1.7</sun.jaxws.version>
<woodstox.version>3.2.8</woodstox.version>
<wsdl4j.version>1.6.2</wsdl4j.version>
<xmlsec.version>1.4.3</xmlsec.version>
Modified: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/src/main/scripts/assembly-deploy-artifacts.xml 2010-09-09 16:15:43 UTC (rev 12944)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/src/main/scripts/assembly-deploy-artifacts.xml 2010-09-09 16:27:59 UTC (rev 12945)
@@ -46,9 +46,9 @@
<include>org.jboss.ws.native:jbossws-native-jaxws-ext:jar</include>
<include>org.jboss.ws.native:jbossws-native-saaj:jar</include>
<include>org.codehaus.jettison:jettison:jar</include>
- <include>stax:stax-api:jar</include>
+ <include>stax:stax-api:jar</include>
<include>org.jvnet.staxex:stax-ex:jar</include>
- <include>com.sun.xml.stream.buffer:streambuffer:jar</include>
+ <include>com.sun.xml.stream.buffer:streambuffer:jar</include>
<include>wsdl4j:wsdl4j:jar</include>
<include>org.apache:xmlsec:jar</include>
</includes>
15 years, 8 months
JBossWS SVN: r12942 - in stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf: jbws3124 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: sergeyb
Date: 2010-09-09 11:39:33 -0400 (Thu, 09 Sep 2010)
New Revision: 12942
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3124/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3124/JBWS3124TestCase.java
Log:
[JBWS3124] : Adding a CXF specific version of JBWS2942TestCase
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3124/JBWS3124TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3124/JBWS3124TestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3124/JBWS3124TestCase.java 2010-09-09 15:39:33 UTC (rev 12942)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.cxf.jbws3124;
+
+import java.io.StringWriter;
+
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * See [JBWS-2942] Do not add empty Metadata tag to EndpointReference.
+ *
+ * @author <a href="mailto:sberyozk@redhat.com">Sergey Beryozkin</a>
+ */
+public final class JBWS3124TestCase extends JBossWSTest
+{
+
+ public void testEmptyMetadataDropped()
+ {
+ W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder.address("http://bar");
+ W3CEndpointReference epr = builder.build();
+ StringWriter writer = new StringWriter();
+ epr.writeTo(new StreamResult(writer));
+ String eprString = writer.toString();
+ assertTrue(eprString.contains("EndpointReference"));
+ assertFalse(eprString.contains("Metadata"));
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3124/JBWS3124TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Rev Date
Name: svn:eol-style
+ native
15 years, 8 months
JBossWS SVN: r12941 - stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-09-09 10:42:59 -0400 (Thu, 09 Sep 2010)
New Revision: 12941
Modified:
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/pom.xml
Log:
[JBPAPP-5053] Revert version update.
Modified: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/pom.xml 2010-09-09 13:22:31 UTC (rev 12940)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/pom.xml 2010-09-09 14:42:59 UTC (rev 12941)
@@ -47,8 +47,8 @@
<!-- Properties -->
<properties>
- <jbossws.common.version>1.1.0.SP2_CP01_JBPAPP-5053</jbossws.common.version>
- <jbossws.framework.version>3.1.2.SP4_CP01_JBPAPP-5053</jbossws.framework.version>
+ <jbossws.common.version>1.1.0.SP2_CP01</jbossws.common.version>
+ <jbossws.framework.version>3.1.2.SP4_CP01</jbossws.framework.version>
<jbossws.spi.version>1.1.2.SP1_CP01</jbossws.spi.version>
<!-- [JBWS-2505] -->
<!-- START -->
15 years, 8 months