Author: darran.lofthouse(a)jboss.com
Date: 2009-07-17 09:06:34 -0400 (Fri, 17 Jul 2009)
New Revision: 10334
Added:
stack/native/branches/dlofthouse/JBWS-2703/modules/testsuite/native-tests/src/test/resources/common/soap/jbws2703.xml
Modified:
stack/native/branches/dlofthouse/JBWS-2703/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java
stack/native/branches/dlofthouse/JBWS-2703/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/soap/SOAPElementTestCase.java
Log:
Test case and starting the implementation.
Modified:
stack/native/branches/dlofthouse/JBWS-2703/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2703/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2009-07-17
13:05:14 UTC (rev 10333)
+++
stack/native/branches/dlofthouse/JBWS-2703/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2009-07-17
13:06:34 UTC (rev 10334)
@@ -738,6 +738,11 @@
public NodeList getElementsByTagName(String name)
{
+ if ("*".equals(name))
+ {
+
+ }
+
return new NodeListImpl(DOMUtils.getChildElements(this, name, true));
}
Modified:
stack/native/branches/dlofthouse/JBWS-2703/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/soap/SOAPElementTestCase.java
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2703/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/soap/SOAPElementTestCase.java 2009-07-17
13:05:14 UTC (rev 10333)
+++
stack/native/branches/dlofthouse/JBWS-2703/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/soap/SOAPElementTestCase.java 2009-07-17
13:06:34 UTC (rev 10334)
@@ -123,6 +123,26 @@
}
assertEquals("Strawberry Apple Banana Orange Raspberry ",
sb.toString());
}
+
+ // JBWS-2703
+ public void testGetElementByTagName() throws Exception
+ {
+ InputStream is =
getResourceURL("common/soap/jbws2703.xml").openStream();
+ MessageFactory messageFactory = MessageFactory.newInstance();
+ SOAPMessage soapMessage = messageFactory.createMessage(null, is);
+ SOAPEnvelope envelope = soapMessage.getSOAPPart().getEnvelope();
+
+ NodeList nodeList = envelope.getElementsByTagName("soapenv:Envelope");
+ assertEquals("soapenv:Envelope nodes.", 1, nodeList.getLength());
+ nodeList = envelope.getElementsByTagName("soapenv:Header");
+ assertEquals("soapenv:Header nodes.", 1, nodeList.getLength());
+ nodeList = envelope.getElementsByTagName("soapenv:Body");
+ assertEquals("soapenv:Body nodes.", 1, nodeList.getLength());
+ nodeList = envelope.getElementsByTagName("jbw:echo");
+ assertEquals("jbw:echo nodes.", 1, nodeList.getLength());
+ nodeList = envelope.getElementsByTagName("arg0");
+ assertEquals("arg0 nodes.", 1, nodeList.getLength());
+ }
//
http://jira.jboss.com/jira/browse/JBWS-773
public void testGetNamespaceURI() throws Exception
Added:
stack/native/branches/dlofthouse/JBWS-2703/modules/testsuite/native-tests/src/test/resources/common/soap/jbws2703.xml
===================================================================
---
stack/native/branches/dlofthouse/JBWS-2703/modules/testsuite/native-tests/src/test/resources/common/soap/jbws2703.xml
(rev 0)
+++
stack/native/branches/dlofthouse/JBWS-2703/modules/testsuite/native-tests/src/test/resources/common/soap/jbws2703.xml 2009-07-17
13:06:34 UTC (rev 10334)
@@ -0,0 +1,13 @@
+<soapenv:Envelope
xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:jbw='http://ws.jboss.org/jbws2703'>
+ <soapenv:Header>
+ <jbw:myvalue>
+ <arg0>111</arg0>
+ </jbw:myvalue>
+ </soapenv:Header>
+ <soapenv:Body>
+ <jbw:echo>
+ <arg0>222</arg0>
+ </jbw:echo>
+ </soapenv:Body>
+</soapenv:Envelope>
+
Property changes on:
stack/native/branches/dlofthouse/JBWS-2703/modules/testsuite/native-tests/src/test/resources/common/soap/jbws2703.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF