cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r819599 - in /cxf/trunk/rt: bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
Date Mon, 28 Sep 2009 15:44:07 GMT
Author: dkulp
Date: Mon Sep 28 15:44:07 2009
New Revision: 819599

URL: http://svn.apache.org/viewvc?rev=819599&view=rev
Log:
[CXF-2448] With provider/dispatch services, only the first part should
be mapped (since invoke only has a single param)

Modified:
    cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java

Modified: cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java?rev=819599&r1=819598&r2=819599&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
(original)
+++ cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
Mon Sep 28 15:44:07 2009
@@ -89,31 +89,32 @@
         boolean supportsNode = this.supportsDataReader(message, Node.class);
         for (SoapHeaderInfo header : headers) {
             MessagePartInfo mpi = header.getPart();
-            Header param = findHeader(message, mpi);
-            
-            Object object = null;
-            if (param != null) {
-                message.getHeaders().remove(param);
+            if (mpi.getTypeClass() != null) {
+
+                Header param = findHeader(message, mpi);
                 
-                if (param.getDataBinding() == null) {
-                    Node source = (Node)param.getObject();
-                    if (supportsNode) {
-                        object = getNodeDataReader(message).read(mpi, source);
+                Object object = null;
+                if (param != null) {
+                    message.getHeaders().remove(param);
+                    
+                    if (param.getDataBinding() == null) {
+                        Node source = (Node)param.getObject();
+                        if (supportsNode) {
+                            object = getNodeDataReader(message).read(mpi, source);
+                        } else {
+                            W3CDOMStreamReader reader = new W3CDOMStreamReader((Element)source);
+                            try {
+                                reader.nextTag(); //advance into the first tag
+                            } catch (XMLStreamException e) {
+                                //ignore
+                            } 
+                            object = getDataReader(message, XMLStreamReader.class).read(mpi,
reader);
+                        }
                     } else {
-                        W3CDOMStreamReader reader = new W3CDOMStreamReader((Element)source);
-                        try {
-                            reader.nextTag(); //advance into the first tag
-                        } catch (XMLStreamException e) {
-                            //ignore
-                        } 
-                        object = getDataReader(message, XMLStreamReader.class).read(mpi,
reader);
+                        object = param.getObject();
                     }
-                } else {
-                    object = param.getObject();
+                    
                 }
-                
-            }
-            if (mpi.getTypeClass() != null) {
                 parameters.put(mpi, object);
             }
         }

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java?rev=819599&r1=819598&r2=819599&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
Mon Sep 28 15:44:07 2009
@@ -286,6 +286,7 @@
                             }
                             for (MessagePartInfo inf : o.getInput().getMessageParts()) {
                                 inf.setTypeClass(c);
+                                break;
                             }
                         }
                         if (o.getOutput() != null) {
@@ -297,6 +298,7 @@
                             }
                             for (MessagePartInfo inf : o.getOutput().getMessageParts()) {
                                 inf.setTypeClass(c);
+                                break;
                             }
                         }
                         getMethodDispatcher().bind(o, invoke);



Mime
View raw message