You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/07/02 18:42:47 UTC

svn commit: r790663 - in /cxf/branches/2.1.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java

Author: dkulp
Date: Thu Jul  2 16:42:47 2009
New Revision: 790663

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

................
  r790647 | dkulp | 2009-07-02 12:25:03 -0400 (Thu, 02 Jul 2009) | 9 lines
  
  Merged revisions 790638 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r790638 | dkulp | 2009-07-02 12:19:11 -0400 (Thu, 02 Jul 2009) | 1 line
    
    [CXF-2327] Add some guards around local parts in QName constructions
  ........
................

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul  2 16:42:47 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
-/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
+/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
+/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-790638

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

Modified: cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?rev=790663&r1=790662&r2=790663&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java (original)
+++ cxf/branches/2.1.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java Thu Jul  2 16:42:47 2009
@@ -511,6 +511,11 @@
             if (StringUtils.isEmpty(partNameFilter)
                 || part.getName().equals(partNameFilter)) {
             
+                if (StringUtils.isEmpty(part.getName())) {
+                    throw new RuntimeException("Problem with WSDL: part element in message "
+                                               + msg.getQName().getLocalPart() 
+                                               + " does not specify a name.");
+                }
                 QName pqname = new QName(minfo.getName().getNamespaceURI(), part.getName());
                 MessagePartInfo pi = minfo.getMessagePart(pqname);
                 if (pi != null
@@ -597,6 +602,11 @@
             for (SoapHeader header : headers) {
                 SoapHeaderInfo headerInfo = new SoapHeaderInfo();
                 headerInfo.setUse(header.getUse());
+                if (StringUtils.isEmpty(header.getPart())) {
+                    throw new RuntimeException("Problem with WSDL: soap:header element in operation "
+                                               + boi.getName().getLocalPart() 
+                                               + " does not specify a part.");
+                }
                 MessagePartInfo part = msg.getMessagePart(new QName(msg.getName().getNamespaceURI(), 
                                                                     header.getPart()));
                 if (part != null && header.getMessage() != null
@@ -677,6 +687,12 @@
                     attParts = new LinkedList<MessagePartInfo>();
                 }
 
+                if (StringUtils.isEmpty(partName)) {
+                    throw new RuntimeException("Problem with WSDL: mime content element in operation "
+                                               + bmsg.getBindingOperation().getName().getLocalPart() 
+                                               + " does not specify a part.");
+                }
+
                 MessagePartInfo mpi =
                     msg.getMessagePart(new QName(msg.getName().getNamespaceURI(),
                                                  partName));
@@ -699,9 +715,16 @@
 
                 SoapHeaderInfo headerInfo = new SoapHeaderInfo();
                 headerInfo.setUse(header.getUse());
+                
+                if (StringUtils.isEmpty(header.getPart())) {
+                    throw new RuntimeException("Problem with WSDL: soap:header element in operation "
+                                               + bmsg.getBindingOperation().getName().getLocalPart() 
+                                               + " does not specify a part.");
+                }
+                
                 MessagePartInfo mpi =
-                    msg.getMessagePart(new QName(msg.getName().getNamespaceURI(), header
-                                .getPart()));
+                    msg.getMessagePart(new QName(msg.getName().getNamespaceURI(), 
+                                                 header.getPart()));
                 
                 if (mpi != null && header.getMessage() != null
                     && !mpi.getMessageInfo().getName().equals(header.getMessage())) {