[jbossws-commits] JBossWS SVN: r6292 - in stack/native/trunk: src/test/java/org/jboss/test/ws/jaxws and 4 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Apr 9 05:02:20 EDT 2008


Author: thomas.diesler at jboss.com
Date: 2008-04-09 05:02:20 -0400 (Wed, 09 Apr 2008)
New Revision: 6292

Added:
   stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/
   stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocRequest.java
   stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocResponse.java
   stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/Endpoint.java
   stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/EndpointImpl.java
   stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java
   stack/native/trunk/src/test/resources/jaxws/jbws1809/
   stack/native/trunk/src/test/resources/jaxws/jbws1809/META-INF/
   stack/native/trunk/src/test/resources/jaxws/jbws1809/META-INF/jaxb-intros.xml
Modified:
   stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
Log:
Move jbws1809 to native

Modified: stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-jars-jaxws.xml	2008-04-09 09:00:07 UTC (rev 6291)
+++ stack/native/trunk/ant-import-tests/build-jars-jaxws.xml	2008-04-09 09:02:20 UTC (rev 6292)
@@ -169,6 +169,15 @@
       </classes>
     </war>
     
+    <!-- jaxws-jbws1809 -->
+    <jar destfile="${tests.output.dir}/libs/jaxws-jbws1809.jar">
+      <fileset dir="${tests.output.dir}/classes">
+        <include name="org/jboss/test/ws/jaxws/jbws1809/*.class"/>
+        <exclude name="org/jboss/test/ws/jaxws/jbws1809/*TestCase.class"/>
+      </fileset>
+      <metainf dir="${tests.output.dir}/resources/jaxws/jbws1809/META-INF"/>
+    </jar>
+    
   	<!-- jaxws-jbws1814 -->
     <war warfile="${tests.output.dir}/libs/jaxws-jbws1814.war" webxml="${tests.output.dir}/resources/jaxws/jbws1814/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">

Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocRequest.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocRequest.java	                        (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocRequest.java	2008-04-09 09:02:20 UTC (rev 6292)
@@ -0,0 +1,41 @@
+/*
+ * 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.jbws1809;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+public class DocRequest
+{
+   String value;
+
+   public String getValue()
+   {
+      return value;
+   }
+
+   public void setValue(String value)
+   {
+      this.value = value;
+   }
+}


Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocRequest.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocResponse.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocResponse.java	                        (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocResponse.java	2008-04-09 09:02:20 UTC (rev 6292)
@@ -0,0 +1,42 @@
+/*
+ * 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.jbws1809;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+public class DocResponse
+{
+   String value;
+
+
+   public String getValue()
+   {
+      return value;
+   }
+
+   public void setValue(String value)
+   {
+      this.value = value;
+   }
+}


Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/DocResponse.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/Endpoint.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/Endpoint.java	                        (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/Endpoint.java	2008-04-09 09:02:20 UTC (rev 6292)
@@ -0,0 +1,38 @@
+/*
+ * 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.jbws1809;
+
+import javax.ejb.Remote;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+ at Remote
+ at WebService(targetNamespace = "http://org.jboss.ws/jaxbintro/wsdl")
+ at SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface Endpoint
+{
+   DocResponse processDocument(DocRequest req);
+}


Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/Endpoint.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/EndpointImpl.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/EndpointImpl.java	                        (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/EndpointImpl.java	2008-04-09 09:02:20 UTC (rev 6292)
@@ -0,0 +1,46 @@
+/*
+ * 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.jbws1809;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+ at Stateless
+ at WebService(
+  targetNamespace = "http://org.jboss.ws/jaxbintro/wsdl",
+  endpointInterface = "org.jboss.test.ws.jaxws.jbws1809.Endpoint"
+)
+ at SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public class EndpointImpl implements Endpoint
+{
+   public DocResponse processDocument(DocRequest req)
+   {
+      DocResponse res = new DocResponse();
+      res.setValue(req.getValue()+"Response");
+      return res;  
+   }
+}


Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/EndpointImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java	                        (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java	2008-04-09 09:02:20 UTC (rev 6292)
@@ -0,0 +1,82 @@
+/*
+ * 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.jbws1809;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import java.net.URL;
+import java.util.Iterator;
+
+/**
+ * Test the JAXBIntroduction features.
+ *
+ * Check if the WSDL is generated correctly.
+ * The introduction should turn a property into a xsd:attribute declaration.
+ *
+ * @author heiko.braun at jboss.com
+ */
+public class JBWS1809TestCase extends JBossWSTest
+{
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(JBWS1809TestCase.class, "jaxws-jbws1809.jar");
+   }
+
+   public void testWSDLAccess() throws Exception
+   {
+      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1809/EndpointImpl?wsdl");
+
+      Document doc = DOMUtils.getDocumentBuilder().parse(wsdlURL.toString());
+      Element types = (Element)((Element)doc.getDocumentElement()
+         .getElementsByTagNameNS("http://schemas.xmlsoap.org/wsdl/", "types").item(0))
+            .getElementsByTagNameNS("http://www.w3.org/2001/XMLSchema", "schema").item(0);
+      Iterator it = DOMUtils.getChildElements(types, "complexType");
+
+      boolean foundAttributeDeclaration = false;
+      while(it.hasNext())
+      {
+         Element next = (Element)it.next();
+         if(DOMUtils.getAttributeValue(next, "name").equals("docRequest"))
+         {
+            Iterator it2 = DOMUtils.getChildElements(next, "attribute");
+
+            while(it2.hasNext())
+            {
+               Element next2 = (Element)it2.next();
+               if(DOMUtils.getAttributeValue(next2, "name").equals("value"))
+               {
+                  foundAttributeDeclaration = true;
+               }
+            }
+         }
+      }
+
+      assertTrue("JAXBIntros should turn the 'docRequest.name' property into a XML attribute", foundAttributeDeclaration);
+   }
+}


Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1809/JBWS1809TestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: stack/native/trunk/src/test/resources/jaxws/jbws1809/META-INF/jaxb-intros.xml
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/jbws1809/META-INF/jaxb-intros.xml	                        (rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/jbws1809/META-INF/jaxb-intros.xml	2008-04-09 09:02:20 UTC (rev 6292)
@@ -0,0 +1,26 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jaxb-intros xmlns="http://www.jboss.org/xsd/jaxb/intros" default-namespace="http://org.jboss.ws/jaxbintro/wsdl">
+
+  <!--
+  The XSD for the schema can be found at:
+  http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/extras/jaxbintros/src/main/resources/jaxb-intros.xsd
+  Register it against the http://www.jboss.org/xsd/jaxb/intros namespace in your IDE and away you go :-)
+  -->
+
+  <!--
+  Note: how the "name" attributes on class, field and method configs can be regular expressions.
+  -->
+
+  <!--
+  The type namespaces on the customerOrder are different from the rest of the message...
+  -->
+  <Class name="org.jboss.test.ws.jaxws.jbws1809.DocRequest">
+    <XmlAccessorType value="FIELD"/>   
+    <XmlRootElement name="request" namespace="http://org.jboss.ws/jaxbintro/wsdl"/>
+
+    <Field name="value">
+      <XmlAttribute />
+    </Field>    
+  </Class>
+
+</jaxb-intros>


Property changes on: stack/native/trunk/src/test/resources/jaxws/jbws1809/META-INF/jaxb-intros.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jbossws-commits mailing list