cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject svn commit: r499220 - in /incubator/cxf/trunk/rt: bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/
Date Wed, 24 Jan 2007 03:15:24 GMT
Author: tli
Date: Tue Jan 23 19:15:23 2007
New Revision: 499220

URL: http://svn.apache.org/viewvc?view=rev&rev=499220
Log:
CXF-388 support order params in holder processing

Modified:
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java?view=diff&rev=499220&r1=499219&r2=499220
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
Tue Jan 23 19:15:23 2007
@@ -110,26 +110,6 @@
             }            
             Object param = dr.read(part, message);
             parameters.add(param);
-//            MessagePartInfo p = msg.getMessageParts().get(idx);
-//            if (p == null) {
-//                throw new SoapFault("Parameter " + xmlReader.getName() + " does not exist!",
-//                                    ((SoapMessage)message).getVersion().getSender());
-//            }
-//            QName elName = new QName(operation.getOperationInfo().getName().getNamespaceURI(),

-//                    p.getName().getLocalPart());
-//
-//            if (!elName.getLocalPart().equals(name.getLocalPart())) {
-//                String expMessage = "Parameter " + name + " is not equal to the name ["
-//                                    + elName.getLocalPart() + "] in the servicemodel!";
-//                throw new SoapFault(expMessage, ((SoapMessage)message).getVersion().getSender());
-//            }
-//            Object param = null;
-//            param = dr.read(p, message);
-//            if (param != null) {
-//                parameters.add(param);
-//            } else {
-//                throw new RuntimeException(p.getName() + " can not be unmarshalled");
-//            }
         }
         message.setContent(List.class, parameters);
     }

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java?view=diff&rev=499220&r1=499219&r2=499220
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
Tue Jan 23 19:15:23 2007
@@ -90,14 +90,13 @@
                         llist.add(i, mpi);
                     }
                 }
-                for (int idx = 0; idx < countParts; idx++) {
-                    Object arg = null;
-                    for (arg = objs.get(notNullIndex); arg == null; notNullIndex++) {
-                        arg = objs.get(notNullIndex);
+                for (int idx = 0; idx < countParts; idx++) {                    
+                    while (objs.get(notNullIndex) == null) {
+                        notNullIndex++;
                     }
-                    notNullIndex++;
                     MessagePartInfo part = (MessagePartInfo) llist.get(idx);
-                    dataWriter.write(arg, part, message);
+                    dataWriter.write(objs.get(notNullIndex), part, message);
+                    notNullIndex++;
                 }
             }
             // Finishing the writing.

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java?view=diff&rev=499220&r1=499219&r2=499220
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/HolderOutInterceptor.java
Tue Jan 23 19:15:23 2007
@@ -85,7 +85,7 @@
                     Holder holder = (Holder) outObjects.get(idx);
                     if (part.getProperty(ReflectionServiceFactoryBean.MODE_INOUT) != null)
{
                         newObjects.set(idx, holder.value);
-                    } 
+                    }
                     holders.add(holder);
                 }
             }
@@ -101,8 +101,23 @@
                     i++;
                     continue;
                 }
-                
-                newObjects.set(part.getIndex(), outObjects.get(i));
+                List<String> ordering = part.getMessageInfo().getOperation().getParameterOrdering();
+                if (ordering != null && ordering.size() > 0) {
+                    int orderIdx = -1;
+                    for (int j = 0; j < ordering.size(); j++) {
+                        if (ordering.get(j).equals(part.getName().getLocalPart())) {
+                            orderIdx = j;
+                            break;
+                        }
+                    }
+                    if (orderIdx != -1) {                        
+                        newObjects.set(part.getIndex(), outObjects.get(orderIdx));
+                    } else {
+                        newObjects.set(part.getIndex(), outObjects.get(i));
+                    }                    
+                } else {
+                    newObjects.set(part.getIndex(), outObjects.get(i));
+                }
                 i++;
             }
             



Mime
View raw message