Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 8635 invoked from network); 3 May 2007 14:08:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 May 2007 14:08:50 -0000 Received: (qmail 6005 invoked by uid 500); 3 May 2007 14:08:55 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 5893 invoked by uid 500); 3 May 2007 14:08:55 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 5882 invoked by uid 500); 3 May 2007 14:08:55 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 5879 invoked by uid 99); 3 May 2007 14:08:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2007 07:08:55 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [195.121.247.11] (HELO psmtp02.wxs.nl) (195.121.247.11) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2007 07:08:46 -0700 Received: from [127.0.0.1] ([62.12.10.64]) by psmtp02.wxs.nl (iPlanet Messaging Server 5.2 HotFix 2.15 (built Nov 14 2006)) with ESMTP id <0JHG00IFNXXZJ6@psmtp02.wxs.nl> for axis2-cvs@ws.apache.org; Thu, 03 May 2007 16:08:25 +0200 (MEST) Date: Thu, 03 May 2007 16:08:23 +0200 From: Deepal Jayasinghe Subject: Re: svn commit: r534865 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client: OperationClient.java ServiceClient.java In-reply-to: <20070503140006.248EA1A9838@eris.apache.org> To: gdaniels@apache.org Cc: axis2-cvs@ws.apache.org Message-id: <4639ECD7.9020404@opensource.lk> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Enigmail-Version: 0.93.0.0 References: <20070503140006.248EA1A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Hi Glen, Why do you want to do such a thing ? , does anyone ask for a feature like this ? As I can see you are breaking Axis2 concepts :) In the meantime I can not understand from where we are going to end up with these changes. Thanks Deepal gdaniels@apache.org wrote: >Author: gdaniels >Date: Thu May 3 07:00:04 2007 >New Revision: 534865 > >URL: http://svn.apache.org/viewvc?view=rev&rev=534865 >Log: >Always cache last operation context on the client if ServiceContext is configured that way. > >Clean up JavaDoc. > >Modified: > webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/OperationClient.java > 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/OperationClient.java >URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/OperationClient.java?view=diff&rev=534865&r1=534864&r2=534865 >============================================================================== >--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/OperationClient.java (original) >+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/OperationClient.java Thu May 3 07:00:04 2007 >@@ -64,13 +64,16 @@ > */ > protected boolean completed; > >- protected OperationClient(AxisOperation axisOp, ServiceContext sc, >- Options options) { >+ protected OperationClient(AxisOperation axisOp, ServiceContext sc, Options options) { > this.axisOp = axisOp; > this.sc = sc; > this.options = new Options(options); >- this.completed = false; >- this.oc = ContextFactory.createOperationContext(axisOp, this.sc); >+ completed = false; >+ oc = ContextFactory.createOperationContext(axisOp, sc); >+ >+ if (sc.isCachingOperationContext()) { >+ sc.setLastOperationContext(oc); >+ } > } > > /** > >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?view=diff&rev=534865&r1=534864&r2=534865 >============================================================================== >--- 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 Thu May 3 07:00:04 2007 >@@ -160,13 +160,13 @@ > > /** > * This is WSDL4J based constructor to configure the Service Client/ >- * We are going to make this policy aware >+ * TODO: make this policy aware > * >- * @param configContext >- * @param wsdl4jDefinition >- * @param wsdlServiceName >- * @param portName >- * @throws AxisFault >+ * @param configContext active ConfigurationContext >+ * @param wsdl4jDefinition the WSDL we're going to be using to configure ourselves >+ * @param wsdlServiceName QName of the WSDL service we'd like to access >+ * @param portName name of the WSDL port we'd like to access >+ * @throws AxisFault in case of error > */ > > public ServiceClient(ConfigurationContext configContext, Definition wsdl4jDefinition, >@@ -223,7 +223,7 @@ > * Create a service client by assuming an anonymous service and any other > * necessary information. > * >- * @throws AxisFault >+ * @throws AxisFault in case of error > */ > public ServiceClient() throws AxisFault { > this(null, null); >@@ -291,7 +291,7 @@ > * each client, with the standard values for the client still used for any > * values not set in the override configuration. > * >- * @param overrideOptions >+ * @param overrideOptions the Options to use > */ > public void setOverrideOptions(Options overrideOptions) { > this.overrideOptions = overrideOptions; >@@ -310,7 +310,7 @@ > /** > * Engage a module for this service client. > * >- * @deprecate Please use String version instead >+ * @deprecated Please use String version instead > * @param moduleName name of the module to engage > * @throws AxisFault if something goes wrong > */ >@@ -338,8 +338,8 @@ > /** > * Disengage a module for this service client > * >- * @deprecate Please use String version instead >- * @param moduleName >+ * @deprecated Please use String version instead >+ * @param moduleName name of Module to disengage > */ > public void disengageModule(QName moduleName) { > disengageModule(moduleName.getLocalPart()); >@@ -348,7 +348,7 @@ > /** > * Disengage a module for this service client > * >- * @param moduleName >+ * @param moduleName name of Module to disengage > */ > public void disengageModule(String moduleName) { > AxisModule module = axisConfig.getModule(moduleName); >@@ -393,20 +393,18 @@ > > > /** >- * Add a simple header consisting of some text (and a header name; duh) to >- * be sent with interactions. >+ * Add a simple header containing some text to be sent with interactions. > * >- * @param headerName >- * @param headerText >- * @throws AxisFault >+ * @param headerName name of header to add >+ * @param headerText text content for header >+ * @throws AxisFault in case of error > */ > public void addStringHeader(QName headerName, String headerText) throws AxisFault { > if (headerName.getNamespaceURI() == null || "".equals(headerName.getNamespaceURI())) { > throw new AxisFault( >- "Failed to add string header , you have to have namespaceURI for the QName"); >+ "Failed to add string header, you have to have namespaceURI for the QName"); > } >- OMElement omElement = OMAbstractFactory.getOMFactory().createOMElement( >- headerName, null); >+ OMElement omElement = OMAbstractFactory.getOMFactory().createOMElement(headerName, null); > omElement.setText(headerText); > addHeader(omElement); > } >@@ -491,9 +489,9 @@ > * can instead create a client for the operation and use that client to > * execute the exchange. > * >- * @param elem >+ * @param elem the data to send (becomes the content of SOAP body) > * @return response >- * @throws AxisFault >+ * @throws AxisFault in case of error > * @see #createClient(QName) > */ > public OMElement sendReceive(OMElement elem) throws AxisFault { >@@ -507,9 +505,9 @@ > * the exchange. > * > * @param operationQName name of operationQName to be invoked (non-null) >- * @param xmlPayload >- * @return response >- * @throws AxisFault >+ * @param xmlPayload the data to send (becomes the content of SOAP body) >+ * @return response OMElement >+ * @throws AxisFault in case of error > */ > public OMElement sendReceive(QName operationQName, OMElement xmlPayload) > throws AxisFault { >@@ -530,9 +528,9 @@ > * create a client for the operation and use that client to execute the > * exchange. > * >- * @param elem >- * @param callback >- * @throws AxisFault >+ * @param elem the data to send (becomes the content of SOAP body) >+ * @param callback a Callback which will be notified upon completion >+ * @throws AxisFault in case of error > * @see #createClient(QName) > */ > public void sendReceiveNonBlocking(OMElement elem, Callback callback) >@@ -548,9 +546,9 @@ > * exchange. > * > * @param operation name of operation to be invoked (non-null) >- * @param elem >- * @param callback >- * @throws AxisFault >+ * @param elem the data to send (becomes the content of SOAP body) >+ * @param callback a Callback which will be notified upon completion >+ * @throws AxisFault in case of error > * @see #createClient(QName) > */ > public void sendReceiveNonBlocking(QName operation, OMElement elem, >@@ -638,7 +636,7 @@ > /** > * Add all configured headers to a SOAP envelope. > * >- * @param envelope >+ * @param envelope the SOAPEnvelope in which to write the headers > */ > public void addHeadersToEnvelope(SOAPEnvelope envelope) { > if (headers != null) { >@@ -655,7 +653,7 @@ > * > * @param transport transport name (non-null) > * @return local endpoint >- * @throws AxisFault >+ * @throws AxisFault in case of error > */ > public EndpointReference getMyEPR(String transport) throws AxisFault { > return serviceContext.getMyEPR(transport); >@@ -673,7 +671,7 @@ > /** > * Set the endpoint reference for the service. > * >- * @param targetEpr >+ * @param targetEpr the EPR this ServiceClient should target > */ > public void setTargetEPR(EndpointReference targetEpr) { > serviceContext.setTargetEPR(targetEpr); >@@ -682,6 +680,8 @@ > > /** > * Gets the last OperationContext >+ * >+ * @return the last OperationContext that was invoked by this ServiceClient > */ > public OperationContext getLastOperationContext() { > return serviceContext.getLastOperationContext(); >@@ -689,6 +689,8 @@ > > /** > * Sets whether or not to cache the last OperationContext >+ * >+ * @param cachingOpContext true if we should hold onto the last active OperationContext > */ > public void setCachingOperationContext(boolean cachingOpContext) { > serviceContext.setCachingOperationContext(cachingOpContext); >@@ -714,7 +716,7 @@ > * you're done using the client, in order to discard any associated > * resources. > * >- * @throws AxisFault >+ * @throws AxisFault in case of error > */ > public void cleanup() throws AxisFault { > // if a configuration context was created for this client there'll also > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org >For additional commands, e-mail: axis-cvs-help@ws.apache.org > > > > > -- Thanks, Deepal ................................................................ "The highest tower is built one brick at a time" --------------------------------------------------------------------- To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org For additional commands, e-mail: axis-cvs-help@ws.apache.org