JBossWS SVN: r8304 - spi/branches.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-09-30 12:16:23 -0400 (Tue, 30 Sep 2008)
New Revision: 8304
Added:
spi/branches/jbossws-spi-1.0.6.CR1/
Log:
Copied: spi/branches/jbossws-spi-1.0.6.CR1 (from rev 8303, spi/trunk)
16 years, 3 months
JBossWS SVN: r8303 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-09-30 11:22:30 -0400 (Tue, 30 Sep 2008)
New Revision: 8303
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss422.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss423.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss424.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
Log:
[JBWS-2330] Excluding tests
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss422.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss422.txt 2008-09-30 15:19:55 UTC (rev 8302)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss422.txt 2008-09-30 15:22:30 UTC (rev 8303)
@@ -105,5 +105,8 @@
# [JBWS-2240] PortComponent from jboss.xml descriptor is not parsed
org/jboss/test/ws/jaxws/jbws2241/**
+# [JBWS-2330] Failed to deploy service with multiple bindings
+org/jboss/test/ws/jaxws/jbws2278/**
+
# [JBWS-981] @WebContext defined virtual hosts only being fixed for JBoss 5
org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.*
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss423.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss423.txt 2008-09-30 15:19:55 UTC (rev 8302)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss423.txt 2008-09-30 15:22:30 UTC (rev 8303)
@@ -105,5 +105,8 @@
# [JBWS-2240] PortComponent from jboss.xml descriptor is not parsed
org/jboss/test/ws/jaxws/jbws2241/**
+# [JBWS-2330] Failed to deploy service with multiple bindings
+org/jboss/test/ws/jaxws/jbws2278/**
+
# [JBWS-981] @WebContext defined virtual hosts only being fixed for JBoss 5
org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.*
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss424.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss424.txt 2008-09-30 15:19:55 UTC (rev 8302)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss424.txt 2008-09-30 15:22:30 UTC (rev 8303)
@@ -105,5 +105,8 @@
# [JBWS-2240] PortComponent from jboss.xml descriptor is not parsed
org/jboss/test/ws/jaxws/jbws2241/**
+# [JBWS-2330] Failed to deploy service with multiple bindings
+org/jboss/test/ws/jaxws/jbws2278/**
+
# [JBWS-981] @WebContext defined virtual hosts only being fixed for JBoss 5
org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.*
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2008-09-30 15:19:55 UTC (rev 8302)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2008-09-30 15:22:30 UTC (rev 8303)
@@ -106,5 +106,8 @@
org/jboss/test/ws/jaxws/complex/**
org/jboss/test/ws/jaxws/holder/**
+# [JBWS-2330] Failed to deploy service with multiple bindings
+org/jboss/test/ws/jaxws/jbws2278/**
+
# [JBWS-2227] Investigate why multiple virtual hosts test fails on CXF
org/jboss/test/ws/jaxws/jbws1178/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2008-09-30 15:19:55 UTC (rev 8302)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2008-09-30 15:22:30 UTC (rev 8303)
@@ -106,5 +106,8 @@
org/jboss/test/ws/jaxws/complex/**
org/jboss/test/ws/jaxws/holder/**
+# [JBWS-2330] Failed to deploy service with multiple bindings
+org/jboss/test/ws/jaxws/jbws2278/**
+
# [JBWS-2227] Investigate why multiple virtual hosts test fails on CXF
org/jboss/test/ws/jaxws/jbws1178/**
16 years, 3 months
JBossWS SVN: r8302 - stack/metro/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-09-30 11:19:55 -0400 (Tue, 30 Sep 2008)
New Revision: 8302
Modified:
stack/metro/trunk/modules/testsuite/test-excludes-jboss422.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss423.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss424.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
Log:
[JBWS-2329] Excluding test
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss422.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss422.txt 2008-09-30 14:46:46 UTC (rev 8301)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss422.txt 2008-09-30 15:19:55 UTC (rev 8302)
@@ -53,5 +53,8 @@
# [JBWS-2247] Write test for JBWS-1190 from scratch using MessageContext properties
org/jboss/test/ws/jaxws/jbws1190/**
+# [JBWS-2329] Failed to deploy service with multiple bindings
+org/jboss/test/ws/jaxws/jbws2278/**
+
# [JBWS-981] @WebContext defined virtual hosts only being fixed for JBoss 5
org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.*
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss423.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss423.txt 2008-09-30 14:46:46 UTC (rev 8301)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss423.txt 2008-09-30 15:19:55 UTC (rev 8302)
@@ -50,5 +50,8 @@
# [JBWS-2247] Write test for JBWS-1190 from scratch using MessageContext properties
org/jboss/test/ws/jaxws/jbws1190/**
+# [JBWS-2329] Failed to deploy service with multiple bindings
+org/jboss/test/ws/jaxws/jbws2278/**
+
# [JBWS-981] @WebContext defined virtual hosts only being fixed for JBoss 5
org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.*
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss424.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss424.txt 2008-09-30 14:46:46 UTC (rev 8301)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss424.txt 2008-09-30 15:19:55 UTC (rev 8302)
@@ -50,5 +50,8 @@
# [JBWS-2247] Write test for JBWS-1190 from scratch using MessageContext properties
org/jboss/test/ws/jaxws/jbws1190/**
+# [JBWS-2329] Failed to deploy service with multiple bindings
+org/jboss/test/ws/jaxws/jbws2278/**
+
# [JBWS-981] @WebContext defined virtual hosts only being fixed for JBoss 5
org/jboss/test/ws/jaxws/jbws981/JBWS981TestCase.*
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt 2008-09-30 14:46:46 UTC (rev 8301)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt 2008-09-30 15:19:55 UTC (rev 8302)
@@ -44,3 +44,6 @@
# [JBWS-2247] Write test for JBWS-1190 from scratch using MessageContext properties
org/jboss/test/ws/jaxws/jbws1190/**
+
+# [JBWS-2329] Failed to deploy service with multiple bindings
+org/jboss/test/ws/jaxws/jbws2278/**
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2008-09-30 14:46:46 UTC (rev 8301)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2008-09-30 15:19:55 UTC (rev 8302)
@@ -44,3 +44,6 @@
# [JBWS-2247] Write test for JBWS-1190 from scratch using MessageContext properties
org/jboss/test/ws/jaxws/jbws1190/**
+
+# [JBWS-2329] Failed to deploy service with multiple bindings
+org/jboss/test/ws/jaxws/jbws2278/**
16 years, 3 months
JBossWS SVN: r8301 - in stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder: jaxrpc and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-09-30 10:46:46 -0400 (Tue, 30 Sep 2008)
New Revision: 8301
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
Log:
[JBWS-2278] Do not reverse search WSDLBinding when already available
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2008-09-30 14:33:00 UTC (rev 8300)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2008-09-30 14:46:46 UTC (rev 8301)
@@ -94,6 +94,11 @@
WSDLDefinitions wsdlDefinitions = wsdlEndpoint.getWsdlService().getWsdlDefinitions();
WSDLInterface wsdlInterface = wsdlEndpoint.getInterface();
WSDLBinding wsdlBinding = wsdlDefinitions.getBindingByInterfaceName(wsdlInterface.getName());
+ initEndpointBinding(wsdlBinding, epMetaData);
+ }
+
+ protected void initEndpointBinding(WSDLBinding wsdlBinding, EndpointMetaData epMetaData)
+ {
String bindingType = wsdlBinding.getType();
if (Constants.NS_SOAP11.equals(bindingType))
epMetaData.setBindingId(Constants.SOAP11HTTP_BINDING);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2008-09-30 14:33:00 UTC (rev 8300)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2008-09-30 14:46:46 UTC (rev 8301)
@@ -197,7 +197,7 @@
}
// Init the endpoint binding
- initEndpointBinding(wsdlEndpoint, epMetaData);
+ initEndpointBinding(wsdlBinding, epMetaData);
// Init the service encoding style
initEndpointEncodingStyle(epMetaData);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2008-09-30 14:33:00 UTC (rev 8300)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2008-09-30 14:46:46 UTC (rev 8301)
@@ -160,7 +160,7 @@
serviceMetaData.addEndpoint(epMetaData);
// Init the endpoint binding
- initEndpointBinding(wsdlEndpoint, epMetaData);
+ initEndpointBinding(wsdlBinding, epMetaData);
// Init the service encoding style
initEndpointEncodingStyle(epMetaData);
16 years, 3 months
JBossWS SVN: r8300 - in framework/trunk/testsuite/test: java/org/jboss/test/ws/jaxws and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-09-30 10:33:00 -0400 (Tue, 30 Sep 2008)
New Revision: 8300
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/ObjectFactory.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpoint.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImplSoap11.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImplSoap12.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestException.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestException_Exception.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestHandler.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/package-info.java
framework/trunk/testsuite/test/resources/jaxws/jbws2278/
framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/jboss-web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/web.xml
framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/wsdl/
framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/wsdl/Test.wsdl
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-2278] Adding testcase
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2008-09-30 09:52:20 UTC (rev 8299)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2008-09-30 14:33:00 UTC (rev 8300)
@@ -546,6 +546,18 @@
<include name="jboss-web.xml"/>
</webinf>
</war>
+
+ <!-- jaxws-jbws2278 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2278.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2278/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2278/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2278/WEB-INF">
+ <include name="jboss-web.xml"/>
+ <include name="wsdl/*"/>
+ </webinf>
+ </war>
<!-- jaxws namespace -->
<war warfile="${tests.output.dir}/test-libs/jaxws-namespace.war" webxml="${tests.output.dir}/test-resources/jaxws/namespace/WEB-INF/web.xml">
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java 2008-09-30 14:33:00 UTC (rev 8300)
@@ -0,0 +1,142 @@
+/*
+ * 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.jbws2278;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPConstants;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.handler.Handler;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2278] JBossWS is picking the wrong binding when both Soap1.1 and Soap1.2 bindings are provided for a port
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 30-Sep-2008
+ * @see https://jira.jboss.org/jira/browse/JBWS-2278
+ */
+public class JBWS2278TestCase extends JBossWSTest
+{
+
+ private static TestEndpoint port11;
+ private static TestEndpoint port12;
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS2278TestCase.class, "jaxws-jbws2278.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws2278/soap11?wsdl");
+ QName serviceName = new QName("http://org.jboss.test.ws/jbws2278", "TestService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ port11 = service.getPort(new QName("http://org.jboss.test.ws/jbws2278", "TestEndpointSoap11Port"), TestEndpoint.class);
+ port12 = service.getPort(new QName("http://org.jboss.test.ws/jbws2278", "TestEndpointSoap12Port"), TestEndpoint.class);
+
+ List<Handler> handlerChain11 = new ArrayList<Handler>();
+ handlerChain11.add(new TestHandler(SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE, SOAPConstants.SOAP_1_1_CONTENT_TYPE));
+ ((BindingProvider)port11).getBinding().setHandlerChain(handlerChain11);
+
+ List<Handler> handlerChain12 = new ArrayList<Handler>();
+ handlerChain12.add(new TestHandler(SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE, SOAPConstants.SOAP_1_2_CONTENT_TYPE));
+ ((BindingProvider)port12).getBinding().setHandlerChain(handlerChain12);
+ }
+
+ public void testCallSoap11() throws Exception
+ {
+ final String message = "Hello!!";
+ String response = port11.echo(message);
+ assertEquals(message, response);
+ }
+
+ public void testCheckedExceptionSoap11() throws Exception
+ {
+ try
+ {
+ port11.echo(TestEndpointImpl.TEST_EXCEPTION);
+ fail("Expected TestException not thrown.");
+ }
+ catch (TestException_Exception te)
+ {
+ //OK
+ }
+ }
+
+ public void testRuntimeExceptionSoap11()
+ {
+ try
+ {
+ port11.echo(TestEndpointImpl.RUNTIME_EXCEPTION);
+ fail("Expected Exception not thrown.");
+ }
+ catch (Exception e)
+ {
+ assertEquals("Simulated failure", e.getMessage());
+ }
+ }
+
+ public void testCallSoap12() throws Exception
+ {
+ final String message = "Hello!!";
+ String response = port12.echo(message);
+ assertEquals(message, response);
+ }
+
+ public void testCheckedExceptionSoap12() throws Exception
+ {
+ try
+ {
+ port12.echo(TestEndpointImpl.TEST_EXCEPTION);
+ fail("Expected TestException not thrown.");
+ }
+ catch (TestException_Exception te)
+ {
+ //OK
+ }
+ }
+
+ public void testRuntimeExceptionSoap12()
+ {
+ try
+ {
+ port12.echo(TestEndpointImpl.RUNTIME_EXCEPTION);
+ fail("Expected Exception not thrown.");
+ }
+ catch (Exception e)
+ {
+ assertEquals("Simulated failure", e.getMessage());
+ }
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/ObjectFactory.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/ObjectFactory.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/ObjectFactory.java 2008-09-30 14:33:00 UTC (rev 8300)
@@ -0,0 +1,59 @@
+/*
+ * 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.jbws2278;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _TestException_QNAME = new QName("http://org.jboss.test.ws/jbws2278/types", "TestException");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.test.ws.jaxws.jbws2278
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link TestException }
+ *
+ */
+ public TestException createTestException() {
+ return new TestException();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestException }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://org.jboss.test.ws/jbws2278/types", name = "TestException")
+ public JAXBElement<TestException> createTestException(TestException value) {
+ return new JAXBElement<TestException>(_TestException_QNAME, TestException.class, null, value);
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/ObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpoint.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpoint.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpoint.java 2008-09-30 14:33:00 UTC (rev 8300)
@@ -0,0 +1,51 @@
+/*
+ * 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.jbws2278;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.3-b02-
+ * Generated source version: 2.0
+ *
+ */
+@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.test.ws/jbws2278")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface TestEndpoint {
+
+ /**
+ *
+ * @param string1
+ * @return returns java.lang.String
+ * @throws TestException_Exception
+ */
+ @WebMethod
+ @WebResult(name = "result", partName = "result")
+ public String echo(@WebParam(name = "String_1", partName = "String_1") String string1) throws TestException_Exception;
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImpl.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImpl.java 2008-09-30 14:33:00 UTC (rev 8300)
@@ -0,0 +1,52 @@
+/*
+ * 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.jbws2278;
+
+
+/**
+ * Test Endpoint implementation.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 30-Sep-2008
+ */
+public class TestEndpointImpl
+{
+
+ public static final String TEST_EXCEPTION = "TestException";
+
+ public static final String RUNTIME_EXCEPTION = "RuntimeException";
+
+ public String echo(String message) throws TestException_Exception
+ {
+ if (TEST_EXCEPTION.equals(message))
+ {
+ TestException te = new TestException();
+ throw new TestException_Exception(message, te);
+ }
+ else if (RUNTIME_EXCEPTION.equals(message))
+ {
+ throw new RuntimeException("Simulated failure");
+ }
+ return message;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImplSoap11.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImplSoap11.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImplSoap11.java 2008-09-30 14:33:00 UTC (rev 8300)
@@ -0,0 +1,39 @@
+/*
+ * 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.jbws2278;
+
+import javax.jws.WebService;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.soap.SOAPBinding;
+
+/**
+ * Test Endpoint implementation - SOAP 1.1 port.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 30-Sep-2008
+ */
+@WebService(name = "TestEndpoint", portName="TestEndpointSoap11Port", targetNamespace = "http://org.jboss.test.ws/jbws2278", endpointInterface = "org.jboss.test.ws.jaxws.jbws2278.TestEndpoint", wsdlLocation="WEB-INF/wsdl/Test.wsdl")
+(a)BindingType(SOAPBinding.SOAP11HTTP_BINDING)
+public class TestEndpointImplSoap11 extends TestEndpointImpl implements TestEndpoint
+{
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImplSoap11.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImplSoap12.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImplSoap12.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImplSoap12.java 2008-09-30 14:33:00 UTC (rev 8300)
@@ -0,0 +1,39 @@
+/*
+ * 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.jbws2278;
+
+import javax.jws.WebService;
+import javax.xml.ws.BindingType;
+import javax.xml.ws.soap.SOAPBinding;
+
+/**
+ * Test Endpoint implementation - SOAP 1.2 port.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 30-Sep-2008
+ */
+@WebService(name = "TestEndpoint", portName="TestEndpointSoap12Port", targetNamespace = "http://org.jboss.test.ws/jbws2278", endpointInterface = "org.jboss.test.ws.jaxws.jbws2278.TestEndpoint", wsdlLocation="WEB-INF/wsdl/Test.wsdl")
+(a)BindingType(SOAPBinding.SOAP12HTTP_BINDING)
+public class TestEndpointImplSoap12 extends TestEndpointImpl implements TestEndpoint
+{
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestEndpointImplSoap12.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestException.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestException.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestException.java 2008-09-30 14:33:00 UTC (rev 8300)
@@ -0,0 +1,52 @@
+/*
+ * 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.jbws2278;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for TestException complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="TestException">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "TestException")
+public class TestException {
+
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestException_Exception.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestException_Exception.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestException_Exception.java 2008-09-30 14:33:00 UTC (rev 8300)
@@ -0,0 +1,74 @@
+/*
+ * 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.jbws2278;
+
+import javax.xml.ws.WebFault;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.3-b02-
+ * Generated source version: 2.0
+ *
+ */
+@WebFault(name = "TestException", targetNamespace = "http://org.jboss.test.ws/jbws2278/types")
+public class TestException_Exception
+ extends Exception
+{
+
+ /**
+ * Java type that goes as soapenv:Fault detail element.
+ *
+ */
+ private TestException faultInfo;
+
+ /**
+ *
+ * @param faultInfo
+ * @param message
+ */
+ public TestException_Exception(String message, TestException faultInfo) {
+ super(message);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @param faultInfo
+ * @param message
+ * @param cause
+ */
+ public TestException_Exception(String message, TestException faultInfo, Throwable cause) {
+ super(message, cause);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @return
+ * returns fault bean: org.jboss.test.ws.jaxws.jbws2234.TestException
+ */
+ public TestException getFaultInfo() {
+ return faultInfo;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestException_Exception.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestHandler.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestHandler.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestHandler.java 2008-09-30 14:33:00 UTC (rev 8300)
@@ -0,0 +1,120 @@
+/*
+ * 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.jbws2278;
+
+import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPPart;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+
+import org.jboss.wsf.common.handler.GenericSOAPHandler;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 30-Sep-2008
+ */
+public class TestHandler extends GenericSOAPHandler
+{
+ private String envelopeNamespace;
+ private String contentType;
+
+ public TestHandler(String envelopeNamespace, String contentType)
+ {
+ super();
+ this.envelopeNamespace = envelopeNamespace;
+ this.contentType = contentType;
+ }
+
+ public void close(MessageContext context)
+ {
+ }
+
+ public boolean handleFault(MessageContext context)
+ {
+ return handleMessage(context);
+ }
+
+ public boolean handleInbound(MessageContext context)
+ {
+ try
+ {
+ SOAPMessage soapMessage = ((SOAPMessageContext)context).getMessage();
+ checkEnvelope(soapMessage);
+ checkContentType(soapMessage);
+ return true;
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public boolean handleOutbound(MessageContext context)
+ {
+ try
+ {
+ SOAPMessage soapMessage = ((SOAPMessageContext)context).getMessage();
+ soapMessage.saveChanges();
+ checkEnvelope(soapMessage);
+ checkContentType(soapMessage);
+ return true;
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private void checkEnvelope(SOAPMessage soapMessage) throws SOAPException
+ {
+ SOAPPart part = soapMessage.getSOAPPart();
+ SOAPEnvelope envelope = part.getEnvelope();
+
+ String namespace = envelope.getNamespaceURI();
+ if (envelopeNamespace.equals(namespace) == false)
+ {
+ throw new RuntimeException("Expected '" + envelopeNamespace + "' namespace, actual '" + namespace + "'");
+ }
+ }
+
+ private void checkContentType(SOAPMessage soapMessage)
+ {
+ MimeHeaders mimeHeaders = soapMessage.getMimeHeaders();
+ String[] ct = mimeHeaders.getHeader("Content-Type");
+ boolean found = false;
+ if (ct != null)
+ {
+ for (int i = 0; i < ct.length; i++)
+ {
+ if (ct[i].startsWith(contentType))
+ found = true;
+ }
+ }
+ if (!found)
+ throw new RuntimeException("Expected '" + contentType + "' content-type not found in the headers");
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/TestHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/package-info.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/package-info.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/package-info.java 2008-09-30 14:33:00 UTC (rev 8300)
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://org.jboss.test.ws/jbws2278/types")
+package org.jboss.test.ws.jaxws.jbws2278;
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2278/package-info.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/jboss-web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/jboss-web.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/jboss-web.xml 2008-09-30 14:33:00 UTC (rev 8300)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws-jbws2278</context-root>
+</jboss-web>
\ No newline at end of file
Property changes on: framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/web.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/web.xml 2008-09-30 14:33:00 UTC (rev 8300)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>TestEndpointSoap11</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws2278.TestEndpointImplSoap11</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>TestEndpointSoap12</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws2278.TestEndpointImplSoap12</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpointSoap11</servlet-name>
+ <url-pattern>/soap11/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpointSoap12</servlet-name>
+ <url-pattern>/soap12/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Property changes on: framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/wsdl/Test.wsdl
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/wsdl/Test.wsdl (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/wsdl/Test.wsdl 2008-09-30 14:33:00 UTC (rev 8300)
@@ -0,0 +1,67 @@
+<definitions name='TestService' targetNamespace='http://org.jboss.test.ws/jbws2278' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://org.jboss.test.ws/jbws2278/types' xmlns:soap12='http://schemas.xmlsoap.org/wsdl/soap12/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.test.ws/jbws2278' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <schema targetNamespace='http://org.jboss.test.ws/jbws2278/types' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://org.jboss.test.ws/jbws2278/types' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
+ <complexType name='TestException'>
+ <sequence/>
+ </complexType>
+ <element name='TestException' type='tns:TestException'/>
+ </schema>
+ </types>
+
+ <message name='TestException' xmlns='http://schemas.xmlsoap.org/wsdl/'>
+ <part element='ns1:TestException' name='TestException'></part>
+ </message>
+ <message name='TestEndpoint_echoResponse'>
+ <part name='result' type='xsd:string'></part>
+ </message>
+ <message name='TestEndpoint_echo'>
+ <part name='String_1' type='xsd:string'></part>
+ </message>
+
+ <portType name='TestEndpoint'>
+ <operation name='echo' parameterOrder='String_1'>
+ <input message='tns:TestEndpoint_echo'></input>
+ <output message='tns:TestEndpoint_echoResponse'></output>
+ <fault message='tns:TestException' name='TestException'></fault>
+ </operation>
+ </portType>
+ <binding name='TestEndpointSoap11Binding' type='tns:TestEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echo'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.test.ws/jbws2278' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.test.ws/jbws2278' use='literal'/>
+ </output>
+ <fault name='TestException'>
+ <soap:fault name='TestException' use='literal'/>
+ </fault>
+ </operation>
+ </binding>
+ <binding name='TestEndpointSoap12Binding' type='tns:TestEndpoint'>
+ <soap12:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echo'>
+ <soap12:operation soapAction=''/>
+ <input>
+ <soap12:body namespace='http://org.jboss.test.ws/jbws2278' use='literal'/>
+ </input>
+ <output>
+ <soap12:body namespace='http://org.jboss.test.ws/jbws2278' use='literal'/>
+ </output>
+ <fault name='TestException'>
+ <soap12:fault name='TestException' use='literal'/>
+ </fault>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointSoap11Binding' name='TestEndpointSoap11Port'>
+ <soap:address location='http://REPLACE_WITH_ACTUAL_URL/jaxws-jbws2278/soap11'/>
+ </port>
+ <port binding='tns:TestEndpointSoap12Binding' name='TestEndpointSoap12Port'>
+ <soap12:address location='http://REPLACE_WITH_ACTUAL_URL/jaxws-jbws2278/soap12'/>
+ </port>
+ </service>
+
+</definitions>
\ No newline at end of file
Property changes on: framework/trunk/testsuite/test/resources/jaxws/jbws2278/WEB-INF/wsdl/Test.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
16 years, 3 months
JBossWS SVN: r8299 - stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/etc.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-09-30 05:52:20 -0400 (Tue, 30 Sep 2008)
New Revision: 8299
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/etc/wsrunclient.bat
Log:
[JBPAPP-941] wsrunclient.bat fails NCDF.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/etc/wsrunclient.bat
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/etc/wsrunclient.bat 2008-09-30 09:37:27 UTC (rev 8298)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/etc/wsrunclient.bat 2008-09-30 09:52:20 UTC (rev 8299)
@@ -60,7 +60,7 @@
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-logging-spi.jar
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-common-core.jar
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/concurrent.jar
-set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/commons-logging.jar
+set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-common-client.jar
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-remoting.jar
rem Execute the JVM
16 years, 3 months
JBossWS SVN: r8298 - in stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws: jaxrpc/xop and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-09-30 05:37:27 -0400 (Tue, 30 Sep 2008)
New Revision: 8298
Removed:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTestSupport.java
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws801/LargeAttachmentImpl.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/Printer.java
Log:
[JBWS-2322] refactoring + ensure cleanup
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws801/LargeAttachmentImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws801/LargeAttachmentImpl.java 2008-09-30 09:17:46 UTC (rev 8297)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws801/LargeAttachmentImpl.java 2008-09-30 09:37:27 UTC (rev 8298)
@@ -47,14 +47,22 @@
{
AttachmentPart part = (AttachmentPart) iter.next();
- InputStream inputStream = part.getDataHandler().getInputStream();
- int read = 0;
- do
+ InputStream inputStream = null;
+ try
{
- count += read;
- read = inputStream.read(buffer);
+ inputStream = part.getDataHandler().getInputStream();
+ int read = 0;
+ do
+ {
+ count += read;
+ read = inputStream.read(buffer);
+ }
+ while (read != -1);
}
- while (read != -1);
+ finally
+ {
+ if (inputStream != null) inputStream.close();
+ }
}
}
catch (Exception e)
Deleted: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTestSupport.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTestSupport.java 2008-09-30 09:17:46 UTC (rev 8297)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTestSupport.java 2008-09-30 09:37:27 UTC (rev 8298)
@@ -1,104 +0,0 @@
-/*
- * 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.jaxrpc.xop;
-
-import java.awt.Image;
-import java.awt.Toolkit;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.activation.DataHandler;
-import javax.xml.transform.stream.StreamSource;
-
-/**
- * @author Heiko Braun <heiko.braun(a)jboss.com>
- * @since 22-Sep-2006
- */
-public class XOPTestSupport
-{
-
- public static byte[] getBytesFromFile(File file) throws IOException
- {
- InputStream is = new FileInputStream(file);
-
- long length = file.length();
- byte[] bytes = new byte[(int)length];
-
- int offset = 0;
- int numRead = 0;
- while (offset < bytes.length && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)
- {
- offset += numRead;
- }
-
- is.close();
- return bytes;
- }
-
- public static Image createTestImage(File imgFile)
- {
- Image image = null;
- try
- {
- URL url = imgFile.toURL();
-
- image = null;
- try
- {
- image = Toolkit.getDefaultToolkit().createImage(url);
- }
- catch (Throwable th)
- {
- //log.warn("Cannot create Image: " + th);
- }
- }
- catch (MalformedURLException e)
- {
- throw new RuntimeException(e);
- }
-
- return image;
- }
-
- public static StreamSource createTestSource()
- {
- return new StreamSource(new ByteArrayInputStream("<some><nestedXml/></some>".getBytes()));
- }
-
- public static DataHandler createDataHandler(File imgFile)
- {
- try
- {
- URL url = imgFile.toURL();
- return new DataHandler(url);
- }
- catch (MalformedURLException e)
- {
- throw new RuntimeException(e);
- }
- }
-}
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java 2008-09-30 09:17:46 UTC (rev 8297)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java 2008-09-30 09:37:27 UTC (rev 8298)
@@ -28,7 +28,7 @@
import javax.xml.rpc.Stub;
import javax.xml.transform.Source;
-import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
+import org.jboss.wsf.test.XOPTestSupport;
import org.jboss.test.ws.jaxrpc.xop.shared.PingDataHandler;
import org.jboss.test.ws.jaxrpc.xop.shared.PingDataHandlerResponse;
import org.jboss.test.ws.jaxrpc.xop.shared.PingImage;
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java 2008-09-30 09:17:46 UTC (rev 8297)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java 2008-09-30 09:37:27 UTC (rev 8298)
@@ -29,7 +29,7 @@
import javax.xml.rpc.Stub;
import javax.xml.transform.Source;
-import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
+import org.jboss.wsf.test.XOPTestSupport;
import org.jboss.test.ws.jaxrpc.xop.shared.PingDataHandler;
import org.jboss.test.ws.jaxrpc.xop.shared.PingDataHandlerResponse;
import org.jboss.test.ws.jaxrpc.xop.shared.PingImage;
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/Printer.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/Printer.java 2008-09-30 09:17:46 UTC (rev 8297)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/Printer.java 2008-09-30 09:37:27 UTC (rev 8298)
@@ -22,6 +22,7 @@
package org.jboss.test.ws.jaxws.samples.news;
import java.io.IOException;
+import java.io.InputStream;
import java.net.URL;
import java.util.GregorianCalendar;
@@ -89,7 +90,12 @@
EditionSWA edition = swaEndpoint.getNewspaperEdition(id);
DataHandler dh = edition.getContent();
System.out.println("Content type: " + dh.getContentType());
- System.out.println("Content: " + dh.getContent());
+ Object dataContent = dh.getContent();
+ System.out.println("Content: " + dataContent);
+ if (dataContent instanceof InputStream)
+ {
+ ((InputStream)dataContent).close();
+ }
}
}
}
16 years, 3 months
JBossWS SVN: r8297 - in framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples: xop and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-09-30 05:17:46 -0400 (Tue, 30 Sep 2008)
New Revision: 8297
Removed:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/XOPTestSupport.java
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/BareEndpointImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/RpcLitEndpointImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/WrappedEndpointImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpointBean.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/WrappedEndpointImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java
Log:
[JBWS-2322] refactoring + ensure cleanup
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/BareEndpointImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/BareEndpointImpl.java 2008-09-30 09:16:27 UTC (rev 8296)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/BareEndpointImpl.java 2008-09-30 09:17:46 UTC (rev 8297)
@@ -32,7 +32,7 @@
import javax.xml.ws.WebServiceException;
import java.io.IOException;
-import java.rmi.RemoteException;
+import java.io.InputStream;
@Stateless
@WebService(name="BareEndpoint", serviceName="BareEndpointService")
@@ -45,7 +45,12 @@
{
try
{
- System.out.println("Got '" + payload.getData().getContent() +"'");
+ Object dataContent = payload.getData().getContent();
+ System.out.println("Got '" + dataContent +"'");
+ if (dataContent instanceof InputStream)
+ {
+ ((InputStream)dataContent).close();
+ }
return new DocumentPayload( new DataHandler("Server data", "text/plain"));
}
catch (IOException e)
@@ -61,9 +66,13 @@
try
{
if(null == payload) throw new WebServiceException("Payload was null");
- System.out.println("Got " + payload.getData().getContent());
- DataHandler dataHandler = new DataHandler("Server data", "text/plain");
- return new DocumentPayloadWithoutRef(dataHandler);
+ Object dataContent = payload.getData().getContent();
+ System.out.println("Got " + dataContent);
+ if (dataContent instanceof InputStream)
+ {
+ ((InputStream)dataContent).close();
+ }
+ return new DocumentPayloadWithoutRef(new DataHandler("Server data", "text/plain"));
}
catch (IOException e)
{
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/RpcLitEndpointImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/RpcLitEndpointImpl.java 2008-09-30 09:16:27 UTC (rev 8296)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/RpcLitEndpointImpl.java 2008-09-30 09:17:46 UTC (rev 8297)
@@ -32,6 +32,7 @@
import javax.activation.DataHandler;
import java.rmi.RemoteException;
import java.io.IOException;
+import java.io.InputStream;
@Stateless
@WebService(name="RpcLitEndpoint", serviceName="RpcLitEndpointService")
@@ -45,7 +46,12 @@
{
try
{
- System.out.println("Got " + data.getContent() );
+ Object dataContent = data.getContent();
+ System.out.println("Got " + dataContent);
+ if (dataContent instanceof InputStream)
+ {
+ ((InputStream)dataContent).close();
+ }
return new DataHandler("Server data", "text/plain");
}
catch (IOException e)
@@ -60,9 +66,13 @@
{
try
{
- System.out.println("Got " + payload.getData().getContent() );
- DataHandler data = new DataHandler("Server data", "text/plain");
- return new DocumentPayload(data);
+ Object dataContent = payload.getData().getContent();
+ System.out.println("Got " + dataContent);
+ if (dataContent instanceof InputStream)
+ {
+ ((InputStream)dataContent).close();
+ }
+ return new DocumentPayload(new DataHandler("Server data", "text/plain"));
}
catch (IOException e)
{
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/WrappedEndpointImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/WrappedEndpointImpl.java 2008-09-30 09:16:27 UTC (rev 8296)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/swaref/WrappedEndpointImpl.java 2008-09-30 09:17:46 UTC (rev 8297)
@@ -34,7 +34,6 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
-import java.rmi.RemoteException;
@Stateless
@WebService(name = "WrappedEndpoint", serviceName = "WrappedEndpointService")
@@ -83,7 +82,12 @@
{
try
{
- System.out.println("Got " + data.getContent());
+ Object dataContent = data.getContent();
+ System.out.println("Got " + dataContent);
+ if (dataContent instanceof InputStream)
+ {
+ ((InputStream)dataContent).close();
+ }
return new DataHandler("Server data", "text/plain");
}
catch (IOException e)
@@ -96,24 +100,25 @@
{
InputStream is = in_dh.getInputStream();
if (is != null) {
-
System.out.println("[TestServiceImpl] ---> in_dh START : ");
- System.out.println("[TestServiceImpl] ---> in_dh START : ");
- System.out.println("[TestServiceImpl] ---> in_dh START : ");
-
// récupère le contenu du fichier
- BufferedReader in = new BufferedReader(new InputStreamReader(is));
- String ligne="";
- ligne = in.readLine();
- while (ligne != null)
+ BufferedReader in = null;
+ try
{
- System.out.println(ligne);
+ in = new BufferedReader(new InputStreamReader(is));
+ String ligne="";
ligne = in.readLine();
+ while (ligne != null)
+ {
+ System.out.println(ligne);
+ ligne = in.readLine();
+ }
}
- in.close();
+ finally
+ {
+ if (in != null) in.close();
+ }
System.out.println("[TestServiceImpl] ---> END.");
- System.out.println("[TestServiceImpl] ---> END.");
- System.out.println("[TestServiceImpl] ---> END.");
}
else
{
Deleted: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/XOPTestSupport.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/XOPTestSupport.java 2008-09-30 09:16:27 UTC (rev 8296)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/XOPTestSupport.java 2008-09-30 09:17:46 UTC (rev 8297)
@@ -1,104 +0,0 @@
-/*
- * 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.samples.xop;
-
-import java.awt.Image;
-import java.awt.Toolkit;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.activation.DataHandler;
-import javax.xml.transform.stream.StreamSource;
-
-/**
- * @author Heiko Braun <heiko.braun(a)jboss.com>
- * @since 22-Sep-2006
- */
-public class XOPTestSupport
-{
-
- public static byte[] getBytesFromFile(File file) throws IOException
- {
- InputStream is = new FileInputStream(file);
-
- long length = file.length();
- byte[] bytes = new byte[(int)length];
-
- int offset = 0;
- int numRead = 0;
- while (offset < bytes.length && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)
- {
- offset += numRead;
- }
-
- is.close();
- return bytes;
- }
-
- public static Image createTestImage(File imgFile)
- {
- Image image = null;
- try
- {
- URL url = imgFile.toURL();
-
- image = null;
- try
- {
- image = Toolkit.getDefaultToolkit().createImage(url);
- }
- catch (Throwable th)
- {
- //log.warn("Cannot create Image: " + th);
- }
- }
- catch (MalformedURLException e)
- {
- throw new RuntimeException(e);
- }
-
- return image;
- }
-
- public static StreamSource createTestSource()
- {
- return new StreamSource(new ByteArrayInputStream("<some><nestedXml/></some>".getBytes()));
- }
-
- public static DataHandler createDataHandler(File imgFile)
- {
- try
- {
- URL url = imgFile.toURL();
- return new DataHandler(url);
- }
- catch (MalformedURLException e)
- {
- throw new RuntimeException(e);
- }
- }
-}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpointBean.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpointBean.java 2008-09-30 09:16:27 UTC (rev 8296)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMEndpointBean.java 2008-09-30 09:17:46 UTC (rev 8297)
@@ -47,11 +47,11 @@
try
{
log.info("Recv " + dataHandler.getContentType());
- Object dataHandlerContent = dataHandler.getContent();
- log.info("Content is " + dataHandlerContent);
- if ( dataHandlerContent instanceof InputStream )
+ Object dataContent = dataHandler.getContent();
+ log.info("Content is " + dataContent);
+ if ( dataContent instanceof InputStream )
{
- ((InputStream)dataHandlerContent).close();
+ ((InputStream)dataContent).close();
}
}
catch (IOException e)
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/WrappedEndpointImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/WrappedEndpointImpl.java 2008-09-30 09:16:27 UTC (rev 8296)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/WrappedEndpointImpl.java 2008-09-30 09:17:46 UTC (rev 8297)
@@ -45,11 +45,11 @@
try
{
System.out.println("Recv " + data.getContentType());
- Object dataHandlerContent = data.getContent();
- System.out.println("Got " + dataHandlerContent);
- if ( dataHandlerContent instanceof InputStream )
+ Object dataContent = data.getContent();
+ System.out.println("Got " + dataContent);
+ if ( dataContent instanceof InputStream )
{
- ((InputStream)dataHandlerContent).close();
+ ((InputStream)dataContent).close();
}
return new DataHandler("Server data", "text/plain");
}
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java 2008-09-30 09:16:27 UTC (rev 8296)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/xop/doclit/XOPBase.java 2008-09-30 09:17:46 UTC (rev 8297)
@@ -32,7 +32,7 @@
import javax.xml.transform.Source;
import javax.xml.ws.soap.SOAPBinding;
-import org.jboss.test.ws.jaxws.samples.xop.XOPTestSupport;
+import org.jboss.wsf.test.XOPTestSupport;
import org.jboss.wsf.test.JBossWSTest;
/**
@@ -163,8 +163,15 @@
// Metro returns an ByteArrayInputStream
if (content instanceof InputStream)
{
- BufferedReader br = new BufferedReader(new InputStreamReader((InputStream)content));
- content = br.readLine();
+ try
+ {
+ BufferedReader br = new BufferedReader(new InputStreamReader((InputStream)content));
+ content = br.readLine();
+ }
+ finally
+ {
+ ((InputStream)content).close();
+ }
}
return content;
}
16 years, 3 months
JBossWS SVN: r8296 - common/trunk/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-09-30 05:16:27 -0400 (Tue, 30 Sep 2008)
New Revision: 8296
Modified:
common/trunk/src/main/java/org/jboss/wsf/test/XOPTestSupport.java
Log:
[JBWS-2322] ensure cleanup
Modified: common/trunk/src/main/java/org/jboss/wsf/test/XOPTestSupport.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/XOPTestSupport.java 2008-09-30 07:41:38 UTC (rev 8295)
+++ common/trunk/src/main/java/org/jboss/wsf/test/XOPTestSupport.java 2008-09-30 09:16:27 UTC (rev 8296)
@@ -24,16 +24,18 @@
import java.awt.Image;
import java.awt.Toolkit;
import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
-import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import javax.activation.DataHandler;
import javax.xml.transform.stream.StreamSource;
+import org.jboss.wsf.common.IOUtils;
+
/**
* @author Heiko Braun <heiko.braun(a)jboss.com>
* @since 22-Sep-2006
@@ -43,20 +45,9 @@
public static byte[] getBytesFromFile(File file) throws IOException
{
- InputStream is = new FileInputStream(file);
-
- long length = file.length();
- byte[] bytes = new byte[(int)length];
-
- int offset = 0;
- int numRead = 0;
- while (offset < bytes.length && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)
- {
- offset += numRead;
- }
-
- is.close();
- return bytes;
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IOUtils.copyStream(baos, new FileInputStream(file));
+ return baos.toByteArray();
}
public static Image createTestImage(File imgFile)
16 years, 3 months