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 2004/11/11 11:14:40 UTC
cvs commit: ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws WebServiceGeneratorImpl.java
dicka 2004/11/11 02:14:40
Modified: c/src/wsdl/org/apache/axis/wsdl/wsdl2ws
WebServiceGeneratorImpl.java
Log:
Pulling common generators up, to reduce code duplication
Submitted by: Adrian Dick
Revision Changes Path
1.3 +20 -44 ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WebServiceGeneratorImpl.java
Index: WebServiceGeneratorImpl.java
===================================================================
RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WebServiceGeneratorImpl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- WebServiceGeneratorImpl.java 29 Oct 2004 12:30:49 -0000 1.2
+++ WebServiceGeneratorImpl.java 11 Nov 2004 10:14:40 -0000 1.3
@@ -57,6 +57,7 @@
.SERVER
.equals(wscontext.getWrapInfo().getTargetEngine()))
{
+ // Generate Server objects
(new Generator(WrapperConstants.GENERATOR_WRAPPER_CPP,
wscontext))
.generate();
@@ -69,9 +70,6 @@
(new Generator(WrapperConstants.GENERATOR_SERVICE_HPP,
wscontext))
.generate();
- (new Generator(WrapperConstants.GENERATOR_PARAM_CPP_ALL,
- wscontext))
- .generate();
(new Generator(WrapperConstants.GENERATOR_CLASSLOADER_CPP,
wscontext))
.generate();
@@ -84,17 +82,10 @@
(new Generator(WrapperConstants.GENERATOR_UNDEPLOYMENT,
wscontext))
.generate();
- /*
- * Ensure the BuildScript generator is called last.
- * If called earlier not all files will be added
- * to the build script (Ex: to Makefile.am).
- */
- (new Generator(WrapperConstants.GENERATOR_BUILDSCRIPT,
- wscontext))
- .generate();
}
else
{
+ // Generate Client objects
(new Generator(WrapperConstants.GENERATOR_CLIENT_STUB_CPP,
wscontext))
.generate();
@@ -104,18 +95,11 @@
(new Generator(WrapperConstants.GENERATOR_CLIENT_EXCEPTION,
wscontext))
.generate();
- (new Generator(WrapperConstants.GENERATOR_PARAM_CPP_ALL,
- wscontext))
- .generate();
- /*
- * Ensure the BuildScript generator is called last.
- * If called earlier not all files will be added
- * to the build script (Ex: to Makefile.am).
- */
- (new Generator(WrapperConstants.GENERATOR_BUILDSCRIPT,
- wscontext))
- .generate();
}
+ // Generate objects common to Client and Server
+ (new Generator(WrapperConstants.GENERATOR_PARAM_CPP_ALL,
+ wscontext))
+ .generate();
}
else
{
@@ -126,6 +110,7 @@
.SERVER
.equals(wscontext.getWrapInfo().getTargetEngine()))
{
+ // Generate Server objects
(new Generator(WrapperConstants.GENERATOR_WRAPPER_C,
wscontext))
.generate();
@@ -135,9 +120,6 @@
(new Generator(WrapperConstants.GENERATOR_SERVICE_C,
wscontext))
.generate();
- (new Generator(WrapperConstants.GENERATOR_PARAM_C_ALL,
- wscontext))
- .generate();
(new Generator(WrapperConstants.GENERATOR_CLASSLOADER_C,
wscontext))
.generate();
@@ -147,41 +129,35 @@
(new Generator(WrapperConstants.GENERATOR_UNDEPLOYMENT,
wscontext))
.generate();
- /*
- * Ensure the BuildScript generator is called last.
- * If called earlier not all files will be added
- * to the build script (Ex: to Makefile.am).
- */
- (new Generator(WrapperConstants.GENERATOR_BUILDSCRIPT,
- wscontext))
- .generate();
}
else
{
+ // Generate Client Objects
(new Generator(WrapperConstants.GENERATOR_CLIENT_STUB_C,
wscontext))
.generate();
(new Generator(WrapperConstants.GENERATOR_CLIENT_STUB_H,
wscontext))
.generate();
- (new Generator(WrapperConstants.GENERATOR_PARAM_C_ALL,
- wscontext))
- .generate();
- /*
- * Ensure the BuildScript generator is called last.
- * If called earlier not all files will be added
- * to the build script (Ex: to Makefile.am).
- */
- (new Generator(WrapperConstants.GENERATOR_BUILDSCRIPT,
- wscontext))
- .generate();
+
}
+ // Generate objects common to Client and Server
+ (new Generator(WrapperConstants.GENERATOR_PARAM_C_ALL,
+ wscontext))
+ .generate();
}
else
{
throw new WrapperFault("Unsupported Language" + language);
}
}
+ /*
+ * Ensure the BuildScript generator is called last.
+ * If called earlier not all files will be added
+ * to the build script(Ex : to Makefile.am).
+ */
+ (new Generator(WrapperConstants.GENERATOR_BUILDSCRIPT, wscontext))
+ .generate();
}
}
}