JBossWS SVN: r10343 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-07-17 13:24:33 -0400 (Fri, 17 Jul 2009)
New Revision: 10343
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
Log:
[JBWS-2681] Concurrency issues where multiple threads create Port using Service Simultaneously.
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2009-07-17 17:10:38 UTC (rev 10342)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2009-07-17 17:24:33 UTC (rev 10343)
@@ -182,7 +182,7 @@
// com/sun/ts/tests/jaxws/api/javax_xml_ws/Service#GetPort1NegTest1WithWsdl
EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
- if (serviceMetaData.getEndpoints().size() > 0 && epMetaData == null)
+ if (epMetaData == null && serviceMetaData.getEndpoints().size() > 0)
throw new WebServiceException("Cannot get port meta data for: " + portName);
// This is the case when the service could not be created from wsdl
@@ -265,9 +265,15 @@
// Adjust the endpoint meta data according to the annotations
if (annotatedPorts.contains(portName) == false)
{
- JAXWSClientMetaDataBuilder metaDataBuilder = new JAXWSClientMetaDataBuilder();
- metaDataBuilder.rebuildEndpointMetaData(epMetaData, seiClass);
- annotatedPorts.add(portName);
+ synchronized (epMetaData)
+ {
+ if (annotatedPorts.contains(portName) == false)
+ {
+ JAXWSClientMetaDataBuilder metaDataBuilder = new JAXWSClientMetaDataBuilder();
+ metaDataBuilder.rebuildEndpointMetaData(epMetaData, seiClass);
+ annotatedPorts.add(portName);
+ }
+ }
}
return (T)createProxy(seiClass, epMetaData);
15 years, 6 months
JBossWS SVN: r10342 - stack/native/branches/dlofthouse.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-07-17 13:10:38 -0400 (Fri, 17 Jul 2009)
New Revision: 10342
Added:
stack/native/branches/dlofthouse/JBWS-2704/
Log:
Restore accidentially moved branch
Copied: stack/native/branches/dlofthouse/JBWS-2704 (from rev 10337, stack/native/branches/dlofthouse/JBWS-2704)
15 years, 6 months
JBossWS SVN: r10341 - stack/native/branches/dlofthouse.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-07-17 12:05:20 -0400 (Fri, 17 Jul 2009)
New Revision: 10341
Removed:
stack/native/branches/dlofthouse/JBWS-2703-X/
Log:
Delete old working area
15 years, 6 months
JBossWS SVN: r10340 - in stack/native/branches/dlofthouse/JBWS-2703/modules: testsuite/native-tests/src/test/java/org/jboss/test/ws/common/soap and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-07-17 12:04:39 -0400 (Fri, 17 Jul 2009)
New Revision: 10340
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 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 15:41:02 UTC (rev 10339)
+++ stack/native/branches/dlofthouse/JBWS-2703/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2009-07-17 16:04:39 UTC (rev 10340)
@@ -739,7 +739,19 @@
public NodeList getElementsByTagName(String name)
{
- return new NodeListImpl(DOMUtils.getChildElements(this, name, true));
+ List<Element> nodes = DOMUtils.getChildElementsAsList(this, (QName)null, true);
+
+ List filtered = new LinkedList();
+
+ for (Element current : nodes)
+ {
+ if (current.getTagName().equals(name))
+ {
+ filtered.add(current);
+ }
+ }
+
+ return new NodeListImpl(filtered.iterator());
}
public String getAttributeNS(String namespaceURI, String localName)
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 15:41:02 UTC (rev 10339)
+++ stack/native/branches/dlofthouse/JBWS-2703/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/soap/SOAPElementTestCase.java 2009-07-17 16:04:39 UTC (rev 10340)
@@ -131,7 +131,6 @@
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage soapMessage = messageFactory.createMessage(null, is);
SOAPEnvelope envelope = soapMessage.getSOAPPart().getEnvelope();
-
NodeList nodes = envelope.getElementsByTagNameNS("*", "String_1");
assertEquals("String_1 nodes", 2, nodes.getLength());
assertEquals("String_1(0) text content", "Value_1", nodes.item(0).getTextContent());
@@ -159,9 +158,29 @@
nodes = envelope.getElementsByTagNameNS("http://org.jboss.ws/testNS2", "String_1");
assertEquals("http://org.jboss.ws/testNS2 String_1 nodes", 1, nodes.getLength());
assertEquals("http://org.jboss.ws/testNS2 String_1(0) text content", "Value_2", nodes.item(0).getTextContent());
+ }
+
+ // 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;
+ 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.", 2, nodeList.getLength());
+ assertEquals("arg0 text content", "111", nodeList.item(0).getTextContent());
+ assertEquals("arg0 text content", "222", nodeList.item(1).getTextContent());
}
-
// http://jira.jboss.com/jira/browse/JBWS-773
public void testGetNamespaceURI() throws Exception
{
Copied: stack/native/branches/dlofthouse/JBWS-2703/modules/testsuite/native-tests/src/test/resources/common/soap/jbws2703.xml (from rev 10334, 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 16:04:39 UTC (rev 10340)
@@ -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>
+
15 years, 6 months
JBossWS SVN: r10339 - stack/native/branches/dlofthouse.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-07-17 11:41:02 -0400 (Fri, 17 Jul 2009)
New Revision: 10339
Added:
stack/native/branches/dlofthouse/JBWS-2703/
Removed:
stack/native/branches/dlofthouse/JBWS-2704/
Log:
Re-creating branch
Copied: stack/native/branches/dlofthouse/JBWS-2703 (from rev 10338, stack/native/branches/dlofthouse/JBWS-2704)
15 years, 6 months
JBossWS SVN: r10338 - stack/native/branches/dlofthouse.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-07-17 11:40:26 -0400 (Fri, 17 Jul 2009)
New Revision: 10338
Added:
stack/native/branches/dlofthouse/JBWS-2703-X/
Removed:
stack/native/branches/dlofthouse/JBWS-2703/
Log:
Re-creating branch
Copied: stack/native/branches/dlofthouse/JBWS-2703-X (from rev 10337, stack/native/branches/dlofthouse/JBWS-2703)
15 years, 6 months