You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by am...@apache.org on 2008/03/05 10:08:15 UTC
svn commit: r633795 -
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
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: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org
Re: svn commit: r633795 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
Posted by David Illsley <da...@gmail.com>.
Hi, could you explain the problem you're trying to solve further?
Your solution seems to be in contradiction with the existing methods
and I'm not entirely comfortable with it.
Cheers,
David
On Wed, Mar 5, 2008 at 3:08 AM, <am...@apache.org> wrote:
> 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: axis-cvs-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-cvs-help@ws.apache.org
>
>
--
David Illsley - IBM Web Services Development
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org