Author: heiko.braun(a)jboss.com
Date: 2008-06-12 15:11:59 -0400 (Thu, 12 Jun 2008)
New Revision: 7509
Added:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/JBWS2206TestCase.java
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestException.java
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestFaultInfo.java
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestPortType.java
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestServiceBean.java
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/MANIFEST.MF
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/wsdl/
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/wsdl/mtsb.wsdl
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/wsdl/mtsb.xsd
Modified:
stack/metro/trunk/modules/testsuite/metro-tests/scripts/metro-jars-jaxws.xml
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1869/JBWS1869TestCase.java
Log:
Added JBWS2206 test case
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-06-12
18:52:50 UTC (rev 7508)
+++
stack/metro/trunk/modules/testsuite/metro-tests/scripts/metro-jars-jaxws.xml 2008-06-12
19:11:59 UTC (rev 7509)
@@ -51,6 +51,13 @@
<include
name="wsit-org.jboss.test.ws.wsit.rm.CalculatorWSImpl.xml"/>
</webinf>
</war>
+
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2206.jar" >
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2206/**/*"/>
+ </fileset>
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/jbws2206/META-INF"/>
+ </jar>
</target>
Modified:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1869/JBWS1869TestCase.java
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1869/JBWS1869TestCase.java 2008-06-12
18:52:50 UTC (rev 7508)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1869/JBWS1869TestCase.java 2008-06-12
19:11:59 UTC (rev 7509)
@@ -27,11 +27,11 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import java.net.URL;
-import java.net.HttpURLConnection;
-import java.io.OutputStreamWriter;
import java.io.BufferedReader;
import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.net.HttpURLConnection;
+import java.net.URL;
/**
* Support stream based RequestHandler API
@@ -70,7 +70,7 @@
* @throws Exception
*/
public void testStreamBasedInvocation() throws Exception
- {
+ {
// Send data
URL url = new
URL("http://"+getServerHost()+":8080/jaxws-jbws1869/delegate");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
@@ -94,7 +94,6 @@
rd.close();
// response assertion
- assertTrue(sb.toString().indexOf(RESPONSE) != -1);
- System.out.println("FIXME [JBWS-1869] Investigate why encoding appears in
processing instruction in AS 5.0.x and not in AS 4.2.x response");
+ assertTrue(sb.toString().indexOf(RESPONSE) != -1);
}
}
Added:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/JBWS2206TestCase.java
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/JBWS2206TestCase.java
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/JBWS2206TestCase.java 2008-06-12
19:11:59 UTC (rev 7509)
@@ -0,0 +1,54 @@
+/*
+ * 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.jbws2206;
+
+import junit.framework.Test;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+import org.jboss.test.ws.jaxws.jbws1871.JBWS1871EndpointImplService;
+import org.jboss.test.ws.jaxws.jbws1871.JBWS1871Endpoint;
+
+import javax.xml.ws.Service;
+import javax.xml.namespace.QName;
+import java.net.URL;
+
+public class JBWS2206TestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS2206TestCase.class,
"jaxws-jbws2206.jar");
+ }
+
+ public void testClientProxy() throws Exception
+ {
+ Service service = Service.create(
+ new
URL("http://"+getServerHost()+":8080/jaxws-jbws2206/MetroTestServiceBean?wsdl"),
+ new QName("http://com.acme.metroexceptiontest/",
"MetroTestService")
+ );
+ MetroTestPortType port = service.getPort(MetroTestPortType.class);
+
+ String res = port.helloWorld();
+ assertEquals("HelloWorld", res);
+
+ System.out.println("FIXME JBWS2206: WSDL imports are not replaced with
absolute path");
+ }
+}
Property changes on:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/JBWS2206TestCase.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/jbws2206/MetroTestException.java
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestException.java
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestException.java 2008-06-12
19:11:59 UTC (rev 7509)
@@ -0,0 +1,19 @@
+package org.jboss.test.ws.jaxws.jbws2206;
+
+import javax.xml.ws.WebFault;
+
+@WebFault(name="MetroTestFault",
targetNamespace="http://com.acme.metroexceptiontest/")
+public class MetroTestException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ private MetroTestFaultInfo faultInfo;
+
+ public MetroTestException(String message, MetroTestFaultInfo faultInfo) {
+ super(message);
+ this.faultInfo = faultInfo;
+ }
+
+ public MetroTestFaultInfo getFaultInfo() {
+ return faultInfo;
+ }
+}
Property changes on:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestException.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/jbws2206/MetroTestFaultInfo.java
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestFaultInfo.java
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestFaultInfo.java 2008-06-12
19:11:59 UTC (rev 7509)
@@ -0,0 +1,32 @@
+package org.jboss.test.ws.jaxws.jbws2206;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(
+ name = "MetroTestFaultInfo",
+ namespace="http://com.acme.metroexceptiontest/",
+ propOrder = { "detail" }
+)
+public class MetroTestFaultInfo {
+ protected String detail;
+
+ public MetroTestFaultInfo() {
+ }
+
+ public MetroTestFaultInfo(String detail) {
+ this.detail = detail;
+ }
+
+ public String getDetail() {
+ return detail;
+ }
+
+ public void setDetail(String detail) {
+ this.detail = detail;
+ }
+
+
+}
Property changes on:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestFaultInfo.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/jbws2206/MetroTestPortType.java
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestPortType.java
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestPortType.java 2008-06-12
19:11:59 UTC (rev 7509)
@@ -0,0 +1,15 @@
+package org.jboss.test.ws.jaxws.jbws2206;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(
+ name = "MetroTestPortType",
+ targetNamespace = "http://com.acme.metroexceptiontest/")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface MetroTestPortType {
+
+ @WebMethod
+ public String helloWorld() throws MetroTestException;
+}
Property changes on:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestPortType.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/jbws2206/MetroTestServiceBean.java
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestServiceBean.java
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestServiceBean.java 2008-06-12
19:11:59 UTC (rev 7509)
@@ -0,0 +1,18 @@
+package org.jboss.test.ws.jaxws.jbws2206;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+@Stateless
+@WebService(
+ endpointInterface="org.jboss.test.ws.jaxws.jbws2206.MetroTestPortType",
+ name="MetroTestService",
+ targetNamespace = "http://com.acme.metroexceptiontest/",
+ serviceName = "MetroTestService",
+ wsdlLocation="META-INF/wsdl/mtsb.wsdl")
+public class MetroTestServiceBean implements MetroTestPortType {
+
+ public String helloWorld() throws MetroTestException {
+ return "HelloWorld";
+ }
+}
\ No newline at end of file
Property changes on:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2206/MetroTestServiceBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/MANIFEST.MF
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/MANIFEST.MF
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/MANIFEST.MF 2008-06-12
19:11:59 UTC (rev 7509)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/wsdl/mtsb.wsdl
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/wsdl/mtsb.wsdl
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/wsdl/mtsb.wsdl 2008-06-12
19:11:59 UTC (rev 7509)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w...
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://com.acme.metroexceptiontest/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+ targetNamespace="http://com.acme.metroexceptiontest/"
+ name="MetroTestService">
+ <types>
+ <xsd:schema>
+ <xsd:import namespace="http://com.acme.metroexceptiontest/"
+ schemaLocation="mtsb.xsd">
+ </xsd:import>
+ </xsd:schema>
+ </types>
+ <message name="helloWorld"></message>
+ <message name="helloWorldResponse">
+ <part name="helloWorldResponse"
+ element="tns:helloWorldResponse">
+ </part>
+ </message>
+ <message name="MetroTestException">
+ <part name="fault"
element="tns:MetroTestFault"></part>
+ </message>
+ <portType name="MetroTestPortType">
+ <operation name="helloWorld">
+ <input message="tns:helloWorld"></input>
+ <output message="tns:helloWorldResponse"></output>
+
+ <fault message="tns:MetroTestException"
+ name="MetroTestException">
+ </fault>
+ </operation>
+ </portType>
+ <binding name="MetroTestServicePortBinding"
+ type="tns:MetroTestPortType">
+ <soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
+ style="document"></soap:binding>
+ <operation name="helloWorld">
+ <soap:operation soapAction=""></soap:operation>
+ <input>
+ <soap:body use="literal"></soap:body>
+ </input>
+ <output>
+ <soap:body use="literal"></soap:body>
+ </output>
+ <fault name="MetroTestException">
+ <soap:fault name="MetroTestException"
use="literal"></soap:fault>
+ </fault>
+ </operation>
+
+ </binding>
+ <service name="MetroTestService">
+ <port name="MetroTestServicePort"
+ binding="tns:MetroTestServicePortBinding">
+ <soap:address
location="REPLACE_WITH_ACTUAL_URL"></soap:address>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/wsdl/mtsb.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/wsdl/mtsb.xsd
===================================================================
---
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/wsdl/mtsb.xsd
(rev 0)
+++
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/wsdl/mtsb.xsd 2008-06-12
19:11:59 UTC (rev 7509)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:tns="http://com.acme.metroexceptiontest/"
+
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0"
+ targetNamespace="http://com.acme.metroexceptiontest/">
+
+ <xs:element name="MetroTestFault" nillable="true"
+ type="tns:MetroTestFaultInfo">
+ </xs:element>
+
+ <xs:element name="helloWorldResponse" nillable="true"
+ type="xs:string">
+ </xs:element>
+
+ <xs:complexType name="MetroTestFaultInfo">
+ <xs:sequence>
+ <xs:element name="detail" type="xs:string"
minOccurs="0"></xs:element>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
\ No newline at end of file
Property changes on:
stack/metro/trunk/modules/testsuite/metro-tests/src/test/resources/jaxws/jbws2206/META-INF/wsdl/mtsb.xsd
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF