[jbossws-commits] JBossWS SVN: r8455 - in framework/trunk/testsuite/test: java/org/jboss/test/ws/jaxws and 1 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Mon Oct 13 11:42:25 EDT 2008


Author: alessio.soldano at jboss.com
Date: 2008-10-13 11:42:25 -0400 (Mon, 13 Oct 2008)
New Revision: 8455

Added:
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/JBWS2183TestCase.java
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/TestService.java
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/TestServiceImpl.java
Modified:
   framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-2183] Adding testcase


Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml	2008-10-13 11:36:31 UTC (rev 8454)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml	2008-10-13 15:42:25 UTC (rev 8455)
@@ -515,6 +515,14 @@
         <include name="schema/**"/>
       </webinf>
     </war>
+  	
+    <!-- jaxws-jbws2183 -->
+    <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2183.jar">
+      <fileset dir="${tests.output.dir}/test-classes">
+        <include name="org/jboss/test/ws/jaxws/jbws2183/**/*.class"/>
+        <exclude name="org/jboss/test/ws/jaxws/jbws2183/**/*TestCase.class"/>
+      </fileset>
+    </jar>
 
     <!-- jaxws-jbws2218 -->
     <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2218.jar">

Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/JBWS2183TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/JBWS2183TestCase.java	                        (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/JBWS2183TestCase.java	2008-10-13 15:42:25 UTC (rev 8455)
@@ -0,0 +1,69 @@
+/*
+ * 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.jbws2183;
+
+import java.net.URL;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.soap.SOAPBinding;
+import javax.wsdl.extensions.soap12.SOAP12Binding;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * @author alessio.soldano at jboss.org
+ * @since 13-Oct-2008
+ */
+public class JBWS2183TestCase extends JBossWSTest
+{
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(JBWS2183TestCase.class, "jaxws-jbws2183.jar");
+   }
+
+   public void testAccessInventoryServiceWsdl() throws Exception
+   {
+      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws2183/TestServiceImpl?wsdl");
+      WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+      Definition wsdlDefinition = wsdlReader.readWSDL(wsdlURL.toString());
+      assertNotNull(wsdlDefinition);
+      List extElements = wsdlDefinition.getBinding(new QName("http://www.jboss.org/jbws2183","TestServiceBinding")).getExtensibilityElements();
+      boolean found = false;
+      for (int i = 0; i < extElements.size(); i++)
+      {
+         ExtensibilityElement extElement = (ExtensibilityElement)extElements.get(i);
+         if (extElement instanceof SOAP12Binding)
+            found = true;
+         else if (extElement instanceof SOAPBinding)
+            fail("SOAP 1.1 Binding found!");
+      }
+      assertTrue("SOAP 1.2 Binding not found!",found);
+   }
+}


Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/JBWS2183TestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/TestService.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/TestService.java	                        (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/TestService.java	2008-10-13 15:42:25 UTC (rev 8455)
@@ -0,0 +1,34 @@
+/*
+ * 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.jbws2183;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.BindingType;
+
+ at WebService(targetNamespace = "http://www.jboss.org/jbws2183")
+ at SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL)
+ at BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
+public interface TestService
+{
+   public String echo(String message);
+}


Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/TestService.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/TestServiceImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/TestServiceImpl.java	                        (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/TestServiceImpl.java	2008-10-13 15:42:25 UTC (rev 8455)
@@ -0,0 +1,43 @@
+/*
+ * 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.jbws2183;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import javax.xml.ws.BindingType;
+
+import org.jboss.logging.Logger;
+
+ at WebService(endpointInterface="org.jboss.test.ws.jaxws.jbws2183.TestService")
+ at Stateless
+ at BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
+public class TestServiceImpl
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(TestServiceImpl.class);
+   
+   public String echo(String message)
+   {
+      log.info("echo:" + message);
+      return "Echo: " + message;
+   }
+}


Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2183/TestServiceImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jbossws-commits mailing list