Author: alessio.soldano(a)jboss.com
Date: 2007-12-13 11:06:07 -0500 (Thu, 13 Dec 2007)
New Revision: 5305
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/JBWS1904TestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpoint.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpointImpl.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestException.java
Modified:
stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
Log:
[JBWS-1904] Adding test
Modified: stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2007-12-13 14:30:22 UTC (rev
5304)
+++ stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2007-12-13 16:06:07 UTC (rev
5305)
@@ -538,6 +538,14 @@
<include name="jboss-service.xml"/>
</metainf>
</jar>
+
+ <!-- jaxws-jbws1904 -->
+ <jar destfile="${tests.output.dir}/libs/jaxws-jbws1904.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1904/*.class"/>
+ <exclude
name="org/jboss/test/ws/jaxws/jbws1904/*TestCase.class"/>
+ </fileset>
+ </jar>
<!-- jaxws namespace -->
<war warfile="${tests.output.dir}/libs/jaxws-namespace.war"
webxml="${tests.output.dir}/resources/jaxws/namespace/WEB-INF/web.xml">
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/JBWS1904TestCase.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/JBWS1904TestCase.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/JBWS1904TestCase.java 2007-12-13
16:06:07 UTC (rev 5305)
@@ -0,0 +1,64 @@
+/*
+ * 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.jbws1904;
+
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.apache.xerces.xs.XSTypeDefinition;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-1904] Explicitly set the namespace of a WebFault
+ *
+ *
http://jira.jboss.org/jira/browse/JBWS-1904
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 13-Dec-2007
+ */
+public class JBWS1904TestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS1904TestCase.class,
"jaxws-jbws1904.jar");
+ }
+
+ public void testWSDLSchema() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1904?wsdl");
+ WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+ WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
+ JBossXSModel xsModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
+ XSTypeDefinition typeDefinition =
xsModel.getTypeDefinition("TestException",
"http://org.jboss.ws/jbws1904/exceptions");
+ assertNotNull(typeDefinition);
+ typeDefinition = xsModel.getTypeDefinition("TestException",
"http://org.jboss.ws/jbws1904");
+ assertNull(typeDefinition);
+ typeDefinition = xsModel.getTypeDefinition("TestException",
"http://org.jboss.ws/jbws1904/faults");
+ assertNull(typeDefinition);
+ }
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/JBWS1904TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpoint.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpoint.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpoint.java 2007-12-13
16:06:07 UTC (rev 5305)
@@ -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.jbws1904;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name = "TestEndpoint", targetNamespace =
"http://org.jboss.ws/jbws1904")
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
+public interface TestEndpoint
+{
+ String echo(String input) throws TestException;
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpointImpl.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpointImpl.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpointImpl.java 2007-12-13
16:06:07 UTC (rev 5305)
@@ -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.jbws1904;
+
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.wsf.spi.annotation.WebContext;
+
+@WebService(serviceName = "TestEndpointService", name =
"TestEndpoint", targetNamespace = "http://org.jboss.ws/jbws1904")
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
+@Stateless
+@WebContext(contextRoot="jaxws-jbws1904", urlPattern="/*")
+public class TestEndpointImpl implements TestEndpoint
+{
+ @WebMethod
+ public String echo(String input) throws TestException
+ {
+ return input;
+ }
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestException.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestException.java
(rev 0)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestException.java 2007-12-13
16:06:07 UTC (rev 5305)
@@ -0,0 +1,21 @@
+package org.jboss.test.ws.jaxws.jbws1904;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.ws.WebFault;
+
+@WebFault(name="TestExceptionFault",
targetNamespace="http://org.jboss.ws/jbws1904/faults")
+@XmlType(name = "TestException", namespace =
"http://org.jboss.ws/jbws1904/exceptions", propOrder = {"message"})
+public class TestException extends Exception
+{
+ private String message;
+
+ public String getMessage()
+ {
+ return message;
+ }
+
+ public void setMessage(String message)
+ {
+ this.message = message;
+ }
+}
Property changes on:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1904/TestException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF