[jbossws-commits] JBossWS SVN: r3531 - in branches/jbossws-2.0/jbossws-core: src/test/java/org/jboss/test/ws/jaxws and 1 other directories.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Mon Jun 11 09:21:12 EDT 2007
Author: heiko.braun at jboss.com
Date: 2007-06-11 09:21:12 -0400 (Mon, 11 Jun 2007)
New Revision: 3531
Added:
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/CustomType.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/Interface1.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/Interface2.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505EndpointImpl.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505TestCase.java
Modified:
branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml
Log:
Fix JBWS-1505
Modified: branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml 2007-06-11 13:16:27 UTC (rev 3530)
+++ branches/jbossws-2.0/jbossws-core/ant-import-tests/build-jars-jaxws.xml 2007-06-11 13:21:12 UTC (rev 3531)
@@ -250,6 +250,13 @@
</fileset>
</jar>
+ <!-- jaxws-jbws1505 -->
+ <jar destfile="${tests.output.dir}/libs/jaxws-jbws1505.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1505/*.*"/>
+ </fileset>
+ </jar>
+
<!-- jaxws namespace -->
<war warfile="${tests.output.dir}/libs/jaxws-namespace.war" webxml="${tests.output.dir}/resources/jaxws/namespace/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
Added: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/CustomType.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/CustomType.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/CustomType.java 2007-06-11 13:21:12 UTC (rev 3531)
@@ -0,0 +1,57 @@
+/*
+ * 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.jbws1505;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+public final class CustomType implements Interface2
+{
+ private int member1 = 1;
+ private int member2 = 2;
+
+ public int getMember2()
+ {
+ return this.member2;
+ }
+
+ public void setMember2(int member2)
+ {
+
+ }
+
+ public CustomType getCustomType()
+ {
+ return null;
+ }
+
+ public int getMember1()
+ {
+ return this.member1;
+ }
+
+ public void setMember1(int member1)
+ {
+
+ }
+}
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/CustomType.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/Interface1.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/Interface1.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/Interface1.java 2007-06-11 13:21:12 UTC (rev 3531)
@@ -0,0 +1,32 @@
+/*
+ * 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.jbws1505;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+public interface Interface1
+{
+ public int getMember1();
+ public void setMember1(int member1);
+}
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/Interface1.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/Interface2.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/Interface2.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/Interface2.java 2007-06-11 13:21:12 UTC (rev 3531)
@@ -0,0 +1,39 @@
+/*
+ * 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.jbws1505;
+
+import javax.jws.WebService;
+import javax.ejb.Remote;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+ at WebService(targetNamespace = "http://org.jboss.test.ws/jbws1505")
+ at Remote
+public interface Interface2 extends Interface1
+{
+ public int getMember2();
+ public void setMember2(int member2);
+
+ public CustomType getCustomType();
+}
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/Interface2.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505EndpointImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505EndpointImpl.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505EndpointImpl.java 2007-06-11 13:21:12 UTC (rev 3531)
@@ -0,0 +1,67 @@
+/*
+ * 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.jbws1505;
+
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+
+/**
+ * @author Heiko.Braun at jboss.com
+ * @version $Revision$
+ */
+ at WebService(
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws1505.Interface2",
+ serviceName = "JBWS1505Service",
+ targetNamespace = "http://org.jboss.test.ws/jbws1505"
+)
+ at Stateless
+public class JBWS1505EndpointImpl implements Interface2
+{
+
+ private int member = 1;
+ private int member2 = 2;
+
+ public int getMember2()
+ {
+ return this.member2;
+ }
+
+ public void setMember2(int member2)
+ {
+ this.member = member2;
+ }
+
+ public CustomType getCustomType()
+ {
+ return new CustomType();
+ }
+
+ public int getMember1()
+ {
+ return this.member;
+ }
+
+ public void setMember1(int member1)
+ {
+ this.member = member1;
+ }
+}
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505EndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505TestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505TestCase.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505TestCase.java 2007-06-11 13:21:12 UTC (rev 3531)
@@ -0,0 +1,105 @@
+/*
+ * 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.jbws1505;
+
+import junit.framework.Test;
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.WSException;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import java.net.URL;
+import java.io.File;
+
+/**
+ * Verify wsdl gerneration on SEI inheritance.
+ *
+ * http://jira.jboss.org/jira/browse/JBWS-1505
+ *
+ * @version $Revision:1370 $
+ */
+public class JBWS1505TestCase extends JBossWSTest
+{
+ private String targetNS = "http://org.jboss.test.ws/jbws1505";
+ private Interface2 port;
+ private URL wsdlURL;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(JBWS1505TestCase.class, "jaxws-jbws1505.jar");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ QName serviceName = new QName(targetNS, "JBWS1505Service");
+ wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws1505/JBWS1505EndpointImpl?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ port = service.getPort(Interface2.class);
+ }
+
+ /**
+ * All methods on the SEI should be mapped.
+ *
+ * @throws Exception
+ */
+ public void testWSDLGeneration() throws Exception
+ {
+ try
+ {
+ WSDLDefinitions wsdl = WSDLDefinitionsFactory.newInstance().parse(wsdlURL);
+ assertTrue(wsdl.getInterfaces().length == 1); // a single port
+ assertTrue(wsdl.getInterfaces()[0].getOperations().length == 5); // with five op's
+ }
+ catch (Exception ex)
+ {
+ WSException.rethrow(ex);
+ }
+ }
+
+ /**
+ * Complex types that inherit from a SEI hirarchy shold expose
+ * all members in xml schema.
+ *
+ * @throws Exception
+ */
+ public void testTypeInheritance() throws Exception
+ {
+ try
+ {
+ CustomType ct = port.getCustomType();
+ assertTrue(ct.getMember1() == 1);
+ assertTrue(ct.getMember2() == 2);
+ }
+ catch (Exception ex)
+ {
+ WSException.rethrow(ex);
+ }
+ }
+
+}
Property changes on: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1505/JBWS1505TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
More information about the jbossws-commits
mailing list