cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1134528 - /cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
Date Sat, 11 Jun 2011 06:15:55 GMT
Author: ffang
Date: Sat Jun 11 06:15:54 2011
New Revision: 1134528

URL: http://svn.apache.org/viewvc?rev=1134528&view=rev
Log:
[CXF-3584]?wsdl does not rewrite soap:address for soap1.2 service

Modified:
    cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java

Modified: cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java?rev=1134528&r1=1134527&r2=1134528&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
Sat Jun 11 06:15:54 2011
@@ -312,11 +312,8 @@ public class WSDLQueryHandler implements
                     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/");
                         }
                     }
                 }
@@ -563,4 +560,14 @@ public class WSDLQueryHandler implements
     public void setBus(Bus bus) {
         this.bus = bus;
     }
+    
+    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);
+        }
+    }
+
 }



Mime
View raw message