Author: richard.opalka(a)jboss.com
Date: 2008-04-22 10:36:26 -0400 (Tue, 22 Apr 2008)
New Revision: 6614
Added:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase.java
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceIface.java
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceImpl.java
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHello.java
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHelloResponse.java
stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/
stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/
stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/jbossws-cxf.xml
stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/web.xml
stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/wsdl/
stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/wsdl/AddressingService.wsdl
stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/cxf-client-config.xml
Removed:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/
stack/cxf/trunk/src/test/resources/jaxws/samples/wsaddressing/
Modified:
stack/cxf/trunk/ant-import-tests/build-samples-jaxws.xml
Log:
[JBWS-2100] refactoring
Modified: stack/cxf/trunk/ant-import-tests/build-samples-jaxws.xml
===================================================================
--- stack/cxf/trunk/ant-import-tests/build-samples-jaxws.xml 2008-04-22 14:22:13 UTC (rev
6613)
+++ stack/cxf/trunk/ant-import-tests/build-samples-jaxws.xml 2008-04-22 14:36:26 UTC (rev
6614)
@@ -18,19 +18,19 @@
<mkdir dir="${tests.output.dir}/test-libs"/>
- <!-- jaxws-samples-wsaddressing -->
+ <!-- jaxws-samples-wsa -->
<war
- warfile="${tests.output.dir}/test-libs/jaxws-samples-wsaddressing.war"
-
webxml="${tests.output.dir}/test-resources/jaxws/samples/wsaddressing/WEB-INF/web.xml">
+ warfile="${tests.output.dir}/test-libs/jaxws-samples-wsa.war"
+
webxml="${tests.output.dir}/test-resources/jaxws/samples/wsa/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/wsaddressing/Service*.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws/*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsa/Service*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/wsa/jaxws/*.class"/>
</classes>
- <webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsaddressing/WEB-INF">
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/wsa/WEB-INF">
<include name="jbossws-cxf.xml"/>
</webinf>
<zipfileset
-
dir="${tests.output.dir}/test-resources/jaxws/samples/wsaddressing/WEB-INF/wsdl"
+
dir="${tests.output.dir}/test-resources/jaxws/samples/wsa/WEB-INF/wsdl"
prefix="WEB-INF/wsdl"/>
</war>
Added:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase.java
===================================================================
---
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase.java
(rev 0)
+++
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase.java 2008-04-22
14:36:26 UTC (rev 6614)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.wsa;
+
+import java.io.File;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import junit.framework.Test;
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Client invoking web service using WS-Addressing
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public final class AddressingTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-samples-wsa/AddressingService";
+ private ServiceIface proxy;
+ private Bus bus;
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(AddressingTestCase.class,
"jaxws-samples-wsa.war");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ SpringBusFactory busFactory = new SpringBusFactory();
+ URL cxfConfig = new
File("test-resources/jaxws/samples/wsa/cxf-client-config.xml").toURL();
+ bus = busFactory.createBus(cxfConfig);
+ busFactory.setDefaultBus(bus);
+
+ QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wsaddressing",
"AddressingService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ proxy = (ServiceIface)service.getPort(ServiceIface.class);
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ bus.shutdown(true);
+
+ super.tearDown();
+ }
+
+ public void test() throws Exception
+ {
+ assertEquals("Hello World!", proxy.sayHello());
+ }
+
+}
Property changes on:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceIface.java
===================================================================
--- stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceIface.java
(rev 0)
+++
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceIface.java 2008-04-22
14:36:26 UTC (rev 6614)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.wsa;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService
+(
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wsaddressing"
+)
+public interface ServiceIface
+{
+ @WebMethod
+ String sayHello();
+}
Property changes on:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceIface.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceImpl.java
===================================================================
--- stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceImpl.java
(rev 0)
+++
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceImpl.java 2008-04-22
14:36:26 UTC (rev 6614)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.wsa;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ portName = "AddressingServicePort",
+ serviceName = "AddressingService",
+ wsdlLocation = "WEB-INF/wsdl/AddressingService.wsdl",
+ targetNamespace =
"http://www.jboss.org/jbossws/ws-extensions/wsaddressing",
+ endpointInterface = "org.jboss.test.ws.jaxws.samples.wsa.ServiceIface"
+)
+public class ServiceImpl implements ServiceIface
+{
+ public String sayHello()
+ {
+ return "Hello World!";
+ }
+}
Property changes on:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHello.java
===================================================================
--- stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHello.java
(rev 0)
+++
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHello.java 2008-04-22
14:36:26 UTC (rev 6614)
@@ -0,0 +1,24 @@
+
+package org.jboss.test.ws.jaxws.samples.wsa.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * This class was generated by the CXF 2.0.5-incubator
+ * Mon Apr 21 16:36:02 CEST 2008
+ * Generated source version: 2.0.5-incubator
+ *
+ */
+
+@XmlRootElement(name = "sayHello", namespace =
"http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sayHello", namespace =
"http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+
+public class SayHello {
+
+
+}
+
Property changes on:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHello.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHelloResponse.java
===================================================================
---
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHelloResponse.java
(rev 0)
+++
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHelloResponse.java 2008-04-22
14:36:26 UTC (rev 6614)
@@ -0,0 +1,35 @@
+
+package org.jboss.test.ws.jaxws.samples.wsa.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * This class was generated by the CXF 2.0.5-incubator
+ * Mon Apr 21 16:36:02 CEST 2008
+ * Generated source version: 2.0.5-incubator
+ *
+ */
+
+@XmlRootElement(name = "sayHelloResponse", namespace =
"http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sayHelloResponse", namespace =
"http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+
+public class SayHelloResponse {
+
+ @XmlElement(name = "return")
+ private java.lang.String _return;
+
+ public java.lang.String get_return() {
+ return this._return;
+ }
+
+ public void set_return( java.lang.String new_return ) {
+ this._return = new_return;
+ }
+
+}
+
Property changes on:
stack/cxf/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHelloResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/jbossws-cxf.xml
===================================================================
--- stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/jbossws-cxf.xml
(rev 0)
+++
stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/jbossws-cxf.xml 2008-04-22
14:36:26 UTC (rev 6614)
@@ -0,0 +1,23 @@
+<beans
+
xmlns='http://www.springframework.org/schema/beans'
+
xmlns:jaxws='http://cxf.apache.org/jaxws'
+
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+
xmlns:wsa="http://cxf.apache.org/ws/addressing"
+ xsi:schemaLocation='
+
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+ '>
+
+ <jaxws:endpoint
+ id='ServiceImpl'
+ address='http://@jboss.bind.address@:8080/jaxws-samples-wsa'
+ implementor='org.jboss.test.ws.jaxws.samples.wsa.ServiceImpl'>
+ <jaxws:invoker>
+ <bean class='org.jboss.wsf.stack.cxf.InvokerJSE'/>
+ </jaxws:invoker>
+ <jaxws:features>
+ <wsa:addressing usingAddressingAdvisory="false"
allowDuplicates="false"/>
+ </jaxws:features>
+ </jaxws:endpoint>
+
+</beans>
Property changes on:
stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/jbossws-cxf.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/web.xml
(rev 0)
+++ stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/web.xml 2008-04-22
14:36:26 UTC (rev 6614)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
+ version="2.5"
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/web-app_2_5.xsd">
+ <servlet>
+ <servlet-name>AddressingService</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.samples.wsa.ServiceImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>AddressingService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Property changes on: stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/wsdl/AddressingService.wsdl
===================================================================
---
stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/wsdl/AddressingService.wsdl
(rev 0)
+++
stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/wsdl/AddressingService.wsdl 2008-04-22
14:36:26 UTC (rev 6614)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="AddressingService"
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wsaddres...
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wsaddressing&q...
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wsaddressing&q...
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wsaddres...
+<xsd:element name="sayHello" type="tns:sayHello"/>
+<xsd:complexType name="sayHello">
+<xsd:sequence/>
+</xsd:complexType>
+<xsd:element name="sayHelloResponse"
type="tns:sayHelloResponse"/>
+<xsd:complexType name="sayHelloResponse">
+<xsd:sequence>
+<xsd:element minOccurs="0" name="return"
type="xsd:string"/>
+</xsd:sequence>
+</xsd:complexType>
+</xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="sayHelloResponse">
+ <wsdl:part name="parameters"
element="tns:sayHelloResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="sayHello">
+ <wsdl:part name="parameters" element="tns:sayHello">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="ServiceIface">
+ <wsdl:operation name="sayHello">
+ <wsdl:input name="sayHello" message="tns:sayHello">
+ </wsdl:input>
+ <wsdl:output name="sayHelloResponse"
message="tns:sayHelloResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="AddressingServiceSoapBinding"
type="tns:ServiceIface">
+ <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="AddressingService">
+ <wsdl:port name="AddressingServicePort"
binding="tns:AddressingServiceSoapBinding">
+ <soap:address location="http://localhost:9090/hello"/>
+ <UsingAddressing
xmlns="http://www.w3.org/2006/05/addressing/wsdl"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Property changes on:
stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/wsdl/AddressingService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/cxf-client-config.xml
===================================================================
--- stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/cxf-client-config.xml
(rev 0)
+++ stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/cxf-client-config.xml 2008-04-22
14:36:26 UTC (rev 6614)
@@ -0,0 +1,18 @@
+<beans
+
xmlns="http://www.springframework.org/schema/beans"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xmlns:cxf="http://cxf.apache.org/core"
+
xmlns:wsa="http://cxf.apache.org/ws/addressing"
+ xsi:schemaLocation="
+
http://cxf.apache.org/core
+
http://cxf.apache.org/schemas/core.xsd
+
http://www.springframework.org/schema/beans
+
http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <cxf:bus>
+ <cxf:features>
+ <wsa:addressing/>
+ </cxf:features>
+ </cxf:bus>
+
+</beans>
Property changes on:
stack/cxf/trunk/src/test/resources/jaxws/samples/wsa/cxf-client-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF