Author: mmusaji
Date: 2012-02-17 08:24:04 -0500 (Fri, 17 Feb 2012)
New Revision: 15681
Modified:
thirdparty/cxf/branches/cxf-2.2.12/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
Log:
[JBPAPP-8011] - Fix to allow soap12 addresses to be rewritten successfully
Modified:
thirdparty/cxf/branches/cxf-2.2.12/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
===================================================================
---
thirdparty/cxf/branches/cxf-2.2.12/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java 2012-02-17
12:27:21 UTC (rev 15680)
+++
thirdparty/cxf/branches/cxf-2.2.12/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java 2012-02-17
13:24:04 UTC (rev 15681)
@@ -311,11 +311,8 @@
for (Element el : elementList) {
String name = el.getAttribute("name");
if (name.equals(ei.getName().getLocalPart())) {
- Element soapAddress =
DOMUtils.findAllElementsByTagNameNS(el,
-
"http://schemas.xmlsoap.org/wsdl/soap/",
- "address")
-
.iterator().next();
- soapAddress.setAttribute("location", base);
+ rewriteAddress(base, el,
"http://schemas.xmlsoap.org/wsdl/soap/");
+ rewriteAddress(base, el,
"http://schemas.xmlsoap.org/wsdl/soap12/");
}
}
}
@@ -327,6 +324,14 @@
//likely not DOM level 3
}
}
+
+ private void rewriteAddress(String base, Element el, String soapNS) {
+ List<Element> sadEls = DOMUtils.findAllElementsByTagNameNS(el,soapNS,
+ "address");
+ for (Element soapAddress : sadEls) {
+ soapAddress.setAttribute("location", base);
+ }
+ }
static String resolveWithCatalogs(OASISCatalogManager catalogs, String start, String
base) {
if (catalogs == null) {