servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r663860 - in /servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src: main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java test/resources/HelloWorld-RPC-Input.xml test/resources/HelloWorld-RPC.wsdl
Date Fri, 06 Jun 2008 08:43:47 GMT
Author: ffang
Date: Fri Jun  6 01:43:47 2008
New Revision: 663860

URL: http://svn.apache.org/viewvc?rev=663860&view=rev
Log:
[SM-1376]CxfBcComponentTest tests failed caused by recent changes in cxf

Modified:
    servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
    servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-RPC-Input.xml
    servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-RPC.wsdl

Modified: servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java?rev=663860&r1=663859&r2=663860&view=diff
==============================================================================
--- servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
(original)
+++ servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
Fri Jun  6 01:43:47 2008
@@ -201,7 +201,9 @@
                 MessagePartInfo part = header.getPart();
                 Header param = findHeader(headerElement, part);
                 int idx = part.getIndex();
-                QName element = part.getElementQName();
+                QName element = part.isElement() ? part.getElementQName() : part.getTypeQName();
+                
+                
                 Header hdr = getHeaderElement(message, element);
                 if (hdr == null) {
                     throw new Fault(new Exception(
@@ -314,7 +316,9 @@
         }
         List<Header> headerElement = message.getHeaders();
         for (SoapHeaderInfo header : headers) {
-            if (header.getPart().getElementQName().equals(name)) {
+            QName qname = header.getPart().isElement() 
+                ? header.getPart().getElementQName() : header.getPart().getTypeQName();
+            if (qname.equals(name)) {
                 MessagePartInfo mpi = header.getPart();
                 return findHeader(headerElement, mpi);
             }
@@ -351,13 +355,21 @@
         if (headerElement != null) {
             QName name = mpi.getConcreteName();
             for (Header header : headerElement) {
-                if (header.getName().getNamespaceURI() != null
+                if (mpi.isElement()) {
+                    if (header.getName().getNamespaceURI() != null
                         && header.getName().getNamespaceURI().equals(
                                 name.getNamespaceURI())
                         && header.getName().getLocalPart() != null
                         && header.getName().getLocalPart().equals(
                                 name.getLocalPart())) {
-                    param = header;
+                        param = header;
+                    }
+                } else {
+                    if (header.getName().getLocalPart() != null
+                            && header.getName().getLocalPart().equals(
+                                name.getLocalPart())) {
+                        param = header;
+                    }
                 }
             }
         }

Modified: servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-RPC-Input.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-RPC-Input.xml?rev=663860&r1=663859&r2=663860&view=diff
==============================================================================
--- servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-RPC-Input.xml
(original)
+++ servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-RPC-Input.xml
Fri Jun  6 01:43:47 2008
@@ -20,13 +20,13 @@
 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
 
   <SOAP-ENV:Header>
-    <HelloHeader1 xmlns="uri:HelloWorld">
-      <id1>abcdefghij</id1>
-    </HelloHeader1>
+    <header1 xmlns="uri:HelloWorld">
+      abcdefghij
+    </header1>
     
-    <HelloHeader2 xmlns="uri:HelloWorld">
-      <id2>1234567890</id2>
-    </HelloHeader2>
+    <header2 xmlns="uri:HelloWorld">
+      1234567890
+    </header2>
   </SOAP-ENV:Header>
   
   <SOAP-ENV:Body>

Modified: servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-RPC.wsdl
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-RPC.wsdl?rev=663860&r1=663859&r2=663860&view=diff
==============================================================================
--- servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-RPC.wsdl
(original)
+++ servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-cxf-bc/src/test/resources/HelloWorld-RPC.wsdl
Fri Jun  6 01:43:47 2008
@@ -25,28 +25,11 @@
         xmlns="http://schemas.xmlsoap.org/wsdl/">
 
     <types>
-        <schema targetNamespace="uri:HelloWorld"
-                xmlns="http://www.w3.org/2000/10/XMLSchema">
-            <element name="HelloHeader1">
-                <complexType>
-                    <all>
-                        <element name="id1" type="string"/>
-                    </all>
-                </complexType>
-            </element>
-            <element name="HelloHeader2">
-                <complexType>
-                    <all>
-                        <element name="id2" type="string"/>
-                    </all>
-                </complexType>
-            </element>
-        </schema>
     </types>
 
     <message name="HelloRequest">
-        <part name="header1" element="tns:HelloHeader1"/>
-        <part name="header2" element="tns:HelloHeader2"/>
+        <part name="header1" type="xsd:string"/>
+        <part name="header2" type="xsd:string"/>
         <part name="param1" type="xsd:string"/>
         <part name="param2" type="xsd:int"/>
     </message>



Mime
View raw message