You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by aj...@apache.org on 2006/05/19 19:48:04 UTC
svn commit: r407862 - in /webservices/axis2/trunk/java/modules:
codegen/src/org/apache/axis2/wsdl/template/java/
core/src/org/apache/axis2/client/ core/src/org/apache/axis2/description/
Author: ajith
Date: Fri May 19 10:48:03 2006
New Revision: 407862
URL: http://svn.apache.org/viewvc?rev=407862&view=rev
Log:
1. Changed the stub code to generate a unique service name for the Axis Service it creates.
2. Added a cleanup method to the stub base class to remove the used axis service instance from the axis configuration
3. Corrected a few spelling mistakes
Modified:
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Stub.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
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=407862&r1=407861&r2=407862&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 May 19 10:48:03 2006
@@ -48,8 +48,8 @@
private void populateAxisService(){
- //creating the Service
- _service = new org.apache.axis2.description.AxisService("<xsl:value-of select="@servicename"/>");
+ //creating the Service with a unique name
+ _service = new org.apache.axis2.description.AxisService("<xsl:value-of select="@servicename"/>" + this.hashCode());
<xsl:if test="@policy">
/*
* setting the endpont policy
@@ -122,7 +122,10 @@
}
- public <xsl:value-of select="@name"/>(org.apache.axis2.context.ConfigurationContext configurationContext,
+ /**
+ Constructor that takes in a configContext
+ */
+ public <xsl:value-of select="@name"/>(org.apache.axis2.context.ConfigurationContext configurationContext,
java.lang.String targetEndpoint)
throws java.lang.Exception {
//To populate AxisService
@@ -193,8 +196,7 @@
* Constructor taking the target endpoint
*/
public <xsl:value-of select="@name"/>(java.lang.String targetEndpoint) throws java.lang.Exception {
- this(org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(AXIS2_HOME,null),
- targetEndpoint);
+ this(null,targetEndpoint);
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Stub.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Stub.java?rev=407862&r1=407861&r2=407862&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Stub.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Stub.java Fri May 19 10:48:03 2006
@@ -30,11 +30,14 @@
import org.apache.axis2.description.AxisService;
import org.apache.axis2.i18n.Messages;
import org.apache.axis2.wsdl.WSDLConstants;
+import org.apache.axis2.AxisFault;
import javax.xml.stream.XMLStreamReader;
import java.util.ArrayList;
-public abstract class Stub {
+public abstract class
+ Stub {
+
protected static AxisService _service;
protected ArrayList modules = new ArrayList();
@@ -93,5 +96,21 @@
}
}
+ /**
+ * Finalize overridden to cleanup
+ * @throws Throwable
+ */
+ protected void finalize() throws Throwable {
+ super.finalize();
+ cleanup();
+ }
+
+ /**
+ * Cleanup by removing the axis service
+ * @throws AxisFault
+ */
+ public void cleanup() throws AxisFault {
+ _service.getAxisConfiguration().removeService(_service.getName());
+ }
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?rev=407862&r1=407861&r2=407862&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Fri May 19 10:48:03 2006
@@ -881,7 +881,7 @@
private Definition readInTheWSDLFile(InputStream in) throws WSDLException {
WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
- //swithc off the verbose mode for all usecases
+ //switch off the verbose mode for all usecases
reader.setFeature("javax.wsdl.verbose", false);
if (customWSLD4JResolver != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org