cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1134523 - /cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
Date Sat, 11 Jun 2011 05:46:08 GMT
Author: ffang
Date: Sat Jun 11 05:46:08 2011
New Revision: 1134523

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

Modified:
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java?rev=1134523&r1=1134522&r2=1134523&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetInterceptor.java
Sat Jun 11 05:46:08 2011
@@ -349,12 +349,8 @@ public class WSDLGetInterceptor extends 
                         if (name.equals(message.getExchange().getEndpoint().getEndpointInfo()
                                             .getName().getLocalPart())) {
                             
-                            List<Element> sadEls = DOMUtils.findAllElementsByTagNameNS(el,
-                                                                 "http://schemas.xmlsoap.org/wsdl/soap/",
-                                                                 "address");
-                            for (Element soapAddress : sadEls) {
-                                soapAddress.setAttribute("location", base);
-                            }
+                            rewriteAddress(base, el, "http://schemas.xmlsoap.org/wsdl/soap/");
+                            rewriteAddress(base, el, "http://schemas.xmlsoap.org/wsdl/soap12/");
                         }
                     }
                 }
@@ -367,6 +363,15 @@ public class WSDLGetInterceptor extends 
         }
     }
 
+    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) {
         try {
             return new OASISCatalogManagerHelper().resolve(catalogs, start, base);



Mime
View raw message