[jbossws-commits] JBossWS SVN: r6612 - in stack/native/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 10:04:10 EDT 2008


Author: richard.opalka at jboss.com
Date: 2008-04-22 10:04:10 -0400 (Tue, 22 Apr 2008)
New Revision: 6612

Added:
   stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/
   stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase.java
   stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceIface.java
   stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceImpl.java
   stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/
   stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHello.java
   stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHelloResponse.java
   stack/native/trunk/src/test/resources/jaxws/samples/wsa/
   stack/native/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/
   stack/native/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/web.xml
   stack/native/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/wsdl/
   stack/native/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/wsdl/AddressingService.wsdl
Modified:
   stack/native/trunk/ant-import-tests/build-samples-jaxws.xml
Log:
[JBWS-2100] adding example based on prepared NATIVE WS-Addressing tutorial

Modified: stack/native/trunk/ant-import-tests/build-samples-jaxws.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-samples-jaxws.xml	2008-04-22 12:09:31 UTC (rev 6611)
+++ stack/native/trunk/ant-import-tests/build-samples-jaxws.xml	2008-04-22 14:04:10 UTC (rev 6612)
@@ -194,7 +194,20 @@
         <include name="org/jboss/test/ws/jaxws/samples/news/SecurePrinter.class"/>
       </fileset>
     </jar>
-    
+
+    <!-- jaxws-samples-wsa -->
+    <war
+       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/wsa/Service*.class"/>
+          <include name="org/jboss/test/ws/jaxws/samples/wsa/jaxws/*.class"/>
+       </classes>
+       <zipfileset
+          dir="${tests.output.dir}/test-resources/jaxws/samples/wsa/WEB-INF/wsdl" 
+          prefix="WEB-INF/wsdl"/>
+    </war>
+
     <!-- 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">
@@ -325,4 +338,4 @@
     
   </target>
   
-</project>
\ No newline at end of file
+</project>

Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase.java	                        (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/AddressingTestCase.java	2008-04-22 14:04:10 UTC (rev 6612)
@@ -0,0 +1,59 @@
+/*
+ * 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.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import junit.framework.Test;
+import org.jboss.ws.core.ConfigProvider;
+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-wsa/AddressingService";
+   
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(AddressingTestCase.class, "jaxws-samples-wsa.war");
+   }
+
+   public void test() throws Exception
+   {
+      // construct proxy
+      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);
+      // configure WS-Addressing
+      ((ConfigProvider)proxy).setConfigName("Standard WSAddressing Client");
+      // invoke method
+      assertEquals("Hello World!", proxy.sayHello());
+   }
+   
+}


Property changes on: stack/native/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/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceIface.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceIface.java	                        (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceIface.java	2008-04-22 14:04:10 UTC (rev 6612)
@@ -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;
+
+ at WebService
+(
+   targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wsaddressing"
+)
+public interface ServiceIface
+{
+   @WebMethod
+   String sayHello();
+}


Property changes on: stack/native/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/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceImpl.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceImpl.java	                        (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/ServiceImpl.java	2008-04-22 14:04:10 UTC (rev 6612)
@@ -0,0 +1,45 @@
+/*
+ * 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;
+import org.jboss.ws.annotation.EndpointConfig;
+
+ at EndpointConfig
+(
+   configName = "Standard WSAddressing Endpoint"
+)
+ 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.wsa.ServiceIface"
+)
+public class ServiceImpl implements ServiceIface
+{
+   public String sayHello()
+   {
+      return "Hello World!";
+   }
+}


Property changes on: stack/native/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/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHello.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHello.java	                        (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHello.java	2008-04-22 14:04:10 UTC (rev 6612)
@@ -0,0 +1,15 @@
+
+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;
+
+ at XmlRootElement(name = "sayHello", namespace = "http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+ at XmlType(name = "sayHello", namespace = "http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+ at XmlAccessorType(XmlAccessType.FIELD)
+public class SayHello {
+
+
+}


Property changes on: stack/native/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/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHelloResponse.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHelloResponse.java	                        (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsa/jaxws/SayHelloResponse.java	2008-04-22 14:04:10 UTC (rev 6612)
@@ -0,0 +1,26 @@
+
+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;
+
+ at XmlRootElement(name = "sayHelloResponse", namespace = "http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+ at XmlType(name = "sayHelloResponse", namespace = "http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+ at XmlAccessorType(XmlAccessType.FIELD)
+public class SayHelloResponse {
+
+    @XmlElement(name = "return", namespace = "")
+    private String _return;
+
+    public String getReturn() {
+        return this._return;
+    }
+
+    public void setReturn(String _return) {
+        this._return = _return;
+    }
+
+}


Property changes on: stack/native/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/native/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/web.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/web.xml	                        (rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/web.xml	2008-04-22 14:04:10 UTC (rev 6612)
@@ -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/native/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/native/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/wsdl/AddressingService.wsdl
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/wsdl/AddressingService.wsdl	                        (rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/wsdl/AddressingService.wsdl	2008-04-22 14:04:10 UTC (rev 6612)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='AddressingService' targetNamespace='http://www.jboss.org/jbossws/ws-extensions/wsaddressing' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://www.jboss.org/jbossws/ws-extensions/wsaddressing' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+  <xs:schema targetNamespace='http://www.jboss.org/jbossws/ws-extensions/wsaddressing' version='1.0' 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 minOccurs='0' name='return' type='xs:string'/>
+    </xs:sequence>
+   </xs:complexType>
+  </xs:schema>
+ </types>
+ <message name='ServiceIface_sayHello'>
+  <part element='tns:sayHello' name='sayHello'/>
+ </message>
+ <message name='ServiceIface_sayHelloResponse'>
+  <part element='tns:sayHelloResponse' name='sayHelloResponse'/>
+ </message>
+ <portType name='ServiceIface'>
+  <operation name='sayHello' parameterOrder='sayHello'>
+   <input message='tns:ServiceIface_sayHello'/>
+   <output message='tns:ServiceIface_sayHelloResponse'/>
+  </operation>
+ </portType>
+ <binding name='ServiceIfaceBinding' type='tns:ServiceIface'>
+  <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
+  <operation name='sayHello'>
+   <soap:operation soapAction=''/>
+   <input>
+    <soap:body use='literal'/>
+   </input>
+   <output>
+    <soap:body use='literal'/>
+   </output>
+  </operation>
+ </binding>
+ <service name='AddressingService'>
+  <port binding='tns:ServiceIfaceBinding' name='AddressingServicePort'>
+   <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+   <UsingAddressing xmlns="http://www.w3.org/2006/05/addressing/wsdl"/>
+  </port>
+ </service>
+</definitions>


Property changes on: stack/native/trunk/src/test/resources/jaxws/samples/wsa/WEB-INF/wsdl/AddressingService.wsdl
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jbossws-commits mailing list