Author: thomas.diesler(a)jboss.com
Date: 2007-05-22 16:32:33 -0400 (Tue, 22 May 2007)
New Revision: 3197
Removed:
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/Echo.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/EchoResponse.java
trunk/jbossws-core/src/test/resources/jaxws/metadata/WEB-INF/wsdl/
Modified:
trunk/jbossws-core/ant-import-tests/build-jars-jaxws.xml
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/EndpointBean.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/EndpointInterface.java
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/JAXWSBuilderTestCase.java
Log:
Fix JAXWSBuilderTestCase
Modified: trunk/jbossws-core/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- trunk/jbossws-core/ant-import-tests/build-jars-jaxws.xml 2007-05-22 19:45:49 UTC (rev
3196)
+++ trunk/jbossws-core/ant-import-tests/build-jars-jaxws.xml 2007-05-22 20:32:33 UTC (rev
3197)
@@ -233,7 +233,8 @@
<!-- jaxws metadata -->
<war warfile="${tests.output.dir}/libs/jaxws-metadata.war"
webxml="${tests.output.dir}/resources/jaxws/metadata/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
- <include name="org/jboss/test/ws/jaxws/metadata/*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/metadata/EndpointBean.class"/>
+ <include
name="org/jboss/test/ws/jaxws/metadata/EndpointInterface.class"/>
</classes>
<webinf
dir="${tests.output.dir}/resources/jaxws/metadata/WEB-INF">
<include name="jboss-web.xml"/>
Deleted: trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/Echo.java
===================================================================
--- trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/Echo.java 2007-05-22
19:45:49 UTC (rev 3196)
+++ trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/Echo.java 2007-05-22
20:32:33 UTC (rev 3197)
@@ -1,50 +0,0 @@
-/*
- * 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.metadata;
-
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * @author Heiko.Braun(a)jboss.org
- * @version $Id$
- * @since 23.01.2007
- */
-@XmlType(name="Echo", namespace = "http://example.org/sei")
-public class Echo {
- private String message;
-
- public Echo() {
- }
-
- public Echo(String message) {
- this.message = message;
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
-}
Deleted:
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/EchoResponse.java
===================================================================
---
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/EchoResponse.java 2007-05-22
19:45:49 UTC (rev 3196)
+++
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/EchoResponse.java 2007-05-22
20:32:33 UTC (rev 3197)
@@ -1,50 +0,0 @@
-/*
- * 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.metadata;
-
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * @author Heiko.Braun(a)jboss.org
- * @version $Id$
- * @since 23.01.2007
- */
-@XmlType(name="EchoResponse", namespace = "http://example.org/sei")
-public class EchoResponse {
- private String message;
-
- public EchoResponse() {
- }
-
- public EchoResponse(String message) {
- this.message = message;
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
-}
Modified:
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/EndpointBean.java
===================================================================
---
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/EndpointBean.java 2007-05-22
19:45:49 UTC (rev 3196)
+++
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/EndpointBean.java 2007-05-22
20:32:33 UTC (rev 3197)
@@ -21,32 +21,20 @@
*/
package org.jboss.test.ws.jaxws.metadata;
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
import javax.jws.WebService;
/**
- * Tes namespace differences at service and portType levels
+ * Test namespace differences at service and portType levels
*
* @author Thomas.Diesler(a)jboss.org
* @since 29-Apr-2005
*/
-@WebService(
- endpointInterface = "org.jboss.test.ws.jaxws.metadata.EndpointInterface",
- targetNamespace = "http://example.org/impl",
- serviceName = "TestService",
- portName = "EndpointInterfacePort",
- wsdlLocation = "/WEB-INF/wsdl/TestService.wsdl"
-)
+@WebService(endpointInterface =
"org.jboss.test.ws.jaxws.metadata.EndpointInterface", targetNamespace =
"http://example.org/impl")
public class EndpointBean implements EndpointInterface
{
- @WebMethod
- @WebResult(name = "EchoResponse", targetNamespace =
"http://example.org/sei")
- public EchoResponse echo(@WebParam(name="EchoMessage", targetNamespace =
"http://example.org/sei") Echo request)
+ public String echo(String message)
{
- String message = request.getMessage();
System.out.println(message);
- return new EchoResponse(message);
+ return message;
}
}
Modified:
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/EndpointInterface.java
===================================================================
---
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/EndpointInterface.java 2007-05-22
19:45:49 UTC (rev 3196)
+++
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/EndpointInterface.java 2007-05-22
20:32:33 UTC (rev 3197)
@@ -28,17 +28,16 @@
import javax.jws.soap.SOAPBinding;
/**
- * Test the JSR-181 annotation: javax.jws.WebService
- * This interface is only used in the client deployment.
+ * This interface is only uses a namespace different from the impl bean.
*
* @author Thomas.Diesler(a)jboss.org
* @since 29-Apr-2005
*/
@WebService(targetNamespace = "http://example.org/sei")
-@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
+@SOAPBinding(style = SOAPBinding.Style.RPC)
public interface EndpointInterface
{
@WebMethod
- @WebResult(name = "EchoResponse", targetNamespace =
"http://example.org/sei")
- EchoResponse echo(@WebParam(name="EchoMessage", targetNamespace =
"http://example.org/sei") Echo request);
+ @WebResult(name = "return")
+ String echo(@WebParam(name = "message") String message);
}
Modified:
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/JAXWSBuilderTestCase.java
===================================================================
---
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/JAXWSBuilderTestCase.java 2007-05-22
19:45:49 UTC (rev 3196)
+++
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/metadata/JAXWSBuilderTestCase.java 2007-05-22
20:32:33 UTC (rev 3197)
@@ -23,7 +23,6 @@
// $Id: $
-import java.io.File;
import java.net.URL;
import javax.xml.namespace.QName;
@@ -49,36 +48,25 @@
}
/**
- * If the @WebService.targetNamespace
- * annotation is on a service implementation
- * bean that does NOT reference a service
- * endpoint interface (through the
- * endpointInterface annotation element),
- * the targetNamespace is used for both the
- * wsdl:portType and the wsdl:service (and
- * associated XML elements).
+ * If the @WebService.targetNamespace annotation is on a service implementation bean
that does NOT reference a service
+ * endpoint interface (through the endpointInterface annotation element), the
targetNamespace is used for both the
+ * wsdl:portType and the wsdl:service (and associated XML elements).
*
- * If the @WebService.targetNamespace
- * annotation is on a service implementation
- * bean that does reference a service endpoint
- * interface (through the endpointInterface
- * annotation element), the targetNamespace is
- * used for only the wsdl:service (and
+ * If the @WebService.targetNamespace annotation is on a service implementation bean
that does reference a service endpoint
+ * interface (through the endpointInterface annotation element), the targetNamespace
is used for only the wsdl:service (and
* associated XML elements).
- *
- * @throws Exception
*/
public void testSEIDerivedNamespaces() throws Exception
{
// Create the port
- URL wsdlURL = new
File("resources/jaxws/metadata/WEB-INF/wsdl/TestService.wsdl").toURL();
- QName qname = new
QName("http://example.org/impl",
"TestService");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-metadata?wsdl");
+ QName qname = new
QName("http://example.org/impl",
"EndpointBeanService");
Service service = Service.create(wsdlURL, qname);
EndpointInterface port = service.getPort(EndpointInterface.class);
String helloWorld = "Hello world!";
- EchoResponse response = port.echo(new Echo(helloWorld));
- assertEquals(helloWorld, response.getMessage());
+ String response = port.echo(helloWorld);
+ assertEquals(helloWorld, response);
}
}