axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <dava...@gmail.com>
Subject [Axis2] Call/Stub (Re: svn commit: r351687 - /webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl)
Date Fri, 02 Dec 2005 11:28:29 GMT
How about all the other setXXX, are u going to add a check for each
getXXX? we already have setAction and setSoapAction?

We need to maintain a global _clientOptions that the user sets and the
generated code should use one new options() per call call and copy
over the global stuff. It's NOT a big deal to copy. we should not be
trying to prematurely optimize stuff w/o running performance tests.

thanks,
dims

On 12/2/05, chinthaka@apache.org <chinthaka@apache.org> wrote:
> Author: chinthaka
> Date: Fri Dec  2 03:21:32 2005
> New Revision: 351687
>
> URL: http://svn.apache.org/viewcvs?rev=351687&view=rev
> Log:
> fixing the overriding behaviour of soap actions
>
> Modified:
>     webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
>
> Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
> URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=351687&r1=351686&r2=351687&view=diff
> ==============================================================================
> --- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
(original)
> +++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
Fri Dec  2 03:21:32 2005
> @@ -50,7 +50,7 @@
>          public <xsl:value-of select="@name"/>(String axis2Home,String targetEndpoint)
throws java.lang.Exception {
>                     //creating the configuration
>             _configurationContext = new org.apache.axis2.context.ConfigurationContextFactory().buildClientConfigurationContext(axis2Home);
> -            _configurationContext.getAxisConfiguration().addService(_service);
> +           _configurationContext.getAxisConfiguration().addService(_service);
>             _serviceContext =_service.getParent().getServiceGroupContext(_configurationContext).getServiceContext(_service.getName().getLocalPart());
>             _clientOptions.setTo(new org.apache.axis2.addressing.EndpointReference(targetEndpoint));
>
> @@ -115,11 +115,13 @@
>               _call.setClientOptions(_clientOptions);
>
>                      org.apache.axis2.context.MessageContext _messageContext = getMessageContext();
> -             _clientOptions.setSoapAction("<xsl:value-of select="$soapAction"/>");
> -
> -            if(_clientOptions.getAction() == null) {
> +             if(_clientOptions.getSoapAction() == null) {
>                 <xsl:for-each select="input/param[@Action!='']">_clientOptions.setAction("<xsl:value-of
select="@Action"/>");</xsl:for-each>
> -                       }
> +                        }
> +
> +             if(_clientOptions.getAction() == null) {
> +               <xsl:for-each select="input/param[@Action!='']">_clientOptions.setAction("<xsl:value-of
select="@Action"/>");</xsl:for-each>
> +                        }
>               //set the properties
>              populateModules(_call);
>
> @@ -208,7 +210,9 @@
>               org.apache.axis2.client.Call _call = new org.apache.axis2.client.Call(_serviceContext);
>               _call.setClientOptions(_clientOptions);
>                      org.apache.axis2.context.MessageContext _messageContext = getMessageContext();
> +            if(_clientOptions.getSoapAction() == null) {
>               _clientOptions.setSoapAction("<xsl:value-of select="$soapAction"/>");
> +            }
>
>             if(_clientOptions.getAction() == null) {
>              <xsl:for-each select="input/param[@Action!='']">_lientOptions.setAction("<xsl:value-of
select="@Action"/>");</xsl:for-each>
> @@ -294,7 +298,11 @@
>
>                     org.apache.axis2.context.MessageContext _messageContext = getMessageContext();
>            _msgSender.setClientOptions(_clientOptions);
> +
> +          if(_clientOptions.getSoapAction() == null) {
>              _clientOptions.setSoapAction("<xsl:value-of select="$soapAction"/>");
> +          }
> +
>              if(_clientOptions.getAction() == null) {
>              <xsl:for-each select="input/param[@Action!='']">_clientOptions.setAction("<xsl:value-of
select="@Action"/>");</xsl:for-each>
>                         }
>
>
>


--
Davanum Srinivas : http://wso2.com/blogs/

Mime
View raw message