servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r780940 - in /servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src: main/java/org/apache/servicemix/cxfbc/interceptors/ test/resources/
Date Tue, 02 Jun 2009 06:00:38 GMT
Author: ffang
Date: Tue Jun  2 06:00:38 2009
New Revision: 780940

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

Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutInterceptor.java
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
    servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-DOC.wsdl

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java?rev=780940&r1=780939&r2=780940&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
Tue Jun  2 06:00:38 2009
@@ -54,7 +54,6 @@
 import org.apache.cxf.staxutils.DepthXMLStreamReader;
 import org.apache.cxf.staxutils.PartialXMLStreamReader;
 import org.apache.cxf.staxutils.StaxUtils;
-import org.apache.servicemix.jbi.util.QNameUtil;
 import org.apache.servicemix.soap.util.DomUtil;
 
 /**
@@ -211,15 +210,7 @@
                 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/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutInterceptor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutInterceptor.java?rev=780940&r1=780939&r2=780940&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutInterceptor.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutInterceptor.java
Tue Jun  2 06:00:38 2009
@@ -137,6 +137,9 @@
         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/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java?rev=780940&r1=780939&r2=780940&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOutWsdl1Interceptor.java
Tue Jun  2 06:00:38 2009
@@ -232,6 +232,9 @@
         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/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-DOC.wsdl
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-DOC.wsdl?rev=780940&r1=780939&r2=780940&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-DOC.wsdl
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-DOC.wsdl
Tue Jun  2 06:00:38 2009
@@ -47,6 +47,13 @@
                     </all>
                 </complexType>
             </element>
+            <element name="ImplicitHeader">
+                <complexType>
+                    <all>
+                        <element name="id" type="string"/>
+                    </all>
+                </complexType>
+            </element>
             <element name="HelloFault">
                 <complexType>
                     <all>
@@ -70,6 +77,10 @@
         <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">
             <input message="tns:HelloRequest"/>
@@ -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