Author: alessio.soldano(a)jboss.com
Date: 2010-04-15 11:48:09 -0400 (Thu, 15 Apr 2010)
New Revision: 12002
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2999/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2999/Hello.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2999/HelloBean.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2999/JBWS2999TestCase.java
framework/trunk/testsuite/test/resources/jaxws/jbws2999/
framework/trunk/testsuite/test/resources/jaxws/jbws2999/META-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws2999/META-INF/ejb-jar.xml
framework/trunk/testsuite/test/resources/jaxws/jbws2999/META-INF/webservices.xml
framework/trunk/testsuite/test/resources/jaxws/jbws2999/META-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/jbws2999/META-INF/wsdl/HelloService.wsdl
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-2999] Adding testcase
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-04-15 15:45:40 UTC
(rev 12001)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2010-04-15 15:48:09 UTC
(rev 12002)
@@ -903,6 +903,19 @@
</webinf>
</war>
+ <!-- jaxws-jbws2999 -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2999.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2999/*.class" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws2999/*TestCase.class" />
+ </fileset>
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/jbws2999/META-INF">
+ <include name="ejb-jar.xml" />
+ <include name="webservices.xml" />
+ <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">
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2999/Hello.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2999/Hello.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2999/Hello.java 2010-04-15
15:48:09 UTC (rev 12002)
@@ -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.jbws2999;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name = "Hello", targetNamespace = "http://Hello.org")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public abstract interface Hello {
+
+ @WebMethod
+ @WebResult(name = "result", partName = "result")
+ public abstract String helloEcho(@WebParam(name = "Param1", partName =
"Param1") String paramString);
+}
\ No newline at end of file
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2999/HelloBean.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2999/HelloBean.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2999/HelloBean.java 2010-04-15
15:48:09 UTC (rev 12002)
@@ -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.jbws2999;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+@WebService(portName = "JunkPortName",
+ serviceName = "JunkServiceName",
+ targetNamespace = "http://Hello.org",
+ wsdlLocation = "META-INF/wsdl/HelloService.wsdl",
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws2999.Hello")
+@Stateless(name = "jbws2999Test")
+public class HelloBean {
+ public String helloEcho(String s) {
+ return s;
+ }
+}
\ No newline at end of file
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2999/JBWS2999TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2999/JBWS2999TestCase.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2999/JBWS2999TestCase.java 2010-04-15
15:48:09 UTC (rev 12002)
@@ -0,0 +1,66 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2009, 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.jbws2999;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2999] cxf webservices.xml override with jaxws
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 15-Apr-2010
+ */
+public class JBWS2999TestCase extends JBossWSTest
+{
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS2999TestCase.class,
"jaxws-jbws2999.jar");
+ }
+
+ private Hello getPort() throws Exception
+ {
+
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2999/HelloBean?wsdl");
+ QName serviceName = new QName("http://Hello.org",
"HelloService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+
+ return service.getPort(Hello.class);
+ }
+
+ public void testCall() throws Exception
+ {
+ String message = "Hi";
+ String response = getPort().helloEcho(message);
+ assertEquals(message, response);
+ }
+
+}
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2999/META-INF/ejb-jar.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2999/META-INF/ejb-jar.xml
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws2999/META-INF/ejb-jar.xml 2010-04-15
15:48:09 UTC (rev 12002)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
+ <display-name>WSEjbOverrideWSRefHCWithDDsTest_ejb</display-name>
+ <enterprise-beans>
+ <session>
+ <display-name>jbws2999Test</display-name>
+ <ejb-name>jbws2999Test</ejb-name>
+ <ejb-class>org.jboss.test.ws.jaxws.jbws2999.HelloBean</ejb-class>
+ <session-type>Stateless</session-type>
+ <transaction-type>Container</transaction-type>
+ <security-identity>
+ <description></description>
+ <use-caller-identity></use-caller-identity>
+ </security-identity>
+ </session>
+ </enterprise-beans>
+
+ <assembly-descriptor>
+ <container-transaction>
+ <method>
+ <ejb-name>jbws2999Test</ejb-name>
+ <method-name>helloEcho</method-name>
+ </method>
+ <trans-attribute>Supports</trans-attribute>
+ </container-transaction>
+ </assembly-descriptor>
+</ejb-jar>
\ No newline at end of file
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2999/META-INF/webservices.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2999/META-INF/webservices.xml
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws2999/META-INF/webservices.xml 2010-04-15
15:48:09 UTC (rev 12002)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<webservices
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsdl="http://Hello.org"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/javaee_web_services_1_2.xsd"
version="1.2">
+ <webservice-description>
+ <webservice-description-name>HelloService</webservice-description-name>
+ <wsdl-file>META-INF/wsdl/HelloService.wsdl</wsdl-file>
+ <port-component>
+ <port-component-name>HelloBean</port-component-name>
+ <wsdl-service>wsdl:HelloService</wsdl-service>
+ <wsdl-port>wsdl:Hello</wsdl-port>
+
<service-endpoint-interface>org.jboss.test.ws.jaxws.jbws2999.Hello</service-endpoint-interface>
+ <service-impl-bean>
+ <ejb-link>jbws2999Test</ejb-link>
+ </service-impl-bean>
+ </port-component>
+ </webservice-description>
+</webservices>
\ No newline at end of file
Added:
framework/trunk/testsuite/test/resources/jaxws/jbws2999/META-INF/wsdl/HelloService.wsdl
===================================================================
---
framework/trunk/testsuite/test/resources/jaxws/jbws2999/META-INF/wsdl/HelloService.wsdl
(rev 0)
+++
framework/trunk/testsuite/test/resources/jaxws/jbws2999/META-INF/wsdl/HelloService.wsdl 2010-04-15
15:48:09 UTC (rev 12002)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://Hello.org"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="HelloService"
targetNamespace="http://Hello.org">
+ <types />
+ <message name="Hello_helloRequest">
+ <part name="Param1" type="xsd:string" />
+ </message>
+ <message name="Hello_helloResponse">
+ <part name="result" type="xsd:string" />
+ </message>
+ <portType name="Hello">
+ <operation name="helloEcho" parameterOrder="Param1">
+ <input message="tns:Hello_helloRequest" />
+ <output message="tns:Hello_helloResponse" />
+ </operation>
+ </portType>
+ <binding name="HelloBinding" type="tns:Hello">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="rpc" />
+ <operation name="helloEcho">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal" namespace="http://Hello.org"
/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://Hello.org"
/>
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloService">
+ <port name="Hello" binding="tns:HelloBinding">
+ <soap:address location="http://foo:9999/bar"/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file