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 di...@apache.org on 2006/08/10 16:55:55 UTC
svn commit: r430406 -
/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
Author: dims
Date: Thu Aug 10 07:55:54 2006
New Revision: 430406
URL: http://svn.apache.org/viewvc?rev=430406&view=rev
Log:
Fix for AXIS2-994 - web service stub generator populateAxisService() and populateFaults() should not be called from constructor
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/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=430406&r1=430405&r2=430406&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 Thu Aug 10 07:55:54 2006
@@ -37,19 +37,19 @@
public class <xsl:value-of select="@name"/> extends org.apache.axis2.client.Stub
<xsl:if test="not(@wrapped)">implements <xsl:value-of select="$interfaceName"/></xsl:if>{
//default axis home being null forces the system to pick up the mars from the axis2 library
- public static final java.lang.String AXIS2_HOME = null;
protected static org.apache.axis2.description.AxisOperation[] _operations;
//hashmaps to keep the fault mapping
- private java.util.HashMap faultExeptionNameMap = new java.util.HashMap();
- private java.util.HashMap faultExeptionClassNameMap = new java.util.HashMap();
- private java.util.HashMap faultMessageMap = new java.util.HashMap();
+ private static java.util.HashMap faultExeptionNameMap = new java.util.HashMap();
+ private static java.util.HashMap faultExeptionClassNameMap = new java.util.HashMap();
+ private static java.util.HashMap faultMessageMap = new java.util.HashMap();
- private void populateAxisService(){
+ static {
+ //To populate AxisService
//creating the Service with a unique name
- _service = new org.apache.axis2.description.AxisService("<xsl:value-of select="@servicename"/>" + this.hashCode());
+ _service = new org.apache.axis2.description.AxisService("<xsl:value-of select="@servicename"/>" + new Object().hashCode());
<xsl:if test="@policy">
/*
* setting the endpont policy
@@ -99,7 +99,7 @@
}
//populates the faults
- private void populateFaults(){
+ static {
<xsl:for-each select="method">
<xsl:for-each select="fault/param">
faultExeptionNameMap.put( new javax.xml.namespace.QName(
@@ -128,9 +128,6 @@
public <xsl:value-of select="@name"/>(org.apache.axis2.context.ConfigurationContext configurationContext,
java.lang.String targetEndpoint)
throws java.lang.Exception {
- //To populate AxisService
- populateAxisService();
- populateFaults();
_serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext,_service);
configurationContext = _serviceClient.getServiceContext().getConfigurationContext();
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org