cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r798668 - in /cxf/branches/2.1.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java systests/src/test/java/org/apache/cxf/systest/http/WSDLAddressRewriteTest.java
Date Tue, 28 Jul 2009 19:26:10 GMT
Author: dkulp
Date: Tue Jul 28 19:26:10 2009
New Revision: 798668

URL: http://svn.apache.org/viewvc?rev=798668&view=rev
Log:
Merged revisions 798608 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes

................
  r798608 | asoldano | 2009-07-28 13:07:05 -0400 (Tue, 28 Jul 2009) | 18 lines
  
  Merged revisions 798479,798557,798573 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r798479 | asoldano | 2009-07-28 12:18:24 +0200 (mar, 28 lug 2009) | 2 lines
    
    [CXF-2364] Allow SOAP address rewrite in wsdl according to the request call
  ........
    r798557 | asoldano | 2009-07-28 17:23:32 +0200 (mar, 28 lug 2009) | 2 lines
    
    [CXF-2364] adding check on Service name + providing a testcase
  ........
    r798573 | asoldano | 2009-07-28 17:44:27 +0200 (mar, 28 lug 2009) | 2 lines
    
    Checkstyle error fix
  ........
................

Added:
    cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/http/WSDLAddressRewriteTest.java
      - copied unchanged from r798608, cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/http/WSDLAddressRewriteTest.java
Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 28 19:26:10 2009
@@ -1,2 +1,2 @@
-/cxf/branches/2.2.x-fixes:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,777243,777481,777505,777572,777580,780033,780184,780213,780421,780664,780800,780902,780911,781497,781841,782733,782735-782736,783099,783407,784064,784197,785293,785296,785298-785299,785301,785656,786158,786587,786589,786591-786592,786640,787272,787276,787282-787283,787285,787295,787307,787324,7873
 67,788824-788825,788827-788828,788830,789423,789429,789707,789709-789710,789712,789721,789905,789908,789910,789912,790295,790646-790647,790651,790654-790655,790659,791948,791950,791952,791955,792276,792288,792291,792992,792995,792998,794402,794404,794735,794797,794799,794803,795161-795162,796300-796301,796598,797449,797452-797453,797460,797463-797464,797521-797522,797584-797585,797645,797652,797701,797884,797886,798348-798350,798568,798574-798575,798577-798578,798586,798655
-/cxf/trunk:782181,782728-782730,783097,783396,784059,784181,784895,785279-785282,785468,786142,786271,786395,786582-786583,786638,786647,787269,787277-787279,787290,787305,787323,787366,788060,788187,788703,788774,788820,789371,789420,789527-789529,789704-789705,789896,789898-789900,790294,790637-790644,791354,791538,791753,791947,792261-792263,792684,792975,792985,794297,794396,794728,794778-794780,794892,795160,796022-796023,796593,796780,797194,797231-797233,797442,797505,797517,797581-797582,797640,797651,797699,797882-797883,798344-798346,798533,798551,798561-798562,798570,798584,798654
+/cxf/branches/2.2.x-fixes:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,777243,777481,777505,777572,777580,780033,780184,780213,780421,780664,780800,780902,780911,781497,781841,782733,782735-782736,783099,783407,784064,784197,785293,785296,785298-785299,785301,785656,786158,786587,786589,786591-786592,786640,787272,787276,787282-787283,787285,787295,787307,787324,7873
 67,788824-788825,788827-788828,788830,789423,789429,789707,789709-789710,789712,789721,789905,789908,789910,789912,790295,790646-790647,790651,790654-790655,790659,791948,791950,791952,791955,792276,792288,792291,792992,792995,792998,794402,794404,794735,794797,794799,794803,795161-795162,796300-796301,796598,797449,797452-797453,797460,797463-797464,797521-797522,797584-797585,797645,797652,797701,797884,797886,798348-798350,798568,798574-798575,798577-798578,798586,798608,798655
+/cxf/trunk:782181,782728-782730,783097,783396,784059,784181,784895,785279-785282,785468,786142,786271,786395,786582-786583,786638,786647,787269,787277-787279,787290,787305,787323,787366,788060,788187,788703,788774,788820,789371,789420,789527-789529,789704-789705,789896,789898-789900,790294,790637-790644,791354,791538,791753,791947,792261-792263,792684,792975,792985,794297,794396,794728,794778-794780,794892,795160,796022-796023,796593,796780,797194,797231-797233,797442,797505,797517,797581-797582,797640,797651,797699,797882-797883,798344-798346,798479,798533,798551,798557,798561-798562,798570,798573,798584,798654

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java?rev=798668&r1=798667&r2=798668&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
Tue Jul 28 19:26:10 2009
@@ -207,7 +207,7 @@
                 doc = XMLUtils.getParser().parse(src);
             }
             
-            updateDoc(doc, base, mp, smp);
+            updateDoc(doc, base, mp, smp, endpointInfo);
             String enc = doc.getXmlEncoding();
             if (enc == null) {
                 enc = "utf-8";
@@ -226,9 +226,10 @@
         }
     }
     
-    private void updateDoc(Document doc, String base,
+    protected void updateDoc(Document doc, String base,
                            Map<String, Definition> mp,
-                           Map<String, SchemaReference> smp) {        
+                           Map<String, SchemaReference> smp,
+                           EndpointInfo ei) {        
         List<Element> elementList = DOMUtils.findAllElementsByTagNameNS(doc.getDocumentElement(),
                                                                        "http://www.w3.org/2001/XMLSchema",
                                                                        "import");
@@ -258,6 +259,33 @@
                 el.setAttribute("location", base + "?wsdl=" + sl);
             }
         }
+        
+        Boolean rewriteSoapAddress = ei.getProperty("autoRewriteSoapAddress", Boolean.class);
+        
+        if (rewriteSoapAddress != null && rewriteSoapAddress.booleanValue()) {
+            List<Element> serviceList = DOMUtils.findAllElementsByTagNameNS(doc.getDocumentElement(),
+                                                              "http://schemas.xmlsoap.org/wsdl/",
+                                                              "service");
+            for (Element serviceEl : serviceList) {
+                String serviceName = serviceEl.getAttribute("name");
+                if (serviceName.equals(ei.getService().getName().getLocalPart())) {
+                    elementList = DOMUtils.findAllElementsByTagNameNS(doc.getDocumentElement(),
+                                                                      "http://schemas.xmlsoap.org/wsdl/",
+                                                                      "port");
+                    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);
+                        }
+                    }
+                }
+            }
+        }
+        
         doc.setXmlStandalone(true);
     }
 



Mime
View raw message