servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r780954 - in /servicemix/components/bindings/servicemix-cxf-bc/trunk: ./ src/main/java/org/apache/servicemix/cxfbc/interceptors/ src/test/resources/
Date Tue, 02 Jun 2009 06:52:40 GMT
Author: ffang
Date: Tue Jun  2 06:52:40 2009
New Revision: 780954

URL: http://svn.apache.org/viewvc?rev=780954&view=rev
Log:
[SMXCOMP-557]cxf bc should honor implicitly used soap header

Modified:
    servicemix/components/bindings/servicemix-cxf-bc/trunk/pom.xml
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutInterceptor.java
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/HelloWorld-DOC.wsdl

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/pom.xml?rev=780954&r1=780953&r2=780954&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/pom.xml (original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/pom.xml Tue Jun  2 06:52:40 2009
@@ -48,7 +48,7 @@
     <servicemix-version>3.3</servicemix-version>
     <servicemix-shared-version>2009.01</servicemix-shared-version>
     <servicemix-cxf-se-version>2009.02-SNAPSHOT</servicemix-cxf-se-version>
-    <cxf-version>2.2.2-SNAPSHOT</cxf-version>
+    <cxf-version>2.2.2</cxf-version>
     <jetty-version>6.1.14</jetty-version>
     <spring-version>2.5.6</spring-version>
     <derby-version>10.4.1.3</derby-version>

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java?rev=780954&r1=780953&r2=780954&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
Tue Jun  2 06:52:40 2009
@@ -53,7 +53,6 @@
 import org.apache.cxf.staxutils.PartialXMLStreamReader;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.servicemix.soap.util.DomUtil;
-import org.apache.servicemix.soap.util.QNameUtil;
 
 /**
  * @author <a href="mailto:gnodet [at] gmail.com">Guillaume Nodet</a>
@@ -208,15 +207,6 @@
                 MessagePartInfo part = header.getPart();
                 Header param = findHeader(headerElement, part);
                 int idx = part.getIndex();
-                QName element = part.isElement() ? part.getElementQName() : part.getTypeQName();
-                
-                
-                Header hdr = getHeaderElement(message, element);
-                if (hdr == null) {
-                    throw new Fault(new Exception(
-                            "Missing required header element: "
-                                    + QNameUtil.toString(element)));
-                }
                 if (idx > parts.size()) {
                     parts.add(param);
                 } else if (idx == -1) {

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutInterceptor.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutInterceptor.java?rev=780954&r1=780953&r2=780954&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutInterceptor.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutInterceptor.java
Tue Jun  2 06:52:40 2009
@@ -137,6 +137,10 @@
         List<Header> headerList = message.getHeaders();
         List<SoapHeaderInfo> headers = msg.getExtensors(SoapHeaderInfo.class);
         for (SoapHeaderInfo header : headers) {
+            if (partsContent.size() == 0) {
+                break;
+            }
+
             NodeList nl = partsContent.get(0);
             if (header.getPart().getConcreteName().getNamespaceURI().equals(
                     nl.item(0).getNamespaceURI())

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java?rev=780954&r1=780953&r2=780954&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
Tue Jun  2 06:52:40 2009
@@ -227,6 +227,10 @@
         List<Header> headerList = message.getHeaders();
         List<SoapHeaderInfo> headers = msg.getExtensors(SoapHeaderInfo.class);
         for (SoapHeaderInfo header : headers) {
+            if (partsContent.size() == 0) {
+                break;
+            }
+
             NodeList nl = partsContent.get(0);
             if (header.getPart().getConcreteName().getNamespaceURI().equals(nl.item(0).getNamespaceURI())
                     && header.getPart().getConcreteName().getLocalPart().equals(nl.item(0).getLocalName()))
{

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/HelloWorld-DOC.wsdl
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/HelloWorld-DOC.wsdl?rev=780954&r1=780953&r2=780954&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/HelloWorld-DOC.wsdl
(original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/HelloWorld-DOC.wsdl
Tue Jun  2 06:52:40 2009
@@ -54,6 +54,13 @@
                     </all>
                 </complexType>
             </element>
+            <element name="ImplicitHeader">
+                <complexType>
+                    <all>
+                        <element name="id" type="string"/>
+                    </all>
+                </complexType>
+            </element>
         </schema>
     </types>
 
@@ -69,6 +76,10 @@
     <message name="HelloFault">
         <part name="body" element="tns:HelloFault"/>
     </message>
+    
+    <message name="implicit_header">
+        <part name="implicit_header" element="tns:ImplicitHeader"/>
+    </message>
 
     <portType name="HelloPortType">
         <operation name="Hello">
@@ -85,6 +96,7 @@
             <input>
                 <soap:body use="literal" parts="body"/>
                 <soap:header use="literal" message="tns:HelloRequest" part="header1"/>
+                <soap:header use="literal" message="tns:implicit_header" part="implicit_header"/>
             </input>
             <output>
                 <soap:body use="literal" parts="body"/>



Mime
View raw message