Author: alessio.soldano(a)jboss.com
Date: 2008-11-28 08:04:17 -0500 (Fri, 28 Nov 2008)
New Revision: 8811
Added:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/AddressingTestCase.java
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/ServiceIface.java
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/ServiceImpl.java
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/jaxws/
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/jaxws/SayHello.java
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/jaxws/SayHelloResponse.java
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2257/
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2257/META-INF/
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2257/META-INF/wsdl/
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2257/META-INF/wsdl/AddressingService.wsdl
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2257/META-INF/wsdl/AddressingService_schema1.xsd
Modified:
stack/metro/trunk/modules/testsuite/metro-tests/scripts/metro-jars-jaxws.xml
Log:
[JBWS-2257] Adding testcase
Modified: stack/metro/trunk/modules/testsuite/metro-tests/scripts/metro-jars-jaxws.xml
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/scripts/metro-jars-jaxws.xml 2008-11-28
11:56:44 UTC (rev 8810)
+++
stack/metro/trunk/modules/testsuite/metro-tests/scripts/metro-jars-jaxws.xml 2008-11-28
13:04:17 UTC (rev 8811)
@@ -51,6 +51,17 @@
<metainf
dir="${tests.output.dir}/test-resources/jaxws/jbws2206/META-INF"/>
</jar>
+ <!-- jbws2257 -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2257.jar" >
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/jbws2257/Service*.class"/>
+ <include name="org/jboss/test/ws/jaxws/jbws2257/jaxws/*.class"/>
+ </fileset>
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/jbws2257/META-INF">
+ <include name="wsdl/**"/>
+ </metainf>
+ </jar>
+
<!-- jbws2307 -->
<war warfile="${tests.output.dir}/test-libs/jaxws-jbws2307-client.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws2307/WEB-INF-client/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/AddressingTestCase.java
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/AddressingTestCase.java
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/AddressingTestCase.java 2008-11-28
13:04:17 UTC (rev 8811)
@@ -0,0 +1,57 @@
+/*
+ * 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.jbws2257;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 25-Nov-2008
+ */
+public final class AddressingTestCase extends JBossWSTest
+{
+ private final String serviceURL = "http://" + getServerHost() +
":8080/jaxws-jbws2257/ServiceImpl";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(AddressingTestCase.class,
"jaxws-jbws2257.jar");
+ }
+
+ public void test() throws Exception
+ {
+ QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wsaddressing",
"AddressingService");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ ServiceIface proxy = (ServiceIface)service.getPort(ServiceIface.class);
+ assertEquals("Hello World!", proxy.sayHello());
+ }
+
+}
Property changes on:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/AddressingTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/ServiceIface.java
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/ServiceIface.java
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/ServiceIface.java 2008-11-28
13:04:17 UTC (rev 8811)
@@ -0,0 +1,36 @@
+/*
+ * 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.jbws2257;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService
+(
+ targetNamespace = "http://www.jboss.org/jbossws/ws-extensions/wsaddressing"
+)
+public interface ServiceIface
+{
+ @WebMethod
+ String sayHello();
+}
Property changes on:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/ServiceIface.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/ServiceImpl.java
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/ServiceImpl.java
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/ServiceImpl.java 2008-11-28
13:04:17 UTC (rev 8811)
@@ -0,0 +1,68 @@
+/*
+ * 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.jbws2257;
+
+import javax.annotation.Resource;
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.WebServiceContext;
+
+import org.jboss.logging.Logger;
+
+@Stateless
+@WebService
+(
+ portName = "AddressingServicePort",
+ serviceName = "AddressingService",
+ wsdlLocation = "META-INF/wsdl/AddressingService.wsdl",
+ targetNamespace =
"http://www.jboss.org/jbossws/ws-extensions/wsaddressing",
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws2257.ServiceIface"
+)
+public class ServiceImpl
+{
+ private static final Logger log = Logger.getLogger(ServiceImpl.class);
+
+ @Resource
+ WebServiceContext ctx;
+
+ public String sayHello()
+ {
+ log.info("Current context: " + ctx);
+ try
+ {
+ EndpointReference epr = ctx.getEndpointReference();
+ log.info("Endpoint reference: " + epr);
+ if (epr == null || !epr.toString().contains("jbws2257"))
+ {
+ return "Unexpected endpoint reference: " + epr;
+ }
+ }
+ catch (Exception e)
+ {
+ log.error("Error while reading endpoint reference from context!", e);
+ return e.getMessage();
+ }
+ return "Hello World!";
+ }
+}
Property changes on:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/ServiceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/jaxws/SayHello.java
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/jaxws/SayHello.java
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/jaxws/SayHello.java 2008-11-28
13:04:17 UTC (rev 8811)
@@ -0,0 +1,32 @@
+/*
+ * 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.jbws2257.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "sayHello", namespace =
"http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sayHello", namespace =
"http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+public class SayHello {}
Property changes on:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/jaxws/SayHello.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/jaxws/SayHelloResponse.java
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/jaxws/SayHelloResponse.java
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/jaxws/SayHelloResponse.java 2008-11-28
13:04:17 UTC (rev 8811)
@@ -0,0 +1,49 @@
+/*
+ * 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.jbws2257.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "sayHelloResponse", namespace =
"http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "sayHelloResponse", namespace =
"http://www.jboss.org/jbossws/ws-extensions/wsaddressing")
+public class SayHelloResponse
+{
+
+ @XmlElement(name = "return", namespace = "")
+ private String _return;
+
+ public String getReturn()
+ {
+ return this._return;
+ }
+
+ public void setReturn(String _return)
+ {
+ this._return = _return;
+ }
+
+}
Property changes on:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2257/jaxws/SayHelloResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2257/META-INF/wsdl/AddressingService.wsdl
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2257/META-INF/wsdl/AddressingService.wsdl
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2257/META-INF/wsdl/AddressingService.wsdl 2008-11-28
13:04:17 UTC (rev 8811)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<!-- Generated by JAX-WS RI at
http://jax-ws.dev.java.net. RI's version is JAX-WS
RI 2.1.3-b02-. -->
+<definitions
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wsaddres...
name="AddressingService"
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wsaddressing&q...
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <xsd:schema>
+ <xsd:import
namespace="http://www.jboss.org/jbossws/ws-extensions/wsaddressing&q...
schemaLocation="AddressingService_schema1.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="sayHello">
+ <part name="parameters" element="tns:sayHello"/>
+ </message>
+ <message name="sayHelloResponse">
+ <part name="parameters" element="tns:sayHelloResponse"/>
+ </message>
+ <portType name="ServiceIface">
+ <operation name="sayHello">
+ <input message="tns:sayHello"/>
+ <output message="tns:sayHelloResponse"/>
+ </operation>
+ </portType>
+ <binding name="AddressingServicePortBinding"
type="tns:ServiceIface">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
+ <operation name="sayHello">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="AddressingService">
+ <port name="AddressingServicePort"
binding="tns:AddressingServicePortBinding">
+ <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
+ <UsingAddressing
xmlns="http://www.w3.org/2006/05/addressing/wsdl"/>
+ </port>
+ </service>
+</definitions>
Property changes on:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2257/META-INF/wsdl/AddressingService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2257/META-INF/wsdl/AddressingService_schema1.xsd
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2257/META-INF/wsdl/AddressingService_schema1.xsd
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2257/META-INF/wsdl/AddressingService_schema1.xsd 2008-11-28
13:04:17 UTC (rev 8811)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>
+<xs:schema version="1.0"
targetNamespace="http://www.jboss.org/jbossws/ws-extensions/wsaddres...
xmlns:tns="http://www.jboss.org/jbossws/ws-extensions/wsaddressing&q...
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="sayHello" type="tns:sayHello"/>
+
+ <xs:element name="sayHelloResponse"
type="tns:sayHelloResponse"/>
+
+ <xs:complexType name="sayHello">
+ <xs:sequence/>
+ </xs:complexType>
+
+ <xs:complexType name="sayHelloResponse">
+ <xs:sequence>
+ <xs:element name="return" type="xs:string"
minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+
Property changes on:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2257/META-INF/wsdl/AddressingService_schema1.xsd
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF