JBossWS SVN: r11177 - in stack/native/trunk/modules: resources/src/main/resources/bin and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-12-01 13:41:07 -0500 (Tue, 01 Dec 2009)
New Revision: 11177
Modified:
stack/native/trunk/modules/client/pom.xml
stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.bat
stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.sh
stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.bat
stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.sh
stack/native/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat
stack/native/trunk/modules/resources/src/main/resources/bin/wsrunclient.sh
stack/native/trunk/modules/resources/src/main/resources/bin/wstools.bat
stack/native/trunk/modules/resources/src/main/resources/bin/wstools.sh
Log:
[JBWS-2647] Adding reference to jbossxb.jar (do not replace previous jboss-xml-binding.jar as we need that for already released AS target compatibility)
Modified: stack/native/trunk/modules/client/pom.xml
===================================================================
--- stack/native/trunk/modules/client/pom.xml 2009-12-01 14:54:26 UTC (rev 11176)
+++ stack/native/trunk/modules/client/pom.xml 2009-12-01 18:41:07 UTC (rev 11177)
@@ -48,7 +48,7 @@
<configuration>
<archive>
<manifestEntries>
- <Class-Path>jbossws-spi.jar jbossws-common.jar jbossws-framework.jar jbossws-native-core.jar jbossws-native-jaxrpc.jar jbossws-native-jaxws.jar jaxws-api.jar jsr181-api.jar jbossws-native-jaxws-ext.jar jbossws-native-saaj.jar activation.jar commons-logging.jar concurrent.jar javassist.jar jaxb-api.jar jaxb-impl.jar mail.jar jboss-logging-spi.jar jboss-logging-log4j.jar jcl-over-slf4j.jar slf4j-api.jar slf4j-jboss-logging.jar jbosssx-client.jar jboss-javaee.jar jboss-xml-binding.jar netty.jar policy.jar stax-api.jar wsdl4j.jar</Class-Path>
+ <Class-Path>jbossws-spi.jar jbossws-common.jar jbossws-framework.jar jbossws-native-core.jar jbossws-native-jaxrpc.jar jbossws-native-jaxws.jar jaxws-api.jar jsr181-api.jar jbossws-native-jaxws-ext.jar jbossws-native-saaj.jar activation.jar commons-logging.jar concurrent.jar javassist.jar jaxb-api.jar jaxb-impl.jar mail.jar jboss-logging-spi.jar jboss-logging-log4j.jar jcl-over-slf4j.jar slf4j-api.jar slf4j-jboss-logging.jar jbosssx-client.jar jboss-javaee.jar jboss-xml-binding.jar jbossxb.jar netty.jar policy.jar stax-api.jar wsdl4j.jar</Class-Path>
</manifestEntries>
</archive>
</configuration>
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.bat
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.bat 2009-12-01 14:54:26 UTC (rev 11176)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.bat 2009-12-01 18:41:07 UTC (rev 11177)
@@ -52,6 +52,7 @@
rem Stack specific dependencies
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/javassist.jar
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jboss-xml-binding.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jbossxb.jar
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jbossws-native-client.jar
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jbossws-native-core.jar
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jbossws-native-jaxws.jar
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.sh
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.sh 2009-12-01 14:54:26 UTC (rev 11176)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.sh 2009-12-01 18:41:07 UTC (rev 11177)
@@ -76,6 +76,7 @@
# Stack specific dependencies
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/javassist.jar"
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jbossxb.jar"
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jbossws-native-client.jar"
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jbossws-native-core.jar"
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jbossws-native-jaxws.jar"
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.bat
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.bat 2009-12-01 14:54:26 UTC (rev 11176)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.bat 2009-12-01 18:41:07 UTC (rev 11177)
@@ -48,6 +48,7 @@
rem Stack specific dependencies
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jboss-xml-binding.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossxb.jar
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/javassist.jar
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossall-client.jar
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-native-client.jar
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.sh
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.sh 2009-12-01 14:54:26 UTC (rev 11176)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.sh 2009-12-01 18:41:07 UTC (rev 11177)
@@ -72,6 +72,7 @@
# Stack specific dependencies
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jbossxb.jar"
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/javassist.jar"
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar"
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jbossws-native-client.jar"
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat 2009-12-01 14:54:26 UTC (rev 11176)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat 2009-12-01 18:41:07 UTC (rev 11177)
@@ -51,6 +51,7 @@
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jaxb-impl.jar
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jbossall-client.jar
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jboss-xml-binding.jar
+set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jbossxb.jar
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jbossws-common.jar
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jbossws-native-client.jar
set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jbossws-native-core.jar
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wsrunclient.sh
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wsrunclient.sh 2009-12-01 14:54:26 UTC (rev 11176)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wsrunclient.sh 2009-12-01 18:41:07 UTC (rev 11177)
@@ -71,6 +71,7 @@
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jaxb-impl.jar"
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar"
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
+WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jbossxb.jar"
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jbossws-common.jar"
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jbossws-native-client.jar"
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jbossws-native-core.jar"
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wstools.bat
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wstools.bat 2009-12-01 14:54:26 UTC (rev 11176)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wstools.bat 2009-12-01 18:41:07 UTC (rev 11177)
@@ -40,6 +40,7 @@
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossws-common.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/javassist.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jboss-xml-binding.jar
+set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossxb.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossws-native-client.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossws-native-core.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/jbossws-native-jaxrpc.jar
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wstools.sh
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wstools.sh 2009-12-01 14:54:26 UTC (rev 11176)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wstools.sh 2009-12-01 18:41:07 UTC (rev 11177)
@@ -60,6 +60,7 @@
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossws-common.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/javassist.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
+WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossxb.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossws-native-client.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossws-native-core.jar"
WSTOOLS_CLASSPATH="$WSTOOLS_CLASSPATH:$JBOSS_HOME/client/jbossws-native-jaxrpc.jar"
15 years, 1 month
JBossWS SVN: r11176 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198: ant-import-tests and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-12-01 09:54:26 -0500 (Tue, 01 Dec 2009)
New Revision: 11176
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/JBWS1815TestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/ProviderImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815/
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815/META-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815/META-INF/wsdl/
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815/META-INF/wsdl/my-service.wsdl
Removed:
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/JBWS1815TestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/ProviderImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815/META-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815/META-INF/wsdl/
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815/META-INF/wsdl/my-service.wsdl
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/ant-import-tests/build-jars-jaxws.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/version.properties
Log:
[JBPAPP-3198] Missing fault detail in SOAPFault.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/ant-import-tests/build-jars-jaxws.xml 2009-12-01 13:53:30 UTC (rev 11175)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/ant-import-tests/build-jars-jaxws.xml 2009-12-01 14:54:26 UTC (rev 11176)
@@ -498,6 +498,16 @@
</metainf>
</jar>
+ <!-- jaxws-jbws1815 -->
+ <jar destfile="${tests.output.dir}/libs/jaxws-jbws1815.ejb3">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1815/ProviderImpl.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxws/jbws1815/META-INF">
+ <include name="wsdl/my-service.wsdl"/>
+ </metainf>
+ </jar>
+
<!-- jaxws-jbws1854 -->
<war destfile="${tests.output.dir}/libs/jaxws-jbws1854.war" webxml="${tests.output.dir}/resources/jaxws/jbws1854/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2009-12-01 13:53:30 UTC (rev 11175)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2009-12-01 14:54:26 UTC (rev 11176)
@@ -72,6 +72,10 @@
/** Factory method for FaultException for a given SOAPFault */
public static SOAPFaultException getSOAPFaultException(SOAPFault soapFault)
{
+
+ if (soapFault == null)
+ throw new IllegalArgumentException("SOAPFault cannot be null");
+
SOAPFaultException faultEx = new SOAPFaultException(soapFault);
Detail detail = soapFault.getDetail();
@@ -155,10 +159,20 @@
try
{
SOAPMessageImpl faultMessage;
+ Throwable cause = reqEx.getCause();
if (reqEx instanceof SOAPFaultException)
{
faultMessage = toSOAPMessage((SOAPFaultException)reqEx);
}
+ /* JAX-WS 6.4.1: When an implementation catches an exception thrown by a
+ * service endpoint implementation and the cause of that exception is an
+ * instance of the appropriate ProtocolException subclass for the protocol
+ * in use, an implementation MUST reflect the information contained in the
+ * ProtocolException subclass within the generated protocol level fault. */
+ else if (cause != null && cause instanceof SOAPFaultException)
+ {
+ faultMessage = toSOAPMessage((SOAPFaultException)cause);
+ }
else if (reqEx instanceof CommonSOAPFaultException)
{
faultMessage = SOAPFaultHelperJAXRPC.exceptionToFaultMessage(reqEx);
@@ -237,23 +251,8 @@
SOAPMessageImpl soapMessage = createSOAPMessage();
SOAPBody soapBody = soapMessage.getSOAPBody();
- SOAPFault soapFault;
- /* JAX-WS 6.4.1: When an implementation catches an exception thrown by a
- * service endpoint implementation and the cause of that exception is an
- * instance of the appropriate ProtocolException subclass for the protocol
- * in use, an implementation MUST reflect the information contained in the
- * ProtocolException subclass within the generated protocol level fault. */
- Throwable cause = ex.getCause();
- if (cause instanceof SOAPFaultException)
- {
- populateSOAPFault(soapBody, (SOAPFaultException)cause);
- soapFault = soapBody.getFault();
- }
- else
- {
- soapFault = soapBody.addFault(getFallbackFaultCode(), getFallbackFaultString(ex));
- }
+ SOAPFault soapFault = soapBody.addFault(getFallbackFaultCode(), getFallbackFaultString(ex));
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
SerializationContext serContext = msgContext.getSerializationContext();
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815 (from rev 11167, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1815)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/JBWS1815TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1815/JBWS1815TestCase.java 2009-11-29 16:18:32 UTC (rev 11167)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/JBWS1815TestCase.java 2009-12-01 14:54:26 UTC (rev 11176)
@@ -1,102 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws1815;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.net.URL;
-
-import javax.xml.soap.Detail;
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPConnection;
-import javax.xml.soap.SOAPConnectionFactory;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPEnvelope;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.common.DOMUtils;
-import org.jboss.wsf.common.DOMWriter;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-import org.w3c.dom.Element;
-
-/**
- * Test case for http://jira.jboss.org/jira/browse/JBWS-1815
- *
- * @author alessio.soldano(a)jboss.com
- * @since 11-Oct-2007
- */
-public class JBWS1815TestCase extends JBossWSTest
-{
- public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws1815/ProviderImpl";
-
- private String msgString =
- "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:my=\"http://www.my-company.it/ws/my-test\">" +
- " <soapenv:Header/>" +
- " <soapenv:Body>" +
- " <my:performTest>" +
- " <my:Code>43</my:Code>" +
- " </my:performTest>" +
- " </soapenv:Body>" +
- "</soapenv:Envelope>";
-
- public static Test suite()
- {
- return new JBossWSTestSetup(JBWS1815TestCase.class, "jaxws-jbws1815.ejb3");
- }
-
- public void testWSDLAccess() throws Exception
- {
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- Element wsdl = DOMUtils.parse(wsdlURL.openStream());
- assertNotNull(wsdl);
- }
-
- public void testProviderMessage() throws Exception
- {
- SOAPMessage reqMsg = getRequestMessage();
- URL epURL = new URL(TARGET_ENDPOINT_ADDRESS);
- SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
- SOAPMessage resMsg = con.call(reqMsg, epURL);
- SOAPEnvelope resEnv = resMsg.getSOAPPart().getEnvelope();
- Detail detail = resEnv.getBody().getFault().getDetail();
- assertNotNull(detail);
- SOAPElement exception = (SOAPElement)detail.getDetailEntries().next();
- assertNotNull(exception);
- assertEquals(exception.getNodeName(), "MyWSException");
- SOAPElement message = (SOAPElement)exception.getChildElements().next();
- assertNotNull(message);
- assertEquals(message.getNodeName(), "message");
- assertEquals(message.getValue(), "This is a faked error");
- }
-
- private SOAPMessage getRequestMessage() throws SOAPException, IOException
- {
- MessageFactory msgFactory = MessageFactory.newInstance();
- SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(msgString.getBytes()));
- return reqMsg;
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/JBWS1815TestCase.java (from rev 11167, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1815/JBWS1815TestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/JBWS1815TestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/JBWS1815TestCase.java 2009-12-01 14:54:26 UTC (rev 11176)
@@ -0,0 +1,102 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1815;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.net.URL;
+
+import javax.xml.soap.Detail;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPConnection;
+import javax.xml.soap.SOAPConnectionFactory;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+import org.w3c.dom.Element;
+
+/**
+ * Test case for http://jira.jboss.org/jira/browse/JBWS-1815
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 11-Oct-2007
+ */
+public class JBWS1815TestCase extends JBossWSTest
+{
+ public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws1815/ProviderImpl";
+
+ private String msgString =
+ "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:my=\"http://www.my-company.it/ws/my-test\">" +
+ " <soapenv:Header/>" +
+ " <soapenv:Body>" +
+ " <my:performTest>" +
+ " <my:Code>43</my:Code>" +
+ " </my:performTest>" +
+ " </soapenv:Body>" +
+ "</soapenv:Envelope>";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS1815TestCase.class, "jaxws-jbws1815.ejb3");
+ }
+
+ public void testWSDLAccess() throws Exception
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ Element wsdl = DOMUtils.parse(wsdlURL.openStream());
+ assertNotNull(wsdl);
+ }
+
+ public void testProviderMessage() throws Exception
+ {
+ SOAPMessage reqMsg = getRequestMessage();
+ URL epURL = new URL(TARGET_ENDPOINT_ADDRESS);
+ SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
+ SOAPMessage resMsg = con.call(reqMsg, epURL);
+ SOAPEnvelope resEnv = resMsg.getSOAPPart().getEnvelope();
+ Detail detail = resEnv.getBody().getFault().getDetail();
+ assertNotNull(detail);
+ SOAPElement exception = (SOAPElement)detail.getDetailEntries().next();
+ assertNotNull(exception);
+ assertEquals(exception.getNodeName(), "MyWSException");
+ SOAPElement message = (SOAPElement)exception.getChildElements().next();
+ assertNotNull(message);
+ assertEquals(message.getNodeName(), "message");
+ assertEquals(message.getValue(), "This is a faked error");
+ }
+
+ private SOAPMessage getRequestMessage() throws SOAPException, IOException
+ {
+ MessageFactory msgFactory = MessageFactory.newInstance();
+ SOAPMessage reqMsg = msgFactory.createMessage(null, new ByteArrayInputStream(msgString.getBytes()));
+ return reqMsg;
+ }
+
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/ProviderImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1815/ProviderImpl.java 2009-11-29 16:18:32 UTC (rev 11167)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/ProviderImpl.java 2009-12-01 14:54:26 UTC (rev 11176)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws1815;
-
-import javax.ejb.Local;
-import javax.ejb.Stateless;
-import javax.xml.namespace.QName;
-import javax.xml.soap.Detail;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFactory;
-import javax.xml.soap.SOAPFault;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.Provider;
-import javax.xml.ws.Service;
-import javax.xml.ws.ServiceMode;
-import javax.xml.ws.WebServiceProvider;
-import javax.xml.ws.soap.SOAPFaultException;
-
-import org.jboss.wsf.spi.annotation.WebContext;
-
-/**
- * Test impl for http://jira.jboss.org/jira/browse/JBWS-1815
- *
- * @author alessio.soldano(a)jboss.com
- * @since 11-Oct-2007
- */
-@Local
-@Stateless
-@WebServiceProvider(serviceName = "MyTestService",
- portName = "MyTestPort",
- targetNamespace = "http://www.my-company.it/ws/my-test",
- wsdlLocation = "META-INF/wsdl/my-service.wsdl")
-@WebContext(contextRoot = "/jaxws-jbws1815")
-@ServiceMode(value = Service.Mode.MESSAGE)
-public class ProviderImpl implements Provider<SOAPMessage>
-{
-
- public SOAPMessage invoke(SOAPMessage requestSoapMessage)
- {
- SOAPFault theSOAPFault;
- try {
- theSOAPFault = SOAPFactory.newInstance().createFault();
- Detail soapFaultDetail = theSOAPFault.addDetail();
- SOAPElement myFaultElement = soapFaultDetail.addChildElement(new QName("http://www.my-company.it/ws/my-test", "MyWSException"));
- SOAPElement myMessageElement = myFaultElement.addChildElement(new QName("http://www.my-company.it/ws/my-test", "message"));
-// myMessageElement.setNodeValue("This is a faked error"); //wrong: myMessageElement is not a text node
- myMessageElement.setValue("This is a faked error"); //right: this creates a text node and gives it a text value
- } catch (SOAPException se) {
- se.printStackTrace();
- throw new RuntimeException("Something unexpected happened!");
- }
- throw new SOAPFaultException(theSOAPFault);
- }
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/ProviderImpl.java (from rev 11167, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1815/ProviderImpl.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/ProviderImpl.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/java/org/jboss/test/ws/jaxws/jbws1815/ProviderImpl.java 2009-12-01 14:54:26 UTC (rev 11176)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1815;
+
+import javax.ejb.Local;
+import javax.ejb.Stateless;
+import javax.xml.namespace.QName;
+import javax.xml.soap.Detail;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPFault;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.Provider;
+import javax.xml.ws.Service;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import org.jboss.wsf.spi.annotation.WebContext;
+
+/**
+ * Test impl for http://jira.jboss.org/jira/browse/JBWS-1815
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 11-Oct-2007
+ */
+@Local
+@Stateless
+@WebServiceProvider(serviceName = "MyTestService",
+ portName = "MyTestPort",
+ targetNamespace = "http://www.my-company.it/ws/my-test",
+ wsdlLocation = "META-INF/wsdl/my-service.wsdl")
+@WebContext(contextRoot = "/jaxws-jbws1815")
+@ServiceMode(value = Service.Mode.MESSAGE)
+public class ProviderImpl implements Provider<SOAPMessage>
+{
+
+ public SOAPMessage invoke(SOAPMessage requestSoapMessage)
+ {
+ SOAPFault theSOAPFault;
+ try {
+ theSOAPFault = SOAPFactory.newInstance().createFault();
+ Detail soapFaultDetail = theSOAPFault.addDetail();
+ SOAPElement myFaultElement = soapFaultDetail.addChildElement(new QName("http://www.my-company.it/ws/my-test", "MyWSException"));
+ SOAPElement myMessageElement = myFaultElement.addChildElement(new QName("http://www.my-company.it/ws/my-test", "message"));
+// myMessageElement.setNodeValue("This is a faked error"); //wrong: myMessageElement is not a text node
+ myMessageElement.setValue("This is a faked error"); //right: this creates a text node and gives it a text value
+ } catch (SOAPException se) {
+ se.printStackTrace();
+ throw new RuntimeException("Something unexpected happened!");
+ }
+ throw new SOAPFaultException(theSOAPFault);
+ }
+}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815 (from rev 11167, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1815)
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815/META-INF (from rev 11167, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1815/META-INF)
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815/META-INF/wsdl (from rev 11167, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1815/META-INF/wsdl)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815/META-INF/wsdl/my-service.wsdl
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1815/META-INF/wsdl/my-service.wsdl 2009-11-29 16:18:32 UTC (rev 11167)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815/META-INF/wsdl/my-service.wsdl 2009-12-01 14:54:26 UTC (rev 11176)
@@ -1,58 +0,0 @@
-<definitions name="MyTestService" targetNamespace="http://www.my-company.it/ws/my-test" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.my-company.it/ws/my-test" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <types>
- <schema elementFormDefault="qualified" targetNamespace="http://www.my-company.it/ws/my-test" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.my-company.it/ws/my-test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <complexType name="MyWSException">
- <sequence>
- <element name="message" nillable="true" type="string"/>
- </sequence>
- </complexType>
- <complexType name="performTest">
- <sequence>
- <element name="Code" nillable="true" type="long"/>
- </sequence>
- </complexType>
- <complexType name="performTestResponse">
- <sequence/>
- </complexType>
- <element name="MyWSException" type="tns:MyWSException"/>
- <element name="performTest" type="tns:performTest"/>
- <element name="performTestResponse" type="tns:performTestResponse"/>
- </schema>
- </types>
- <message name="MyTest_performTestResponse">
- <part element="tns:performTestResponse" name="result"/>
- </message>
- <message name="MyTest_performTest">
- <part element="tns:performTest" name="parameters"/>
- </message>
- <message name="MyWSException">
- <part element="tns:MyWSException" name="MyWSException"/>
- </message>
- <portType name="MyTest">
- <operation name="performTest">
- <input message="tns:MyTest_performTest"/>
- <output message="tns:MyTest_performTestResponse"/>
- <fault message="tns:MyWSException" name="MyWSException"/>
- </operation>
- </portType>
- <binding name="MyTestBinding" type="tns:MyTest">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="performTest">
- <soap:operation soapAction="urn:performTest"/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- <fault name="MyWSException">
- <soap:fault name="MyWSException" use="literal"/>
- </fault>
- </operation>
- </binding>
- <service name="MyTestService">
- <port binding="tns:MyTestBinding" name="MyTestPort">
- <soap:address location="http://my-company.it/my-context/my-endpoint"/>
- </port>
- </service>
-</definitions>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815/META-INF/wsdl/my-service.wsdl (from rev 11167, stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1815/META-INF/wsdl/my-service.wsdl)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815/META-INF/wsdl/my-service.wsdl (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/src/test/resources/jaxws/jbws1815/META-INF/wsdl/my-service.wsdl 2009-12-01 14:54:26 UTC (rev 11176)
@@ -0,0 +1,58 @@
+<definitions name="MyTestService" targetNamespace="http://www.my-company.it/ws/my-test" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.my-company.it/ws/my-test" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <types>
+ <schema elementFormDefault="qualified" targetNamespace="http://www.my-company.it/ws/my-test" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.my-company.it/ws/my-test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <complexType name="MyWSException">
+ <sequence>
+ <element name="message" nillable="true" type="string"/>
+ </sequence>
+ </complexType>
+ <complexType name="performTest">
+ <sequence>
+ <element name="Code" nillable="true" type="long"/>
+ </sequence>
+ </complexType>
+ <complexType name="performTestResponse">
+ <sequence/>
+ </complexType>
+ <element name="MyWSException" type="tns:MyWSException"/>
+ <element name="performTest" type="tns:performTest"/>
+ <element name="performTestResponse" type="tns:performTestResponse"/>
+ </schema>
+ </types>
+ <message name="MyTest_performTestResponse">
+ <part element="tns:performTestResponse" name="result"/>
+ </message>
+ <message name="MyTest_performTest">
+ <part element="tns:performTest" name="parameters"/>
+ </message>
+ <message name="MyWSException">
+ <part element="tns:MyWSException" name="MyWSException"/>
+ </message>
+ <portType name="MyTest">
+ <operation name="performTest">
+ <input message="tns:MyTest_performTest"/>
+ <output message="tns:MyTest_performTestResponse"/>
+ <fault message="tns:MyWSException" name="MyWSException"/>
+ </operation>
+ </portType>
+ <binding name="MyTestBinding" type="tns:MyTest">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="performTest">
+ <soap:operation soapAction="urn:performTest"/>
+ <input>
+ <soap:body use="literal"/>
+ </input>
+ <output>
+ <soap:body use="literal"/>
+ </output>
+ <fault name="MyWSException">
+ <soap:fault name="MyWSException" use="literal"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="MyTestService">
+ <port binding="tns:MyTestBinding" name="MyTestPort">
+ <soap:address location="http://my-company.it/my-context/my-endpoint"/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/version.properties
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/version.properties 2009-12-01 13:53:30 UTC (rev 11175)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/version.properties 2009-12-01 14:54:26 UTC (rev 11176)
@@ -6,8 +6,8 @@
specification.vendor=JBoss (http://www.jboss.org)
specification.version=jbossws-2.0
-version.id=2.0.1.SP2_CP06
-repository.id=2.0.1.SP2_CP06
+version.id=2.0.1.SP2_CP06_JBPAPP-3178
+repository.id=2.0.1.SP2_CP06_JBPAPP-3178
implementation.title=JBoss Web Services - Native
implementation.url=http://www.jboss.org/products/jbossws
15 years, 1 month
JBossWS SVN: r11175 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-12-01 08:53:30 -0500 (Tue, 01 Dec 2009)
New Revision: 11175
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198/
Log:
[JBPAPP-3198] Branch for patch.
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP06_JBPAPP-3198 (from rev 11174, stack/native/tags/jbossws-native-2.0.1.SP2_CP06)
15 years, 1 month
JBossWS SVN: r11174 - in stack/native/trunk/modules: testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2009-12-01 02:01:23 -0500 (Tue, 01 Dec 2009)
New Revision: 11174
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2651/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2651/EnvelopBuilderTestCase.java
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java
Log:
[JBWS-2651]:set igoreParseError to false
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java 2009-11-30 17:53:43 UTC (rev 11173)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderStax.java 2009-12-01 07:01:23 UTC (rev 11174)
@@ -91,8 +91,8 @@
}
public SOAPEnvelope build(SOAPMessage soapMessage, InputStream in, boolean ignoreParseError) throws IOException, SOAPException
- {
- try
+ {
+ try
{
reader = getFactoryInstance().createXMLStreamReader(in);
}
@@ -285,7 +285,9 @@
{
SOAPBody soapBody = soapEnv.getBody();
-
+ if (soapBody == null) {
+ soapBody = soapEnv.addBody();
+ }
if (atPartMargin())
{
// the env:Body element
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2009-11-30 17:53:43 UTC (rev 11173)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2009-12-01 07:01:23 UTC (rev 11174)
@@ -290,6 +290,15 @@
{
envBuilder = (EnvelopeBuilder)ServiceLoader.loadService(EnvelopeBuilder.class.getName(), null);
}
+ //if inputstream is empty, no need to build
+ if (inputStream.markSupported()) {
+ inputStream.mark(1);
+ final int bytesRead = inputStream.read(new byte[1]);
+ inputStream.reset();
+ if (bytesRead == -1) {
+ return soapMessage;
+ }
+ }
// Build the payload
envBuilder.setStyle(getStyle());
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2009-11-30 17:53:43 UTC (rev 11173)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2009-12-01 07:01:23 UTC (rev 11174)
@@ -48,7 +48,7 @@
try
{
- SOAPMessage soapMsg = getMessageFactory().createMessage(null, inputStream, true);
+ SOAPMessage soapMsg = getMessageFactory().createMessage(null, inputStream, false);
return soapMsg;
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java 2009-11-30 17:53:43 UTC (rev 11173)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshallerHTTP.java 2009-12-01 07:01:23 UTC (rev 11174)
@@ -79,7 +79,8 @@
if (resCode != HttpServletResponse.SC_NO_CONTENT)
{
MimeHeaders mimeHeaders = getMimeHeaders(metadata);
- soapMsg = getMessageFactory().createMessage(mimeHeaders, inputStream, true);
+ //[JBWS-2651] modify the ignoreParseError to false
+ soapMsg = getMessageFactory().createMessage(mimeHeaders, inputStream, false);
}
return soapMsg;
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2651/EnvelopBuilderTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2651/EnvelopBuilderTestCase.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2651/EnvelopBuilderTestCase.java 2009-12-01 07:01:23 UTC (rev 11174)
@@ -0,0 +1,125 @@
+/*
+ * 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.jbws2651;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.xml.soap.SOAPException;
+
+
+import org.jboss.ws.core.CommonSOAPFaultException;
+import org.jboss.ws.core.soap.EnvelopeBuilderDOM;
+import org.jboss.ws.core.soap.EnvelopeBuilderStax;
+import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+
+import junit.framework.TestCase;
+
+public class EnvelopBuilderTestCase extends TestCase {
+
+ EnvelopeBuilderDOM domBuilder = new EnvelopeBuilderDOM();
+ EnvelopeBuilderStax staxBuilder = new EnvelopeBuilderStax();
+ MessageFactoryImpl factory = new MessageFactoryImpl();
+
+ public void testEmptyInputStream() throws Exception {
+ InputStream ins = new ByteArrayInputStream("".getBytes());
+ factory.createMessage(null, ins, false);
+ }
+
+ public void testDomInputStream() throws Exception {
+ String soapMsg =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:addItemResponse xmlns:ns1='http://org.jboss.ws/addressing/replyto'>" +
+ " <result>Mars Bar</result>" +
+ " </ns1:addItemResponse>" +
+ " </env:Body>" +
+ "</env:Envelope>";
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)factory.createMessage();
+ InputStream ins = new ByteArrayInputStream(soapMsg.getBytes());
+ assertNotNull(domBuilder.build(soapMessage, ins, false));
+ }
+
+
+ public void testStaxInputStream() throws Exception {
+ String soapMsg =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:addItemResponse xmlns:ns1='http://org.jboss.ws/addressing/replyto'>" +
+ " <result>Mars Bar</result>" +
+ " </ns1:addItemResponse>" +
+ " </env:Body>" +
+ "</env:Envelope>";
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)factory.createMessage();
+ InputStream ins = new ByteArrayInputStream(soapMsg.getBytes());
+ assertNotNull(staxBuilder.build(soapMessage, ins, false));
+ }
+
+
+ public void testDomErroStream(){
+ String soapMsg =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:addItemResponse xmlns:ns1='http://org.jboss.ws/addressing/replyto'>" +
+ " <result>Mars Bar</result>" +
+ " </ns1:addItemResponse>" +
+ " </env:Body>" +
+ "</env:Envelope";
+
+ try {
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)factory.createMessage();
+ InputStream ins = new ByteArrayInputStream(soapMsg.getBytes());
+ domBuilder.build(soapMessage, ins, false);
+ fail("expected SOAPException");
+ } catch (Exception e) {
+ assertTrue(e instanceof CommonSOAPFaultException);
+ }
+ }
+
+
+ public void testStaxErroStream(){
+ String soapMsg =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ " <env:Header/>" +
+ " <env:Body>" +
+ " <ns1:addItemResponse xmlns:ns1='http://org.jboss.ws/addressing/replyto'>" +
+ " <result>Mars Bar</result>" +
+ " </ns1:addItemResponse>" +
+ " </env:Body>" +
+ "</env:Envelope";
+
+ try {
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)factory.createMessage();
+ InputStream ins = new ByteArrayInputStream(soapMsg.getBytes());
+ staxBuilder.build(soapMessage, ins, false);
+ fail("expected IOException");
+ } catch (Exception e) {
+ assertTrue(e instanceof IOException);
+ }
+ }
+
+}
15 years, 1 month