[jbossws-commits] JBossWS SVN: r6608 - in stack/metro/trunk: src/test/java/org/jboss/test/ws/jaxws/samples and 6 other directories.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Tue Apr 22 06:13:12 EDT 2008
Author: richard.opalka at jboss.com
Date: 2008-04-22 06:13:12 -0400 (Tue, 22 Apr 2008)
New Revision: 6608
Added:
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/AddressingTestCase.java
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServiceIface.java
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServiceImpl.java
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws/
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws/SayHello.java
stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws/SayHelloResponse.java
stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/
stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/
stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/web.xml
stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/wsdl/
stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/wsdl/AddressingService.wsdl
stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/wsdl/AddressingService_schema1.xsd
Modified:
stack/metro/trunk/ant-import-tests/build-samples-jaxws.xml
Log:
[JBWS-2100] adding example based on prepared METRO WS-Addressing tutorial
Modified: stack/metro/trunk/ant-import-tests/build-samples-jaxws.xml
===================================================================
--- stack/metro/trunk/ant-import-tests/build-samples-jaxws.xml 2008-04-22 09:34:20 UTC (rev 6607)
+++ stack/metro/trunk/ant-import-tests/build-samples-jaxws.xml 2008-04-22 10:13:12 UTC (rev 6608)
@@ -18,6 +18,19 @@
<mkdir dir="${tests.output.dir}/test-libs"/>
+ <!-- jaxws-samples-wsaddressing -->
+ <war
+ warfile="${tests.output.dir}/test-libs/jaxws-samples-wsaddressing.war"
+ webxml="${tests.output.dir}/test-resources/jaxws/samples/wsaddressing/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"/>
+ </classes>
+ <zipfileset
+ dir="${tests.output.dir}/test-resources/jaxws/samples/wsaddressing/WEB-INF/wsdl"
+ prefix="WEB-INF/wsdl"/>
+ </war>
+
<!-- jaxws-samples-wsrm -->
<war
warfile="${tests.output.dir}/test-libs/jaxws-samples-wsrm.war"
Added: stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/AddressingTestCase.java
===================================================================
--- stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/AddressingTestCase.java (rev 0)
+++ stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/AddressingTestCase.java 2008-04-22 10:13:12 UTC (rev 6608)
@@ -0,0 +1,55 @@
+/*
+ * 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.wsaddressing;
+
+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;
+
+/**
+ * Client invoking web service using WS-Addressing
+ *
+ * @author richard.opalka at jboss.com
+ */
+public final class AddressingTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() + ":8080/jaxws-samples-wsaddressing/AddressingService";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(AddressingTestCase.class, "jaxws-samples-wsaddressing.war");
+ }
+
+ public void test() throws Exception
+ {
+ 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);
+ ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
+
+ assertEquals("Hello World!", proxy.sayHello());
+ }
+
+}
Property changes on: stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/AddressingTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServiceIface.java
===================================================================
--- stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServiceIface.java (rev 0)
+++ stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServiceIface.java 2008-04-22 10:13:12 UTC (rev 6608)
@@ -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.wsaddressing;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+ at WebService
+(
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wsaddressing"
+)
+public interface ServiceIface
+{
+ @WebMethod
+ String sayHello();
+}
Property changes on: stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServiceIface.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServiceImpl.java
===================================================================
--- stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServiceImpl.java (rev 0)
+++ stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServiceImpl.java 2008-04-22 10:13:12 UTC (rev 6608)
@@ -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.wsaddressing;
+
+import javax.jws.WebService;
+
+ at 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.wsaddressing.ServiceIface"
+)
+public class ServiceImpl implements ServiceIface
+{
+ public String sayHello()
+ {
+ return "Hello World!";
+ }
+}
Property changes on: stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServiceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws/SayHello.java
===================================================================
--- stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws/SayHello.java (rev 0)
+++ stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws/SayHello.java 2008-04-22 10:13:12 UTC (rev 6608)
@@ -0,0 +1,15 @@
+
+package org.jboss.test.ws.jaxws.samples.wsaddressing.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;
+
+ at XmlRootElement(name = "sayHello", namespace = "http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "sayHello", namespace = "http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+public class SayHello {
+
+
+}
Property changes on: stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws/SayHello.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws/SayHelloResponse.java
===================================================================
--- stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws/SayHelloResponse.java (rev 0)
+++ stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws/SayHelloResponse.java 2008-04-22 10:13:12 UTC (rev 6608)
@@ -0,0 +1,36 @@
+
+package org.jboss.test.ws.jaxws.samples.wsaddressing.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;
+
+ at XmlRootElement(name = "sayHelloResponse", namespace = "http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "sayHelloResponse", namespace = "http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+public class SayHelloResponse {
+
+ @XmlElement(name = "return", namespace = "")
+ private String _return;
+
+ /**
+ *
+ * @return
+ * returns String
+ */
+ public String getReturn() {
+ return this._return;
+ }
+
+ /**
+ *
+ * @param _return
+ * the value for the _return property
+ */
+ public void setReturn(String _return) {
+ this._return = _return;
+ }
+
+}
Property changes on: stack/metro/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/jaxws/SayHelloResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/web.xml
===================================================================
--- stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/web.xml (rev 0)
+++ stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/web.xml 2008-04-22 10:13:12 UTC (rev 6608)
@@ -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.wsaddressing.ServiceImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>AddressingService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Property changes on: stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/wsdl/AddressingService.wsdl
===================================================================
--- stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/wsdl/AddressingService.wsdl (rev 0)
+++ stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/wsdl/AddressingService.wsdl 2008-04-22 10:13:12 UTC (rev 6608)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3-b02-. -->
+<definitions targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wsaddressing" name="AddressingService" xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wsaddressing" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://www.jboss.org/jbossws/ws-extensions/wsaddressing" schemaLocation="AddressingService_schema1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="ServiceIface">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="AddressingServicePortBinding" type="tns:ServiceIface">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="AddressingService">
+ <port name="AddressingServicePort" binding="tns:AddressingServicePortBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ <UsingAddressing xmlns="http://www.w3.org/2006/05/addressing/wsdl"/>
+ </port>
+ </service>
+</definitions>
Property changes on: stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/wsdl/AddressingService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/wsdl/AddressingService_schema1.xsd
===================================================================
--- stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/wsdl/AddressingService_schema1.xsd (rev 0)
+++ stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/wsdl/AddressingService_schema1.xsd 2008-04-22 10:13:12 UTC (rev 6608)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema version="1.0" targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wsaddressing" xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wsaddressing" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="tns:sayHello"/>
+
+ <xs:element name="sayHelloResponse" type="tns:sayHelloResponse"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence/>
+ </xs:complexType>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
Property changes on: stack/metro/trunk/src/test/resources/jaxws/samples/wsaddressing/WEB-INF/wsdl/AddressingService_schema1.xsd
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
More information about the jbossws-commits
mailing list