[jboss-svn-commits] JBossWS SVN: r1099 - in branches/jbossws-1.0: . src/main/java/org/jboss/ws/soap src/main/java/org/jboss/ws/utils src/test/java/org/jboss/test/ws/common/utils
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Sep 29 08:44:47 EDT 2006
Author: thomas.diesler at jboss.com
Date: 2006-09-29 08:44:38 -0400 (Fri, 29 Sep 2006)
New Revision: 1099
Modified:
branches/jbossws-1.0/.classpath
branches/jbossws-1.0/build-thirdparty.xml
branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/SAAJPayloadBuilderDOM.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/utils/DOMWriter.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java
branches/jbossws-1.0/version.properties
Log:
Rollback ignore xmlns=''
Modified: branches/jbossws-1.0/.classpath
===================================================================
--- branches/jbossws-1.0/.classpath 2006-09-29 12:00:57 UTC (rev 1098)
+++ branches/jbossws-1.0/.classpath 2006-09-29 12:44:38 UTC (rev 1099)
@@ -26,9 +26,6 @@
<classpathentry kind="lib" path="thirdparty/wstx-lgpl-2.0.6.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/jboss-4.0.x"/>
<classpathentry sourcepath="D:/cvs/jboss-branch/jboss-4.0.x/common/src/main" kind="lib" path="thirdparty/jboss-common.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss-j2ee.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss-jmx.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss-system.jar"/>
<classpathentry kind="lib" path="thirdparty/ant.jar"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: branches/jbossws-1.0/build-thirdparty.xml
===================================================================
--- branches/jbossws-1.0/build-thirdparty.xml 2006-09-29 12:00:57 UTC (rev 1098)
+++ branches/jbossws-1.0/build-thirdparty.xml 2006-09-29 12:44:38 UTC (rev 1099)
@@ -40,10 +40,6 @@
<get src="${jboss.repository}/jboss/remoting/${jboss-remoting}/lib/jboss-remoting.jar" dest="${thirdparty.dir}/jboss-remoting.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossretro/${jboss-jbossretro}/lib/jbossretro.jar" dest="${thirdparty.dir}/jbossretro.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar" dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jbossas/core-libs/${jbossas-core}/lib/jboss-common.jar" dest="${thirdparty.dir}/jboss-common.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jbossas/core-libs/${jbossas-core}/lib/jboss-j2ee.jar" dest="${thirdparty.dir}/jboss-j2ee.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jbossas/core-libs/${jbossas-core}/lib/jboss-jmx.jar" dest="${thirdparty.dir}/jboss-jmx.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jbossas/core-libs/${jbossas-core}/lib/jboss-system.jar" dest="${thirdparty.dir}/jboss-system.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/junit/${junit}/lib/junit.jar" dest="${thirdparty.dir}/junit.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/oswego-concurrent/${oswego-concurrent}/lib/concurrent.jar" dest="${thirdparty.dir}/concurrent.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/qdox/${qdox}/lib/qdox.jar" dest="${thirdparty.dir}/qdox.jar" usetimestamp="true" verbose="true"/>
@@ -87,14 +83,14 @@
<!-- The classpath for the jbossws core -->
<path id="jboss.core.classpath">
- <pathelement location="${thirdparty.dir}/jboss-j2ee.jar"/>
+ <pathelement location="${jboss.server.lib}/jboss-j2ee.jar"/>
<pathelement location="${jboss.server.deploy}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
</path>
<!-- The classpath for the jboss integration -->
<path id="jboss.integration.classpath">
- <pathelement location="${thirdparty.dir}/jboss-jmx.jar"/>
- <pathelement location="${thirdparty.dir}/jboss-system.jar"/>
+ <pathelement location="${jboss.lib}/jboss-jmx.jar"/>
+ <pathelement location="${jboss.lib}/jboss-system.jar"/>
<pathelement location="${jboss.server.lib}/jboss.jar"/>
<pathelement location="${jboss.server.lib}/jbosssx.jar"/>
<pathelement location="${jboss.server.deploy}/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/SAAJPayloadBuilderDOM.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/SAAJPayloadBuilderDOM.java 2006-09-29 12:00:57 UTC (rev 1098)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/soap/SAAJPayloadBuilderDOM.java 2006-09-29 12:44:38 UTC (rev 1099)
@@ -186,7 +186,6 @@
while (itBodyElement.hasNext())
{
Element srcElement = (Element)itBodyElement.next();
- registerNamespacesLocally(srcElement);
Name name = new NameImpl(srcElement.getLocalName(), srcElement.getPrefix(), srcElement.getNamespaceURI());
SOAPContentElement destElement = new SOAPContentElement(name);
@@ -201,7 +200,6 @@
else if (style == Style.DOCUMENT)
{
Element srcElement = (Element)domBodyElement;
- registerNamespacesLocally(srcElement);
SOAPContentElement destElement = new SOAPBodyElementDoc(beName);
destElement = (SOAPContentElement)soapBody.addChildElement(destElement);
@@ -250,19 +248,4 @@
}
}
}
-
- /**
- * Register globally available namespaces on element level.
- * This is necessary to ensure that each xml fragment is valid.
- */
- private void registerNamespacesLocally(Element srcElement) {
- if(srcElement.getPrefix()== null)
- {
- srcElement.setAttribute("xmlns", srcElement.getNamespaceURI());
- }
- else
- {
- srcElement.setAttribute("xmlns:"+srcElement.getPrefix(), srcElement.getNamespaceURI());
- }
- }
}
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/utils/DOMWriter.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/utils/DOMWriter.java 2006-09-29 12:00:57 UTC (rev 1098)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/utils/DOMWriter.java 2006-09-29 12:44:38 UTC (rev 1099)
@@ -270,9 +270,7 @@
nsMap.put(atPrefix, nsURI);
}
- // Ignore xmlns=''
- if ((atName.equals("xmlns") && atValue.equals("")) == false)
- out.print(" " + atName + "='" + atValue + "'");
+ out.print(" " + atName + "='" + atValue + "'");
}
// Add missing namespace declaration
Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java 2006-09-29 12:00:57 UTC (rev 1098)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java 2006-09-29 12:44:38 UTC (rev 1099)
@@ -28,7 +28,7 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.utils.DOMUtils;
+import org.jboss.util.xml.DOMUtils;
import org.jboss.ws.utils.DOMWriter;
import org.w3c.dom.Element;
@@ -96,6 +96,35 @@
assertEquals(expStr, wasStr);
}
+ /** The element already contains the required ns declaration.
+ */
+ public void testNoElementPrefix() throws Exception
+ {
+ String inStr =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ "<env:Body>" +
+ "<ns1:echoUserTypeResponse xmlns:ns1='http://org.jboss.test.webservice/jbws83'>" +
+ "<result xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
+ "<my-msg>Kermit</my-msg>" +
+ "</result>" +
+ "</ns1:echoUserTypeResponse>" +
+ "</env:Body>" +
+ "</env:Envelope>";
+
+ Element env = DOMUtils.parse(inStr);
+ Element body = DOMUtils.getFirstChildElement(env);
+ Element rpc = DOMUtils.getFirstChildElement(body);
+ Element result = DOMUtils.getFirstChildElement(rpc);
+
+ String expStr =
+ "<result xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
+ "<my-msg>Kermit</my-msg>" +
+ "</result>";
+
+ String wasStr = DOMWriter.printNode(result, false);
+ assertEquals(expStr, wasStr);
+ }
+
/** The element does not contain the required ns declaration, the child does.
*/
public void testNamespaceCompletionThree() throws Exception
@@ -148,6 +177,28 @@
assertEquals(expStr, wasStr);
}
+ /** Test empty namespace declartions
+ */
+ public void testEmptyNamespace() throws Exception
+ {
+ String inStr =
+ "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
+ "<env:Body>" +
+ "<publish xmlns='http://org.jboss.test.webservice/jbws64'>" +
+ "<String_1 xmlns=''>joel</String_1>" +
+ "<String_2 xmlns=''>secret</String_2>" +
+ "<String_3 xmlns=''>1</String_3>" +
+ "<String_4 xmlns=''>6</String_4>" +
+ "<String_5 xmlns=''>2</String_5>" +
+ "</publish>" +
+ "</env:Body>" +
+ "</env:Envelope>";
+
+ Element env = DOMUtils.parse(inStr);
+ String wasStr = DOMWriter.printNode(env, false);
+ assertEquals(inStr, wasStr);
+ }
+
public void testEnvelopeWriter() throws Exception
{
String xmlEnv = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>"
Modified: branches/jbossws-1.0/version.properties
===================================================================
--- branches/jbossws-1.0/version.properties 2006-09-29 12:00:57 UTC (rev 1098)
+++ branches/jbossws-1.0/version.properties 2006-09-29 12:44:38 UTC (rev 1099)
@@ -26,7 +26,6 @@
apache-xerces=2.7.1
jboss-backport-concurrent=2.1.0.GA
jboss-jbossretro=1.0.2.GA
-jbossas-core=4.0.4.GA
junit=3.8.1
oswego-concurrent=1.3.4
qdox=1.4
More information about the jboss-svn-commits
mailing list