JBossWS SVN: r13536 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP: tools/ant/bin and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-12-29 02:48:46 -0500 (Wed, 29 Dec 2010)
New Revision: 13536
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/build.bat
stack/native/branches/jbossws-native-2.0.1.SP2_CP/tools/ant/bin/ant.bat
Log:
[JBPAPP-4080]:Verified and applied patch by Rostislav Svoboda to fix the build on Windows;Thanks Rostislav!
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/build.bat
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/build.bat 2010-12-29 07:43:09 UTC (rev 13535)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/build.bat 2010-12-29 07:48:46 UTC (rev 13536)
@@ -33,7 +33,7 @@
REM ******************************************************
set NAMES=tools\ant
-set SUBFOLDERS=..;..\..;..\..\..;..\..\..\..
+set SUBFOLDERS=.;..;..\..;..\..\..;..\..\..\..
REM ******************************************************
REM ********Save the command line arguments***************
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/tools/ant/bin/ant.bat
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/tools/ant/bin/ant.bat 2010-12-29 07:43:09 UTC (rev 13535)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/tools/ant/bin/ant.bat 2010-12-29 07:48:46 UTC (rev 13536)
@@ -128,7 +128,7 @@
if not "%JIKESPATH%"=="" goto runAntWithJikes
:runAnt
-if %USE_JDK6%=="true" set ANT_OPTS=%ANT_OPTS% -Djava.endorsed.dirs=%ANT_HOME%\endorsed
+if "%USE_JDK6%"=="true" set ANT_OPTS=%ANT_OPTS% -Djava.endorsed.dirs=%ANT_HOME%\endorsed
if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
:runAntWithClasspath
13 years, 12 months
JBossWS SVN: r13535 - stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/resources/META-INF.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-12-29 02:43:09 -0500 (Wed, 29 Dec 2010)
New Revision: 13535
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/resources/META-INF/jbossws-entities.properties
Log:
[JBPAPP-4393]:Fixed wrong policy schema location
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/resources/META-INF/jbossws-entities.properties
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/resources/META-INF/jbossws-entities.properties 2010-12-29 07:41:26 UTC (rev 13534)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/resources/META-INF/jbossws-entities.properties 2010-12-29 07:43:09 UTC (rev 13535)
@@ -14,7 +14,7 @@
http\://www.w3.org/2003/11/wsdl=schema/wsdl20.xsd
http\://www.w3.org/2005/05/xmlmime=schema/xml-media-types.xsd
http\://www.w3.org/XML/1998/namespace=schema/xml.xsd
-http\://schemas.xmlsoap.org/ws/2004/09/policy=schema/policy-200409.xsd
+http\://schemas.xmlsoap.org/ws/2004/09/policy=schema/policy_200409.xsd
http\://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd=schema/oasis-200401-wss-wssecurity-secext-1.0.xsd
http\://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd=schema/oasis-200401-wss-wssecurity-utility-1.0.xsd
http\://www.w3.org/2000/09/xmldsig#=schema/xmldsig-core-schema.xsd
13 years, 12 months
JBossWS SVN: r13534 - stack/native/trunk/modules/core/src/main/resources/META-INF.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-12-29 02:41:26 -0500 (Wed, 29 Dec 2010)
New Revision: 13534
Modified:
stack/native/trunk/modules/core/src/main/resources/META-INF/jbossws-entities.properties
Log:
[JBWS-3194]:Fixed wrong policy schema location
Modified: stack/native/trunk/modules/core/src/main/resources/META-INF/jbossws-entities.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/resources/META-INF/jbossws-entities.properties 2010-12-29 06:40:30 UTC (rev 13533)
+++ stack/native/trunk/modules/core/src/main/resources/META-INF/jbossws-entities.properties 2010-12-29 07:41:26 UTC (rev 13534)
@@ -16,7 +16,7 @@
http\://www.w3.org/2003/11/wsdl=schema/wsdl20.xsd
http\://www.w3.org/2005/05/xmlmime=schema/xml-media-types.xsd
http\://www.w3.org/XML/1998/namespace=schema/xml.xsd
-http\://schemas.xmlsoap.org/ws/2004/09/policy=schema/policy-200409.xsd
+http\://schemas.xmlsoap.org/ws/2004/09/policy=schema/policy_200409.xsd
http\://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd=schema/oasis-200401-wss-wssecurity-secext-1.0.xsd
http\://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd=schema/oasis-200401-wss-wssecurity-utility-1.0.xsd
http\://www.w3.org/2000/09/xmldsig#=schema/xmldsig-core-schema.xsd
13 years, 12 months
JBossWS SVN: r13533 - framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-12-29 01:40:30 -0500 (Wed, 29 Dec 2010)
New Revision: 13533
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java
Log:
[JBPAPP-5220]:Added test case
Modified: framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
===================================================================
--- framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java 2010-12-29 06:39:32 UTC (rev 13532)
+++ framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java 2010-12-29 06:40:30 UTC (rev 13533)
@@ -154,7 +154,24 @@
File sei = new File(workDirectory, "wsconsumeSource/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java");
assertTrue("Source directory switch ignored", sei.exists());
}
+
+ public void testNocompileNoKeep() throws Exception
+ {
+ File sourceDir = new File(workDirectory, "wsconsumeNoCPNOKeepsource/java/");
+ File outputDir = new File(workDirectory, "wsconsumeNoCPNOKeepOutput/java/");
+ consumer.setTargetPackage("org.jboss.test.ws.tools.testSourceDirectory");
+ consumer.setSourceDirectory(sourceDir);
+ consumer.setOutputDirectory(outputDir);
+ consumer.consume(getResourceFile("jaxws/smoke/tools/wsdl/TestService.wsdl").getCanonicalPath());
+
+ File sei = new File(workDirectory, "wsconsumeNoCPNOKeepOutput/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java");
+ assertTrue("Expected sei not generated in the expected directory " + outputDir.getPath() , sei.exists());
+
+ File notExistSei = new File(workDirectory, "wsconsumeNoCPNOKeepsource/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java");
+ assertFalse("Directory " + sourceDir.getPath() + " is expected to empty", notExistSei.exists());
+ }
+
/**
* Enables/Disables Java source generation.
*
Modified: framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java
===================================================================
--- framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java 2010-12-29 06:39:32 UTC (rev 13532)
+++ framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java 2010-12-29 06:40:30 UTC (rev 13533)
@@ -89,6 +89,16 @@
{
dispatch("testSourceDirectory");
}
+
+ /**
+ *JBWS-3193
+ * If there are "-n" and "-s" flag, without "-k", the generated
+ * artifacts should be placed in output directory
+ */
+ public void testNocompileNoKeep() throws Exception
+ {
+ dispatch("testNocompileNoKeep");
+ }
/**
* Enables/Disables Java source generation.
13 years, 12 months
JBossWS SVN: r13532 - stack/cxf/branches/jbossws-cxf-3.1.2/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-12-29 01:39:32 -0500 (Wed, 29 Dec 2010)
New Revision: 13532
Modified:
stack/cxf/branches/jbossws-cxf-3.1.2/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFConsumerImpl.java
Log:
[JBPAPP-5220]:JBossWS-'nocompile' and 'source' option for wsconsume (command line) generates .java files into output directory not source directory
Modified: stack/cxf/branches/jbossws-cxf-3.1.2/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFConsumerImpl.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.1.2/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFConsumerImpl.java 2010-12-28 11:35:15 UTC (rev 13531)
+++ stack/cxf/branches/jbossws-cxf-3.1.2/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFConsumerImpl.java 2010-12-29 06:39:32 UTC (rev 13532)
@@ -154,7 +154,7 @@
sourceDir = outputDir;
}
- if (sourceDir != null)
+ if (sourceDir != null && generateSource)
{
if (!sourceDir.exists() && !sourceDir.mkdirs())
throw new IllegalStateException("Could not make directory: " + sourceDir.getName());
@@ -194,8 +194,16 @@
throw new IllegalStateException("Could not make directory: " + outputDir.getName());
// Always add the output directory and the wsdl location
- args.add("-classdir");
- args.add(outputDir.getAbsolutePath());
+ if (!nocompile)
+ {
+ args.add("-classdir");
+ args.add(outputDir.getAbsolutePath());
+ }
+ if (nocompile && !generateSource)
+ {
+ args.add("-d");
+ args.add(outputDir.getAbsolutePath());
+ }
// Always set the target
if (target != null)
13 years, 12 months
JBossWS SVN: r13531 - framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-12-28 06:35:15 -0500 (Tue, 28 Dec 2010)
New Revision: 13531
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java
Log:
[JBWS-3193]:Added test case
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java 2010-12-28 11:34:01 UTC (rev 13530)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java 2010-12-28 11:35:15 UTC (rev 13531)
@@ -155,6 +155,24 @@
assertTrue("Source directory switch ignored", sei.exists());
}
+ public void testNocompileNoKeep() throws Exception
+ {
+ File sourceDir = new File(workDirectory, "wsconsumeNoCPNOKeepsource/java/");
+ File outputDir = new File(workDirectory, "wsconsumeNoCPNOKeepOutput/java/");
+ consumer.setTargetPackage("org.jboss.test.ws.tools.testSourceDirectory");
+ consumer.setSourceDirectory(sourceDir);
+ consumer.setOutputDirectory(outputDir);
+
+ consumer.consume(getResourceFile("jaxws/smoke/tools/wsdl/TestService.wsdl").getCanonicalPath());
+
+ File sei = new File(workDirectory, "wsconsumeNoCPNOKeepOutput/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java");
+ assertTrue("Expected sei not generated in the expected directory " + outputDir.getPath() , sei.exists());
+
+ File notExistSei = new File(workDirectory, "wsconsumeNoCPNOKeepsource/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java");
+ assertFalse("Directory " + sourceDir.getPath() + " is expected to empty", notExistSei.exists());
+ }
+
+
/**
* Enables/Disables Java source generation.
*
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java 2010-12-28 11:34:01 UTC (rev 13530)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java 2010-12-28 11:35:15 UTC (rev 13531)
@@ -89,6 +89,17 @@
{
dispatch("testSourceDirectory");
}
+
+
+ /**
+ *JBWS-3193
+ * If there are "-n" and "-s" flag, without "-k", the generated
+ * artifacts should be placed in output directory
+ */
+ public void testNocompileNoKeep() throws Exception
+ {
+ dispatch("testNocompileNoKeep");
+ }
/**
* Enables/Disables Java source generation.
13 years, 12 months
JBossWS SVN: r13530 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-12-28 06:34:01 -0500 (Tue, 28 Dec 2010)
New Revision: 13530
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFConsumerImpl.java
Log:
[JBWS-3193]:Generated the source file into output directory when there is --noCompile flag and without --keep flag
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFConsumerImpl.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFConsumerImpl.java 2010-12-24 08:26:12 UTC (rev 13529)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/tools/CXFConsumerImpl.java 2010-12-28 11:34:01 UTC (rev 13530)
@@ -165,7 +165,7 @@
sourceDir = outputDir;
}
- if (sourceDir != null)
+ if (sourceDir != null && generateSource)
{
if (!sourceDir.exists() && !sourceDir.mkdirs())
throw new IllegalStateException("Could not make directory: " + sourceDir.getName());
@@ -205,9 +205,17 @@
throw new IllegalStateException("Could not make directory: " + outputDir.getName());
// Always add the output directory and the wsdl location
- args.add("-classdir");
- args.add(outputDir.getAbsolutePath());
-
+ if (!nocompile)
+ {
+ args.add("-classdir");
+ args.add(outputDir.getAbsolutePath());
+ }
+ if (nocompile && !generateSource)
+ {
+ args.add("-d");
+ args.add(outputDir.getAbsolutePath());
+ }
+
// Always set the target
if (target != null)
{
13 years, 12 months
JBossWS SVN: r13529 - in stack/native/branches/jbossws-native-3.1.2/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: 2010-12-24 03:26:12 -0500 (Fri, 24 Dec 2010)
New Revision: 13529
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/saaj/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/saaj/EnvelopBuilderTestCase.java
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
Log:
[JBPAPP-5450]:Fixed SAAJ implementation does not set the correct NS prefix in SOAP header and body elements
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2010-12-24 06:37:23 UTC (rev 13528)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2010-12-24 08:26:12 UTC (rev 13529)
@@ -184,7 +184,12 @@
soapHeader = soapEnv.addHeader();
DOMUtils.copyAttributes(soapHeader, domHeader);
-
+
+ if (!soapHeader.getPrefix().equals(domHeader.getPrefix()))
+ {
+ soapHeader.setPrefix(domHeader.getPrefix());
+ }
+
NodeList headerChildNodes = domHeader.getChildNodes();
for (int i = 0; i < headerChildNodes.getLength(); i++)
{
@@ -221,6 +226,11 @@
DOMUtils.copyAttributes(soapBody, domBody);
+ if (!soapBody.getPrefix().equals(domBody.getPrefix()))
+ {
+ soapBody.setPrefix(domBody.getPrefix());
+ }
+
SOAPBodyElement soapBodyElement = null;
boolean attachHRefElements = Constants.URI_SOAP11_ENC.equals(soapEnv.getAttributeNS(envNS, "encodingStyle"));
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/saaj/EnvelopBuilderTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/saaj/EnvelopBuilderTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/saaj/EnvelopBuilderTestCase.java 2010-12-24 08:26:12 UTC (rev 13529)
@@ -0,0 +1,61 @@
+/*
+ * 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.saaj;
+
+import java.io.ByteArrayOutputStream;
+import java.io.StringReader;
+
+import javax.xml.transform.stream.StreamSource;
+
+import junit.framework.TestCase;
+
+import org.jboss.ws.core.soap.EnvelopeBuilderDOM;
+import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+
+public class EnvelopBuilderTestCase extends TestCase
+{
+
+ EnvelopeBuilderDOM domBuilder = new EnvelopeBuilderDOM();
+
+ MessageFactoryImpl factory = new MessageFactoryImpl();
+
+ // JBWS3159
+ public void testDifferentNSPrefix() throws Exception
+ {
+ String soapMsg = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>"
+ + "<S:Header xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'/>"
+ + "<S:Body xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'>"
+ + "<ns1:addItemResponse xmlns:ns1='http://org.jboss.ws/addressing/replyto'>"
+ + "<result>Mars Bar</result></ns1:addItemResponse></S:Body></env:Envelope>";
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl) factory.createMessage();
+ StringReader strReader = new java.io.StringReader(soapMsg);
+ StreamSource streamSource2 = new StreamSource(strReader);
+ soapMessage.getSOAPPart().setContent(streamSource2);
+
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ soapMessage.writeTo(bout);
+ assertTrue(new String(bout.toByteArray()).indexOf("S:Header") > -1);
+ assertTrue(new String(bout.toByteArray()).indexOf("S:Body") > -1);
+ }
+
+}
14 years
JBossWS SVN: r13528 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP/src: test/java/org/jboss/test/ws/jaxws and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-12-24 01:37:23 -0500 (Fri, 24 Dec 2010)
New Revision: 13528
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/saaj/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/saaj/EnvelopBuilderTestCase.java
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
Log:
[JBPAPP-5700]:Fixed SAAJimpl does not set the correct NS prefix in SOAP header and body elements
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2010-12-24 02:53:16 UTC (rev 13527)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/soap/EnvelopeBuilderDOM.java 2010-12-24 06:37:23 UTC (rev 13528)
@@ -158,7 +158,12 @@
soapHeader = soapEnv.addHeader();
DOMUtils.copyAttributes(soapHeader, domHeader);
-
+
+ if (!soapHeader.getPrefix().equals(domHeader.getPrefix()))
+ {
+ soapHeader.setPrefix(domHeader.getPrefix());
+ }
+
NodeList headerChildNodes = domHeader.getChildNodes();
for (int i = 0; i < headerChildNodes.getLength(); i++)
{
@@ -194,6 +199,11 @@
soapBody = (SOAPBodyImpl)soapEnv.addBody();
DOMUtils.copyAttributes(soapBody, domBody);
+
+ if (!soapBody.getPrefix().equals(domBody.getPrefix()))
+ {
+ soapBody.setPrefix(domBody.getPrefix());
+ }
SOAPBodyElement soapBodyElement = null;
boolean attachHRefElements = Constants.URI_SOAP11_ENC.equals(soapEnv.getAttributeNS(envNS, "encodingStyle"));
Added: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/saaj/EnvelopBuilderTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/saaj/EnvelopBuilderTestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/saaj/EnvelopBuilderTestCase.java 2010-12-24 06:37:23 UTC (rev 13528)
@@ -0,0 +1,61 @@
+/*
+ * 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.saaj;
+
+import java.io.ByteArrayOutputStream;
+import java.io.StringReader;
+
+import javax.xml.transform.stream.StreamSource;
+
+import junit.framework.TestCase;
+
+import org.jboss.ws.core.soap.EnvelopeBuilderDOM;
+import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+
+public class EnvelopBuilderTestCase extends TestCase
+{
+
+ EnvelopeBuilderDOM domBuilder = new EnvelopeBuilderDOM();
+
+ MessageFactoryImpl factory = new MessageFactoryImpl();
+
+ //JBWS3159
+ public void testDifferentNSPrefix() throws Exception
+ {
+ String soapMsg = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>"
+ + "<S:Header xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'/>"
+ + "<S:Body xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'>"
+ + "<ns1:addItemResponse xmlns:ns1='http://org.jboss.ws/addressing/replyto'>"
+ + "<result>Mars Bar</result></ns1:addItemResponse></S:Body></env:Envelope>";
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl) factory.createMessage();
+ StringReader strReader = new java.io.StringReader(soapMsg);
+ StreamSource streamSource2 = new StreamSource(strReader);
+ soapMessage.getSOAPPart().setContent(streamSource2);
+
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ soapMessage.writeTo(bout);
+ assertTrue(new String(bout.toByteArray()).indexOf("S:Header") > -1);
+ assertTrue(new String(bout.toByteArray()).indexOf("S:Body") > -1);
+ }
+
+}
14 years
JBossWS SVN: r13527 - framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/etc.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-12-23 21:53:16 -0500 (Thu, 23 Dec 2010)
New Revision: 13527
Modified:
framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/etc/log4j.xml
Log:
[JBPAPP-4075]:Changed test.log location to the relative path
Modified: framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/etc/log4j.xml
===================================================================
--- framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/etc/log4j.xml 2010-12-24 02:52:24 UTC (rev 13526)
+++ framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/etc/log4j.xml 2010-12-24 02:53:16 UTC (rev 13527)
@@ -22,7 +22,7 @@
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
- <param name="File" value="${build.testlog}/test.log"/>
+ <param name="File" value="./log/test.log"/>
<param name="Append" value="true"/>
<!-- Rollover at midnight each day -->
14 years