Author: alessio.soldano(a)jboss.com
Date: 2009-01-23 10:37:26 -0500 (Fri, 23 Jan 2009)
New Revision: 9108
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/Endpoint.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/Endpoint.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/EndpointImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/JBWS2449TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMCheckClientHandler.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMFeatureTestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBeanMetro.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CustomAdapter.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CustomBean.java
framework/trunk/testsuite/test/resources/jaxws/jbws2449/
framework/trunk/testsuite/test/resources/jaxws/jbws2449/META-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws2449/META-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/jbws2449/META-INF/wsdl/test.wsdl
Removed:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/Endpoint.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/Endpoint.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/EndpointImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/JBWS2449TestCase.java
framework/trunk/testsuite/test/resources/jaxws/jbws2449/META-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws2449/META-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/jbws2449/META-INF/wsdl/test.wsdl
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
framework/trunk/testsuite/test/ant-import/build-testsuite.xml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpoint.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpointBean.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/PluginBase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
framework/trunk/testsuite/test/resources/jaxws/smoke/tools/wsdl/TestService.wsdl
Log:
[JBWS-2441] Merging jaxws21 branch to trunk (svn merge -r9039:HEAD
https://svn.jboss.org/repos/jbossws/framework/branches/jaxws21)
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2009-01-23 15:32:14 UTC
(rev 9107)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2009-01-23 15:37:26 UTC
(rev 9108)
@@ -61,6 +61,14 @@
<exclude
name="org/jboss/test/ws/jaxws/complex/*TestCase.class"/>
</classes>
</war>
+
+ <!-- jaxws-endpointReference -->
+ <jar
destfile="${tests.output.dir}/test-libs/jaxws-endpointReference.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/endpointReference/Endpoint.class"/>
+ <include
name="org/jboss/test/ws/jaxws/endpointReference/EndpointImpl.class"/>
+ </fileset>
+ </jar>
<!-- jaxws-handlerscope -->
<war warfile="${tests.output.dir}/test-libs/jaxws-handlerscope.war"
webxml="${tests.output.dir}/test-resources/jaxws/handlerscope/WEB-INF/web.xml">
@@ -586,6 +594,17 @@
</webinf>
</war>
+ <!-- jaxws-jbws2449 -->
+ <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2449.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2449/*.class"/>
+ <exclude
name="org/jboss/test/ws/jaxws/jbws2449/*TestCase.class"/>
+ </fileset>
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/jbws2449/META-INF">
+ <include name="wsdl/*"/>
+ </metainf>
+ </jar>
+
<!-- jaxws namespace -->
<war warfile="${tests.output.dir}/test-libs/jaxws-namespace.war"
webxml="${tests.output.dir}/test-resources/jaxws/namespace/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Modified: framework/trunk/testsuite/test/ant-import/build-testsuite.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-testsuite.xml 2009-01-23 15:32:14 UTC
(rev 9107)
+++ framework/trunk/testsuite/test/ant-import/build-testsuite.xml 2009-01-23 15:37:26 UTC
(rev 9108)
@@ -584,6 +584,7 @@
<sysproperty key="org.jboss.ws.wsse.keyStoreType"
value="jks"/>
<sysproperty key="org.jboss.ws.wsse.trustStoreType"
value="jks"/>
<sysproperty key="test.archive.directory"
value="${tests.output.dir}/test-libs"/>
+ <sysproperty key="test.classes.directory"
value="${tests.output.dir}/test-classes"/>
<sysproperty key="test.resources.directory"
value="${tests.output.dir}/test-resources"/>
<sysproperty key="binary.distribution" value="true"/>
<classpath>
@@ -645,6 +646,7 @@
<sysproperty key="org.jboss.ws.wsse.keyStoreType"
value="jks"/>
<sysproperty key="org.jboss.ws.wsse.trustStoreType"
value="jks"/>
<sysproperty key="test.archive.directory"
value="${tests.output.dir}/test-libs"/>
+ <sysproperty key="test.classes.directory"
value="${tests.output.dir}/test-classes"/>
<sysproperty key="test.resources.directory"
value="${tests.output.dir}/test-resources"/>
<sysproperty key="binary.distribution" value="true"/>
<classpath>
Copied: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference
(from rev 9105,
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference)
Deleted:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java
===================================================================
---
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java 2009-01-23
10:52:49 UTC (rev 9105)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -1,127 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.endpointReference;
-
-import java.net.InetAddress;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Dispatch;
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.Service.Mode;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-
-import junit.framework.Test;
-
-import org.jboss.util.NotImplementedException;
-import org.jboss.wsf.common.DOMUtils;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * Test EPR related methods
- *
- * @author alessio.soldano(a)jboss.com
- * @since 13-Jan-2009
- */
-public class BindingProviderTestCase extends JBossWSTest
-{
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-endpointReference";
-
- public static Test suite()
- {
- return new JBossWSTestSetup(BindingProviderTestCase.class,
"jaxws-endpointReference.jar");
- }
-
- public void testClient() throws Exception
- {
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- QName serviceName = new QName("http://org.jboss.ws/endpointReference",
"EndpointService");
- Endpoint port = Service.create(wsdlURL, serviceName).getPort(Endpoint.class);
-
- BindingProvider bp = (BindingProvider)port;
- assertEndpointReference(bp.getEndpointReference());
- assertEndpointReference(bp.getEndpointReference(W3CEndpointReference.class));
- try
- {
- bp.getEndpointReference(MyEndpointReference.class);
- fail("Exception expected");
- }
- catch (Exception e)
- {
- //NOP: the provided EndpointReference is not supported by the implementation
- }
-
- String retObj = port.echo("Hello");
- assertEquals("Hello", retObj);
- }
-
- public void testDispatch() throws Exception
- {
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- QName serviceName = new QName("http://org.jboss.ws/endpointReference",
"EndpointService");
- Service service = Service.create(wsdlURL, serviceName);
- Dispatch<Source> dispatch = service.createDispatch(new
QName("http://org.jboss.ws/endpointReference", "EndpointPort"),
Source.class, Mode.PAYLOAD);
-
- BindingProvider bp = (BindingProvider)dispatch;
- assertEndpointReference(bp.getEndpointReference());
- assertEndpointReference(bp.getEndpointReference(W3CEndpointReference.class));
- try
- {
- bp.getEndpointReference(MyEndpointReference.class);
- fail("Exception expected");
- }
- catch (Exception e)
- {
- //NOP: the provided EndpointReference is not supported by the implementation
- }
- }
-
- private void assertEndpointReference(EndpointReference epr) throws Exception
- {
- assertEquals(W3CEndpointReference.class.getName(), epr.getClass().getName());
- Element endpointReference = DOMUtils.parse(epr.toString());
- assertEquals("EndpointReference", endpointReference.getNodeName());
-
assertEquals("http://www.w3.org/2005/08/addressing",
endpointReference.getAttribute("xmlns"));
- NodeList addresses = endpointReference.getElementsByTagName("Address");
- assertEquals(1, addresses.getLength());
- String targetEndpointAddress = "localhost".equals(getServerHost()) ?
"http://127.0.0.1:8080/jaxws-endpointReference" : TARGET_ENDPOINT_ADDRESS;
- assertEquals(targetEndpointAddress,
addresses.item(0).getFirstChild().getNodeValue());
- }
-
- private class MyEndpointReference extends EndpointReference
- {
- @Override
- public void writeTo(Result result)
- {
- throw new NotImplementedException();
- }
-
- }
-}
Copied:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java
(from rev 9105,
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java)
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/BindingProviderTestCase.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -0,0 +1,127 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.endpointReference;
+
+import java.net.InetAddress;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.Service.Mode;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+import junit.framework.Test;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * Test EPR related methods
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 13-Jan-2009
+ */
+public class BindingProviderTestCase extends JBossWSTest
+{
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-endpointReference";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(BindingProviderTestCase.class,
"jaxws-endpointReference.jar");
+ }
+
+ public void testClient() throws Exception
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/endpointReference",
"EndpointService");
+ Endpoint port = Service.create(wsdlURL, serviceName).getPort(Endpoint.class);
+
+ BindingProvider bp = (BindingProvider)port;
+ assertEndpointReference(bp.getEndpointReference());
+ assertEndpointReference(bp.getEndpointReference(W3CEndpointReference.class));
+ try
+ {
+ bp.getEndpointReference(MyEndpointReference.class);
+ fail("Exception expected");
+ }
+ catch (Exception e)
+ {
+ //NOP: the provided EndpointReference is not supported by the implementation
+ }
+
+ String retObj = port.echo("Hello");
+ assertEquals("Hello", retObj);
+ }
+
+ public void testDispatch() throws Exception
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/endpointReference",
"EndpointService");
+ Service service = Service.create(wsdlURL, serviceName);
+ Dispatch<Source> dispatch = service.createDispatch(new
QName("http://org.jboss.ws/endpointReference", "EndpointPort"),
Source.class, Mode.PAYLOAD);
+
+ BindingProvider bp = (BindingProvider)dispatch;
+ assertEndpointReference(bp.getEndpointReference());
+ assertEndpointReference(bp.getEndpointReference(W3CEndpointReference.class));
+ try
+ {
+ bp.getEndpointReference(MyEndpointReference.class);
+ fail("Exception expected");
+ }
+ catch (Exception e)
+ {
+ //NOP: the provided EndpointReference is not supported by the implementation
+ }
+ }
+
+ private void assertEndpointReference(EndpointReference epr) throws Exception
+ {
+ assertEquals(W3CEndpointReference.class.getName(), epr.getClass().getName());
+ Element endpointReference = DOMUtils.parse(epr.toString());
+ assertEquals("EndpointReference", endpointReference.getNodeName());
+
assertEquals("http://www.w3.org/2005/08/addressing",
endpointReference.getAttribute("xmlns"));
+ NodeList addresses = endpointReference.getElementsByTagName("Address");
+ assertEquals(1, addresses.getLength());
+ String targetEndpointAddress = "localhost".equals(getServerHost()) ?
"http://127.0.0.1:8080/jaxws-endpointReference" : TARGET_ENDPOINT_ADDRESS;
+ assertEquals(targetEndpointAddress,
addresses.item(0).getFirstChild().getNodeValue());
+ }
+
+ private class MyEndpointReference extends EndpointReference
+ {
+ @Override
+ public void writeTo(Result result)
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+}
Deleted:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/Endpoint.java
===================================================================
---
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/Endpoint.java 2009-01-23
10:52:49 UTC (rev 9105)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/Endpoint.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -1,32 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.endpointReference;
-
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
-@WebService(name = "Endpoint", targetNamespace =
"http://org.jboss.ws/endpointReference")
-public interface Endpoint
-{
- String echo(String input);
-}
Copied:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/Endpoint.java
(from rev 9105,
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/Endpoint.java)
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/Endpoint.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/Endpoint.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.endpointReference;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
+@WebService(name = "Endpoint", targetNamespace =
"http://org.jboss.ws/endpointReference")
+public interface Endpoint
+{
+ String echo(String input);
+}
Deleted:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointImpl.java
===================================================================
---
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointImpl.java 2009-01-23
10:52:49 UTC (rev 9105)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointImpl.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.endpointReference;
-
-import javax.ejb.Stateless;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-import org.jboss.wsf.spi.annotation.WebContext;
-
-@Stateless
-@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
-@WebContext(contextRoot="jaxws-endpointReference", urlPattern="/*")
-@WebService
-(
- name = "Endpoint",
- serviceName = "EndpointService",
- targetNamespace = "http://org.jboss.ws/endpointReference"
-)
-public class EndpointImpl implements Endpoint
-{
- @WebMethod
- public String echo(String input)
- {
- return input;
- }
-}
Copied:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointImpl.java
(from rev 9105,
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointImpl.java)
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointImpl.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/endpointReference/EndpointImpl.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.endpointReference;
+
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.wsf.spi.annotation.WebContext;
+
+@Stateless
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
+@WebContext(contextRoot="jaxws-endpointReference", urlPattern="/*")
+@WebService
+(
+ name = "Endpoint",
+ serviceName = "EndpointService",
+ targetNamespace = "http://org.jboss.ws/endpointReference"
+)
+public class EndpointImpl implements Endpoint
+{
+ @WebMethod
+ public String echo(String input)
+ {
+ return input;
+ }
+}
Copied: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449 (from rev
9105, framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449)
Deleted:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/Endpoint.java
===================================================================
---
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/Endpoint.java 2009-01-23
10:52:49 UTC (rev 9105)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/Endpoint.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -1,32 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws2449;
-
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
-@WebService(name = "Endpoint", targetNamespace =
"http://org.jboss.ws/jbws2449")
-public interface Endpoint
-{
- String echo(String input);
-}
Copied: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/Endpoint.java
(from rev 9105,
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/Endpoint.java)
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/Endpoint.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/Endpoint.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2449;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
+@WebService(name = "Endpoint", targetNamespace =
"http://org.jboss.ws/jbws2449")
+public interface Endpoint
+{
+ String echo(String input);
+}
Deleted:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/EndpointImpl.java
===================================================================
---
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/EndpointImpl.java 2009-01-23
10:52:49 UTC (rev 9105)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/EndpointImpl.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws2449;
-
-import javax.ejb.Stateless;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-import org.jboss.wsf.spi.annotation.WebContext;
-
-@Stateless
-@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
-@WebContext(contextRoot="jaxws-jbws2449", urlPattern="/*")
-@WebService
-(
- name = "Endpoint",
- portName = "EndpointPort",
- serviceName = "EndpointService",
- targetNamespace = "http://org.jboss.ws/jbws2449",
- wsdlLocation = "META-INF/wsdl/test.wsdl"
-)
-public class EndpointImpl implements Endpoint
-{
- @WebMethod
- public String echo(String input)
- {
- return input;
- }
-}
Copied:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/EndpointImpl.java
(from rev 9105,
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/EndpointImpl.java)
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/EndpointImpl.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/EndpointImpl.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2449;
+
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.wsf.spi.annotation.WebContext;
+
+@Stateless
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
+@WebContext(contextRoot="jaxws-jbws2449", urlPattern="/*")
+@WebService
+(
+ name = "Endpoint",
+ portName = "EndpointPort",
+ serviceName = "EndpointService",
+ targetNamespace = "http://org.jboss.ws/jbws2449",
+ wsdlLocation = "META-INF/wsdl/test.wsdl"
+)
+public class EndpointImpl implements Endpoint
+{
+ @WebMethod
+ public String echo(String input)
+ {
+ return input;
+ }
+}
Deleted:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/JBWS2449TestCase.java
===================================================================
---
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/JBWS2449TestCase.java 2009-01-23
10:52:49 UTC (rev 9105)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/JBWS2449TestCase.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws2449;
-
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.RespectBindingFeature;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * [JBWS-2449] Test RespectBindingFeature
- *
- * @author alessio.soldano(a)jboss.com
- * @since 15-Jan-2009
- */
-public class JBWS2449TestCase extends JBossWSTest
-{
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-jbws2449";
-
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS2449TestCase.class,
"jaxws-jbws2449.jar");
- }
-
- public void test() throws Exception
- {
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- QName serviceName = new QName("http://org.jboss.ws/jbws2449",
"EndpointService");
- Endpoint port = Service.create(wsdlURL, serviceName).getPort(Endpoint.class);
- String retObj = port.echo("Hello");
- assertEquals("Hello", retObj);
- }
-
- public void testWithRespectBinding() throws Exception
- {
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- QName serviceName = new QName("http://org.jboss.ws/jbws2449",
"EndpointService");
- try
- {
- Service.create(wsdlURL, serviceName).getPort(Endpoint.class, new
RespectBindingFeature(true));
- fail("Exception expected, the wsdl has an understood required extensibility
element!");
- }
- catch (Exception e)
- {
- //NOOP
- }
- }
-
- public void testWithRespectBinding2() throws Exception
- {
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- QName serviceName = new QName("http://org.jboss.ws/jbws2449",
"EndpointService");
- Endpoint port = Service.create(wsdlURL, serviceName).getPort(Endpoint.class, new
RespectBindingFeature(false));
- String retObj = port.echo("Hello");
- assertEquals("Hello", retObj);
- }
-}
Copied:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/JBWS2449TestCase.java
(from rev 9105,
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/JBWS2449TestCase.java)
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/JBWS2449TestCase.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2449/JBWS2449TestCase.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2449;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.RespectBindingFeature;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2449] Test RespectBindingFeature
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 15-Jan-2009
+ */
+public class JBWS2449TestCase extends JBossWSTest
+{
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-jbws2449";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS2449TestCase.class,
"jaxws-jbws2449.jar");
+ }
+
+ public void test() throws Exception
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jbws2449",
"EndpointService");
+ Endpoint port = Service.create(wsdlURL, serviceName).getPort(Endpoint.class);
+ String retObj = port.echo("Hello");
+ assertEquals("Hello", retObj);
+ }
+
+ public void testWithRespectBinding() throws Exception
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jbws2449",
"EndpointService");
+ try
+ {
+ Service.create(wsdlURL, serviceName).getPort(Endpoint.class, new
RespectBindingFeature(true));
+ fail("Exception expected, the wsdl has an understood required extensibility
element!");
+ }
+ catch (Exception e)
+ {
+ //NOOP
+ }
+ }
+
+ public void testWithRespectBinding2() throws Exception
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jbws2449",
"EndpointService");
+ Endpoint port = Service.create(wsdlURL, serviceName).getPort(Endpoint.class, new
RespectBindingFeature(false));
+ String retObj = port.echo("Hello");
+ assertEquals("Hello", retObj);
+ }
+}
Copied:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMCheckClientHandler.java
(from rev 9105,
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMCheckClientHandler.java)
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMCheckClientHandler.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMCheckClientHandler.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
+ * individual contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of individual
+ * contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site:
http://www.fsf.org.
+ */
+
+package org.jboss.test.ws.jaxws.samples.xop.doclit;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+/**
+ * A SOAPHandler that checks for Include elements in the
+ * outbound SOAPMessage in order to see if MTOM is enabled.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 15-Jan-2009
+ */
+public class MTOMCheckClientHandler implements SOAPHandler<SOAPMessageContext>
+{
+
+ public boolean handleMessage(SOAPMessageContext smc)
+ {
+ try
+ {
+ return check(smc);
+ }
+ catch (Exception e)
+ {
+ throw new WebServiceException(e);
+ }
+ }
+
+ public boolean handleFault(SOAPMessageContext smc)
+ {
+ //NOOP
+ return true;
+ }
+
+ private static boolean check(SOAPMessageContext smc) throws SOAPException,
IOException
+ {
+ Boolean outboundProperty =
(Boolean)smc.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+ if (outboundProperty.booleanValue())
+ {
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ SOAPMessage message = smc.getMessage();
+ message.writeTo(outputStream);
+ String messageString = outputStream.toString();
+ if (!messageString.contains("Include"))
+ throw new IllegalStateException("XOP request inlined");
+ }
+ return true;
+ }
+
+ public void close(MessageContext messageContext)
+ {
+ //NOOP
+ }
+
+ public Set<QName> getHeaders()
+ {
+ return new HashSet<QName>(); //empty set
+ }
+
+}
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpoint.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpoint.java 2009-01-23
15:32:14 UTC (rev 9107)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpoint.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -23,11 +23,9 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-import javax.xml.ws.BindingType;
@WebService(targetNamespace = "http://org.jboss.ws/xop/doclit")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle =
SOAPBinding.ParameterStyle.BARE)
-@BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
public interface MTOMEndpoint
{
public DHResponse echoDataHandler(DHRequest request);
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpointBean.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpointBean.java 2009-01-23
15:32:14 UTC (rev 9107)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpointBean.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -28,13 +28,13 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.ws.WebServiceException;
-import javax.xml.ws.BindingType;
+import javax.xml.ws.soap.MTOM;
import org.jboss.logging.Logger;
@WebService(name = "MTOMEndpoint", serviceName = "MTOMService",
endpointInterface = "org.jboss.test.ws.jaxws.samples.xop.doclit.MTOMEndpoint")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
-@BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
+@MTOM
public class MTOMEndpointBean implements MTOMEndpoint
{
private Logger log = Logger.getLogger(MTOMEndpointBean.class);
Copied:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMFeatureTestCase.java
(from rev 9105,
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMFeatureTestCase.java)
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMFeatureTestCase.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMFeatureTestCase.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -0,0 +1,134 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.xop.doclit;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.activation.DataHandler;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.soap.MTOMFeature;
+import javax.xml.ws.soap.SOAPBinding;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2448] This test verify the MTOMFeature correctly enable MTOM on client side.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 14-Jan-2009
+ */
+public class MTOMFeatureTestCase extends JBossWSTest {
+
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-samples-xop-doclit/bare";
+
+ protected MTOMEndpoint port;
+
+ public static Test suite() {
+ return new JBossWSTestSetup(MTOMFeatureTestCase.class,
"jaxws-samples-xop-doclit.war");
+ }
+
+ private MTOMEndpoint getPort(boolean mtomEnabled) throws Exception {
+ QName serviceName = new
QName("http://doclit.xop.samples.jaxws.ws.test.jboss.org/",
"MTOMService");
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ return service.getPort(MTOMEndpoint.class, new MTOMFeature(mtomEnabled));
+ }
+
+ @SuppressWarnings("unchecked")
+ private static void addMTOMCheckHandler(MTOMEndpoint port) {
+ SOAPBinding binding = (SOAPBinding) ((BindingProvider) port).getBinding();
+ List<Handler> handlerChain = new ArrayList<Handler>();
+ handlerChain.addAll(binding.getHandlerChain());
+ handlerChain.add(new MTOMCheckClientHandler());
+ binding.setHandlerChain(handlerChain);
+ }
+
+ public void testWithMTOMRequest() throws Exception {
+ DataHandler dh = new DataHandler("DataHandlerRoundtrip",
"text/plain");
+ MTOMEndpoint port = getPort(true);
+ addMTOMCheckHandler(port);
+ DHResponse response = port.echoDataHandler(new DHRequest(dh));
+ assertNotNull(response);
+
+ Object content = getContent(response.getDataHandler());
+ String contentType = response.getDataHandler().getContentType();
+
+ assertEquals("Server data", content);
+ assertEquals("text/plain", contentType);
+ }
+
+ public void testWithoutMTOMRequest() throws Exception {
+ DataHandler dh = new DataHandler("DataHandlerResponseOptimzed",
"text/plain");
+ DHResponse response = getPort(false).echoDataHandler(new DHRequest(dh));
+ assertNotNull(response);
+
+ Object content = getContent(response.getDataHandler());
+ String contentType = response.getDataHandler().getContentType();
+
+ assertEquals("Server data", content);
+ assertEquals("text/plain", contentType);
+ }
+
+ public void testErrorWithoutMTOMRequest() throws Exception {
+ DataHandler dh = new DataHandler("DataHandlerResponseOptimzed",
"text/plain");
+ MTOMEndpoint port = getPort(false);
+ addMTOMCheckHandler(port);
+ try
+ {
+ port.echoDataHandler(new DHRequest(dh));
+ fail("Exception expected");
+ }
+ catch (Exception e)
+ {
+ //OK
+ }
+ }
+
+ protected Object getContent(DataHandler dh) throws IOException {
+ Object content = dh.getContent();
+
+ // Metro returns an ByteArrayInputStream
+ if (content instanceof InputStream) {
+ try {
+ BufferedReader br = new BufferedReader(new InputStreamReader(
+ (InputStream) content));
+ return br.readLine();
+ } finally {
+ ((InputStream) content).close();
+ }
+ }
+ return content;
+ }
+}
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java 2009-01-23
15:32:14 UTC (rev 9107)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -21,8 +21,15 @@
*/
package org.jboss.test.ws.jaxws.smoke.tools;
+import java.rmi.RemoteException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Set;
+
+import javax.jws.WebMethod;
import javax.jws.WebService;
-import javax.jws.WebMethod;
+import javax.xml.bind.annotation.XmlList;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
@WebService(targetNamespace = "http://foo.bar.com/calculator")
public class CalculatorBean
@@ -38,4 +45,27 @@
{
return a-b;
}
+
+ @WebMethod
+ public Set<Integer> getKeys(HashMap<Integer, String> map) throws
RuntimeException, RemoteException
+ {
+ if (map != null)
+ return map.keySet();
+ else
+ return null;
+ }
+
+ @WebMethod
+ @XmlList
+ public List<String> processList(@XmlList List<String> list)
+ {
+ return list;
+ }
+
+ @WebMethod
+ @XmlJavaTypeAdapter(CustomAdapter.class)
+ public CustomBean processCustom((a)XmlJavaTypeAdapter(CustomAdapter.class) CustomBean
bean)
+ {
+ return bean;
+ }
}
Copied:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBeanMetro.java
(from rev 9105,
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBeanMetro.java)
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBeanMetro.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBeanMetro.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.smoke.tools;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Set;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlList;
+
+@WebService(targetNamespace = "http://foo.bar.com/calculator",
serviceName="CalculatorBeanService")
+public class CalculatorBeanMetro
+{
+ @WebMethod
+ public int add(int a, int b)
+ {
+ return a+b;
+ }
+
+ @WebMethod
+ public int subtract(int a, int b)
+ {
+ return a-b;
+ }
+
+ @WebMethod
+ public Set<Integer> getKeys(HashMap<Integer, String> map)
+ {
+ if (map != null)
+ return map.keySet();
+ else
+ return null;
+ }
+
+ @WebMethod
+ @XmlList
+ public List<String> processList(@XmlList List<String> list)
+ {
+ return list;
+ }
+}
Copied:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CustomAdapter.java
(from rev 9105,
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CustomAdapter.java)
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CustomAdapter.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CustomAdapter.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.smoke.tools;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+public class CustomAdapter extends XmlAdapter<String, CustomBean>
+{
+
+ @Override
+ public String marshal(CustomBean v) throws Exception
+ {
+ return v.getFistAttribute() + "-" + v.getSecondAttribute();
+ }
+
+ @Override
+ public CustomBean unmarshal(String v) throws Exception
+ {
+ CustomBean b = new CustomBean();
+ b.setFistAttribute(v.substring(0, v.indexOf('-')));
+ b.setSecondAttribute(Long.valueOf(v.substring(v.indexOf('-') + 1)));
+ return b;
+ }
+
+}
Copied:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CustomBean.java
(from rev 9105,
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CustomBean.java)
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CustomBean.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CustomBean.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.smoke.tools;
+
+public class CustomBean
+{
+ private String fistAttribute;
+ private Long secondAttribute;
+
+ public String getFistAttribute()
+ {
+ return fistAttribute;
+ }
+
+ public void setFistAttribute(String fistAttribute)
+ {
+ this.fistAttribute = fistAttribute;
+ }
+
+ public Long getSecondAttribute()
+ {
+ return secondAttribute;
+ }
+
+ public void setSecondAttribute(Long secondAttribute)
+ {
+ this.secondAttribute = secondAttribute;
+ }
+}
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/PluginBase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/PluginBase.java 2009-01-23
15:32:14 UTC (rev 9107)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/PluginBase.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -57,6 +57,8 @@
protected void setupClasspath() throws Exception
{
String classpath = System.getProperty("surefire.test.class.path");
+ if (classpath == null) //no maven surefire classpath hacks required
+ return;
List<URL> jarURLs = new LinkedList<URL>();
StringBuffer jarURLString = new StringBuffer();
List<URL> classDirUrls = new LinkedList<URL>();
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2009-01-23
15:32:14 UTC (rev 9107)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -42,7 +42,7 @@
private static final String EXT = ":".equals( PS ) ? ".sh" :
".bat";
private String WSDL_LOCATION = "jaxws" + FS + "smoke" + FS +
"tools" + FS + "wsdl" + FS + "TestServiceCatalog.wsdl";
- private String ENDPOINT_CLASS =
"org.jboss.test.ws.jaxws.smoke.tools.CalculatorBean";
+ private String ENDPOINT_CLASS;
private String JBOSS_HOME;
private String CLASSES_DIR;
@@ -56,6 +56,8 @@
JBOSS_HOME = System.getProperty("jboss.home");
CLASSES_DIR = System.getProperty("test.classes.directory");
+ //JBWS-2479
+ ENDPOINT_CLASS = isIntegrationMetro() ?
"org.jboss.test.ws.jaxws.smoke.tools.CalculatorBeanMetro" :
"org.jboss.test.ws.jaxws.smoke.tools.CalculatorBean";
TEST_DIR = createResourceFile("..").getAbsolutePath();
origJavaHome = System.getProperty("java.home");
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java 2009-01-23
15:32:14 UTC (rev 9107)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -24,6 +24,7 @@
import org.jboss.wsf.spi.tools.WSContractConsumer;
import org.jboss.wsf.test.JBossWSTest;
+import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.WebServiceFeature;
import java.io.*;
import java.lang.reflect.Method;
@@ -263,41 +264,39 @@
consumer.setTargetPackage("org.jboss.test.ws.tools.testTarget");
consumer.setGenerateSource(true);
consumer.setTarget("2.1");
-
- try
+ consumer.setNoCompile(false);
+
+ //this test is run in binary distribution mode only because the way Maven builds
classpath doesn't allow to run the
+ //wsimport tool in Native stack from a Surefire test (the jaxws classes are of
course loaded from the included
+ //jaxws source module and that causes the Sun's ParallelWorldClassLoader to
throw an exception as EndpointReference
+ //is not loaded from a jar resource)
+ if (Boolean.getBoolean("binary.distribution"))
{
consumeWSDL();
- fail("Target 2.1 should not be supported");
- }
- catch (Exception e)
- {
- File outputDir = new File(outputDirectory,
"org/jboss/test/ws/tools/testTarget");
- outputDir.deleteOnExit();
- return;
- }
-
- URLClassLoader loader = new URLClassLoader(new URL[] { outputDirectory.toURL() });
- String seiClassName = "org.jboss.test.ws.tools.testTarget.TestService";
- Class sei = loader.loadClass(seiClassName);
-
- boolean featureSig = false;
- for (Method m : sei.getDeclaredMethods())
- {
- if (m.getName().equals("getEndpointInterfacePort"))
+ ClassLoader loader = getArtefactClassLoader();
+ Class<?> service =
loader.loadClass("org.jboss.test.ws.tools.testTarget.TestService");
+
+ boolean featureSig = false;
+ for (Method m : service.getDeclaredMethods())
{
- for (Class c : m.getParameterTypes())
+ if (m.getName().equals("getEndpointInterfacePort"))
{
- if (c.isArray() &&
c.getComponentType().equals(WebServiceFeature.class))
+ for (Class<?> c : m.getParameterTypes())
{
- featureSig = true;
- break;
+ if (c.isArray() &&
c.getComponentType().equals(WebServiceFeature.class))
+ {
+ featureSig = true;
+ break;
+ }
}
}
}
+
+ assertTrue("JAX-WS 2.1 extensions not generated with
'target=2.1'", featureSig);
+
+ Class<?> sei =
loader.loadClass("org.jboss.test.ws.tools.testTarget.EndpointInterface");
+ assertTrue("@XmlSeeAlso expected on SEI (types not referenced by the Port
in the wsdl)", sei.isAnnotationPresent(XmlSeeAlso.class));
}
-
- assertTrue("JAX-WS 2.1 extensions not generated with
'target=2.1'", featureSig);
-
}
/**
@@ -332,4 +331,13 @@
if(!sei.exists()) throw new IllegalStateException(sei.getAbsolutePath() + "
doesn't exist!");
return sei;
}
+
+ private ClassLoader getArtefactClassLoader() throws Exception {
+ URLClassLoader loader = new URLClassLoader(
+ new URL[] { outputDirectory.toURL() },
+ Thread.currentThread().getContextClassLoader()
+ );
+
+ return loader;
+ }
}
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2009-01-23
15:32:14 UTC (rev 9107)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2009-01-23
15:37:26 UTC (rev 9108)
@@ -26,10 +26,15 @@
import org.jboss.wsf.test.JBossWSTest;
import org.w3c.dom.Element;
+import javax.xml.bind.annotation.XmlList;
import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileReader;
import java.io.PrintStream;
import java.net.URL;
import java.net.URLClassLoader;
@@ -93,7 +98,7 @@
}
- private void verifyJavaSource(File directory)
+ private void verifyJavaSource(File directory) throws Exception
{
File javaSource = new File(
directory.getAbsolutePath()+
@@ -101,7 +106,41 @@
);
assertTrue("Source not generated", javaSource.exists());
+
+ javaSource = new File(directory.getAbsolutePath() + FS + "org" + FS +
"jboss" + FS + "test" + FS + "ws" + FS + "jaxws" +
FS + "smoke" + FS + "tools" + FS
+ + "jaxws" + FS + "GetKeysResponse.java");
+ assertTrue("Source not generated", javaSource.exists());
+ String contents = readFile(javaSource);
+ //[JBWS-2477] check support for generics
+ assertTrue("Didn't found method \"public Set<Integer>
getReturn()\"", contents.contains("public Set<Integer>
getReturn()"));
+
+ javaSource = new File(directory.getAbsolutePath() + FS + "org" + FS +
"jboss" + FS + "test" + FS + "ws" + FS + "jaxws" +
FS + "smoke" + FS + "tools" + FS
+ + "jaxws" + FS + "ProcessListResponse.java");
+ assertTrue("Source not generated", javaSource.exists());
+ contents = readFile(javaSource);
+ assertTrue("@XmlList not found",
contents.contains("@XmlList"));
+
}
+
+ private String readFile(File file) throws Exception
+ {
+ BufferedReader input = new BufferedReader(new FileReader(file));
+ StringBuilder sb = new StringBuilder();
+ try
+ {
+ String line = null;
+ while ((line = input.readLine()) != null)
+ {
+ sb.append(line);
+ sb.append(System.getProperty("line.separator"));
+ }
+ }
+ finally
+ {
+ input.close();
+ }
+ return sb.toString();
+ }
/**
* Sets the main output directory.
@@ -111,10 +150,24 @@
{
provide();
ClassLoader loader = getArtefactClassLoader();
- Class responseWrapper =
loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.AddResponse");
+ Class<?> responseWrapper =
loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.AddResponse");
XmlRootElement rootElement = (XmlRootElement)
responseWrapper.getAnnotation(XmlRootElement.class);
- assertNotNull("@XmlRootElement missing form response wrapper",
rootElement);
+ assertNotNull("@XmlRootElement missing from response wrapper",
rootElement);
assertEquals("Wrong namespace", rootElement.namespace(),
"http://foo.bar.com/calculator");
+ responseWrapper =
loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.ProcessListResponse");
+ XmlList xmlList = (XmlList)
responseWrapper.getDeclaredField("_return").getAnnotation(XmlList.class);
+ assertNotNull("@XmlList missing from response wrapper's _return
field", xmlList);
+ if (!isIntegrationMetro())
+ {
+ responseWrapper =
loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.ProcessCustomResponse");
+ XmlJavaTypeAdapter xmlJavaTypeAdapter = (XmlJavaTypeAdapter)
responseWrapper.getDeclaredField("_return").getAnnotation(XmlJavaTypeAdapter.class);
+ assertNotNull("@XmlJavaTypeAdapter missing from response wrapper's
_return field", xmlJavaTypeAdapter);
+ assertEquals("org.jboss.test.ws.jaxws.smoke.tools.CustomAdapter",
xmlJavaTypeAdapter.value().getName());
+ }
+ else
+ {
+ System.out.println("FIXME [JBWS-2479] @XmlJavaTypeAdapter on SEI causes
exception");
+ }
}
/**
@@ -230,6 +283,8 @@
{
//provider.setGenerateSource(true);
provider.setOutputDirectory(outputDirectory);
- provider.provide(CalculatorBean.class);
+ //JBWS-2479: using different beans because the whole smoke tools test is supposed
to be run for every stack
+ //and we can't afford excluding it for Metro just because of JBWS-2479
+ provider.provide(isIntegrationMetro() ? CalculatorBeanMetro.class :
CalculatorBean.class);
}
}
Copied: framework/trunk/testsuite/test/resources/jaxws/jbws2449 (from rev 9105,
framework/branches/jaxws21/testsuite/test/resources/jaxws/jbws2449)
Copied: framework/trunk/testsuite/test/resources/jaxws/jbws2449/META-INF (from rev 9105,
framework/branches/jaxws21/testsuite/test/resources/jaxws/jbws2449/META-INF)
Copied: framework/trunk/testsuite/test/resources/jaxws/jbws2449/META-INF/wsdl (from rev
9105, framework/branches/jaxws21/testsuite/test/resources/jaxws/jbws2449/META-INF/wsdl)
Deleted: framework/trunk/testsuite/test/resources/jaxws/jbws2449/META-INF/wsdl/test.wsdl
===================================================================
---
framework/branches/jaxws21/testsuite/test/resources/jaxws/jbws2449/META-INF/wsdl/test.wsdl 2009-01-23
10:52:49 UTC (rev 9105)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws2449/META-INF/wsdl/test.wsdl 2009-01-23
15:37:26 UTC (rev 9108)
@@ -1,54 +0,0 @@
-<definitions name='EndpointService'
targetNamespace='http://org.jboss.ws/jbws2449'
-
xmlns='http://schemas.xmlsoap.org/wsdl/'
-
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
-
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
- xmlns:tns='http://org.jboss.ws/jbws2449'
-
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
-
xmlns:foo='http://foo.org/foo'>
- <types>
- <xs:schema targetNamespace='http://org.jboss.ws/jbws2449'
version='1.0' xmlns:tns='http://org.jboss.ws/jbws2449'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
- <xs:element name='echo' type='tns:echo'/>
- <xs:element name='echoResponse' type='tns:echoResponse'/>
- <xs:complexType name='echo'>
- <xs:sequence>
- <xs:element minOccurs='0' name='arg0'
type='xs:string'/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name='echoResponse'>
- <xs:sequence>
- <xs:element minOccurs='0' name='return'
type='xs:string'/>
- </xs:sequence>
- </xs:complexType>
- </xs:schema>
- </types>
- <message name='Endpoint_echo'>
- <part element='tns:echo' name='echo'></part>
- </message>
- <message name='Endpoint_echoResponse'>
- <part element='tns:echoResponse'
name='echoResponse'></part>
- </message>
- <portType name='Endpoint'>
- <operation name='echo' parameterOrder='echo'>
- <input message='tns:Endpoint_echo'></input>
- <output message='tns:Endpoint_echoResponse'></output>
- </operation>
- </portType>
- <binding name='EndpointBinding' type='tns:Endpoint'>
- <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
- <foo:bar wsdl:required="true"/>
- <operation name='echo'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body use='literal'/>
- </input>
- <output>
- <soap:body use='literal'/>
- </output>
- </operation>
- </binding>
- <service name='EndpointService'>
- <port binding='tns:EndpointBinding' name='EndpointPort'>
- <soap:address location='http://127.0.0.1:8080/jaxws-jbws2449'/>
- </port>
- </service>
-</definitions>
\ No newline at end of file
Copied: framework/trunk/testsuite/test/resources/jaxws/jbws2449/META-INF/wsdl/test.wsdl
(from rev 9105,
framework/branches/jaxws21/testsuite/test/resources/jaxws/jbws2449/META-INF/wsdl/test.wsdl)
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2449/META-INF/wsdl/test.wsdl
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws2449/META-INF/wsdl/test.wsdl 2009-01-23
15:37:26 UTC (rev 9108)
@@ -0,0 +1,54 @@
+<definitions name='EndpointService'
targetNamespace='http://org.jboss.ws/jbws2449'
+
xmlns='http://schemas.xmlsoap.org/wsdl/'
+
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
+
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
+ xmlns:tns='http://org.jboss.ws/jbws2449'
+
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
+
xmlns:foo='http://foo.org/foo'>
+ <types>
+ <xs:schema targetNamespace='http://org.jboss.ws/jbws2449'
version='1.0' xmlns:tns='http://org.jboss.ws/jbws2449'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:element name='echo' type='tns:echo'/>
+ <xs:element name='echoResponse' type='tns:echoResponse'/>
+ <xs:complexType name='echo'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='arg0'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name='echoResponse'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='return'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <message name='Endpoint_echo'>
+ <part element='tns:echo' name='echo'></part>
+ </message>
+ <message name='Endpoint_echoResponse'>
+ <part element='tns:echoResponse'
name='echoResponse'></part>
+ </message>
+ <portType name='Endpoint'>
+ <operation name='echo' parameterOrder='echo'>
+ <input message='tns:Endpoint_echo'></input>
+ <output message='tns:Endpoint_echoResponse'></output>
+ </operation>
+ </portType>
+ <binding name='EndpointBinding' type='tns:Endpoint'>
+ <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <foo:bar wsdl:required="true"/>
+ <operation name='echo'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='EndpointService'>
+ <port binding='tns:EndpointBinding' name='EndpointPort'>
+ <soap:address location='http://127.0.0.1:8080/jaxws-jbws2449'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Modified:
framework/trunk/testsuite/test/resources/jaxws/smoke/tools/wsdl/TestService.wsdl
===================================================================
---
framework/trunk/testsuite/test/resources/jaxws/smoke/tools/wsdl/TestService.wsdl 2009-01-23
15:32:14 UTC (rev 9107)
+++
framework/trunk/testsuite/test/resources/jaxws/smoke/tools/wsdl/TestService.wsdl 2009-01-23
15:37:26 UTC (rev 9108)
@@ -6,7 +6,16 @@
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
- <types/>
+ <types>
+ <xs:schema
targetNamespace='http://foo.bar.com/test' version='1.0'
xmlns:tns='http://foo.bar.com/test'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:complexType name="foo">
+ <xs:sequence>
+ <xs:element name="arg0" type="xs:int"/>
+ <xs:element name="arg1" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
<message name="EndpointInterface_echo">
<part name="String_1" type="xsd:string"/>
</message>