Author: amilas
Date: Wed Mar  5 01:08:13 2008
New Revision: 633795

URL: http://svn.apache.org/viewvc?rev=633795&view=rev
Log:
copy the option properties to service context so that they can be used in the 
receiving path

Modified:
    
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java

Modified: 
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
URL: 
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java?rev=633795&r1=633794&r2=633795&view=diff
==============================================================================
--- 
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
 (original)
+++ 
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
 Wed Mar  5 01:08:13 2008
@@ -50,6 +50,7 @@
 import javax.xml.namespace.QName;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.Iterator;
 
 /**
  * Client access to a service. Each instance of this class is associated with a
@@ -59,7 +60,7 @@
  */
 public class ServiceClient {
     protected static final Log log = LogFactory.getLog(ServiceClient.class);
-    
+
     /**
      * Base name used for a service created without an existing configuration.
      */
@@ -268,7 +269,7 @@
             return axisConfig;
         }
     }
-    
+
     /**
      * Return the AxisService this is a client for. This is primarily useful
      * when the AxisService is created anonymously or from WSDL as otherwise 
the
@@ -650,6 +651,12 @@
                     .getMessage("operationnotfound", 
operationQName.getLocalPart()));
         }
 
+        // add the option properties to the service context
+        String key;
+        for (Iterator iter = 
options.getProperties().keySet().iterator();iter.hasNext();){
+            key = (String) iter.next();
+            serviceContext.setProperty(key, options.getProperties().get(key));
+        }
         OperationClient operationClient = 
axisOperation.createClient(serviceContext, options);
 
         // if overide options have been set, that means we need to make sure
@@ -827,7 +834,7 @@
         synchronized(this.axisConfig) {
             axisConfig.removeService(this.axisService.getName());
             this.axisService = axisService;
-    
+
             axisService.setClientSide(true);
             axisConfig.addService(axisService);
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to