cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r465271 - /incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
Date Wed, 18 Oct 2006 15:14:53 GMT
Author: ningjiang
Date: Wed Oct 18 08:14:52 2006
New Revision: 465271

URL: http://svn.apache.org/viewvc?view=rev&rev=465271
Log:
[JIRA CXF-104] 
Updated DispatchImpl.java for message context copying 

Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java?view=diff&rev=465271&r1=465270&r2=465271
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/DispatchImpl.java
Wed Oct 18 08:14:52 2006
@@ -22,6 +22,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import java.util.concurrent.Executor;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
@@ -43,6 +44,7 @@
 import org.apache.cxf.interceptor.MessageSenderInterceptor;
 import org.apache.cxf.jaxws.interceptors.DispatchInInterceptor;
 import org.apache.cxf.jaxws.interceptors.DispatchOutInterceptor;
+import org.apache.cxf.jaxws.support.ContextPropertiesMapping;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.ExchangeImpl;
 import org.apache.cxf.message.Message;
@@ -99,7 +101,13 @@
         if (context != null) {
             message.setContent(JAXBContext.class, context);
         }
-
+        
+        Map<String, Object> requestContext = this.getRequestContext();
+        Map<String, Object> responseContext = this.getResponseContext();
+        message.putAll(requestContext);
+        //need to do context mapping from jax-ws to cxf message
+        ContextPropertiesMapping.mapJaxws2Cxf(message);
+        
         Exchange exchange = new ExchangeImpl();
         exchange.put(Service.Mode.class, mode);
         exchange.put(Class.class, cl);
@@ -136,12 +144,14 @@
         if (!isOneWay) {
             synchronized (exchange) {
                 Message inMsg = waitResponse(exchange);
+                responseContext.putAll(inMsg);
+                //need to do context mapping from cxf message to jax-ws 
+                ContextPropertiesMapping.mapJaxws2Cxf(responseContext);
                 return cl.cast(inMsg.getContent(Object.class));
             }
         }
         return null;
-        //         populateResponseContext(objMsgContext);
-        //         return cl.cast(objMsgContext.getReturn());
+        
     }
 
     private Message waitResponse(Exchange exchange) {



Mime
View raw message