summaryrefslogtreecommitdiffstats
path: root/samples/codegen/server/calculator
diff options
context:
space:
mode:
authorGravatar gmcdonald2010-02-13 01:32:03 +0000
committerGravatar gmcdonald2010-02-13 01:32:03 +0000
commit0425aadc78680e53000fd0108b540d6eca048516 (patch)
tree8ec7ab8e015d454c5ec586dfc91e05a2dce1cfc0 /samples/codegen/server/calculator
downloadaxis2c-0425aadc78680e53000fd0108b540d6eca048516.tar.gz
axis2c-0425aadc78680e53000fd0108b540d6eca048516.tar.bz2
Moving axis svn, part of TLP move INFRA-2441
git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@909681 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'samples/codegen/server/calculator')
-rw-r--r--samples/codegen/server/calculator/Makefile.am15
-rw-r--r--samples/codegen/server/calculator/axis2_skel_Calculator.c158
-rw-r--r--samples/codegen/server/calculator/readme12
3 files changed, 185 insertions, 0 deletions
diff --git a/samples/codegen/server/calculator/Makefile.am b/samples/codegen/server/calculator/Makefile.am
new file mode 100644
index 0000000..308673c
--- /dev/null
+++ b/samples/codegen/server/calculator/Makefile.am
@@ -0,0 +1,15 @@
+prglibdir=$(prefix)/services/Calculator
+samplesdir=$(prefix)/samples/server/Calculator
+prglib_LTLIBRARIES = libCalculator.la
+prglib_DATA= services.xml
+EXTRA_DIST = services.xml
+SUBDIRS =
+libCalculator_la_SOURCES = \
+axis2_add.c axis2_Calculator.c axis2_divResponse16.c axis2_mulResponse14.c axis2_subResponse12.c \
+axis2_addRequest.c axis2_Calculator_svc_skeleton.c axis2_divResponse.c axis2_mulResponse.c axis2_subResponse.c \
+axis2_addResponse20.c axis2_div.c axis2_mul.c axis2_sub.c \
+axis2_addResponse.c axis2_divRequest.c axis2_mulRequest.c axis2_subRequest.c
+libCalculator_la_LIBADD =
+INCLUDES = -I$(AXIS2C_HOME)/include \
+ @UTILINC@ \
+ @AXIOMINC@
diff --git a/samples/codegen/server/calculator/axis2_skel_Calculator.c b/samples/codegen/server/calculator/axis2_skel_Calculator.c
new file mode 100644
index 0000000..70d6da4
--- /dev/null
+++ b/samples/codegen/server/calculator/axis2_skel_Calculator.c
@@ -0,0 +1,158 @@
+
+
+ /**
+ * axis2_skel_Calculator.c
+ *
+ * This file was auto-generated from WSDL for "Calculator|http://localhost/axis/Calculator" service
+ * by the Apache Axis2/C version: #axisVersion# #today#
+ * axis2_skel_Calculator Axis2/C skeleton for the axisService
+ */
+
+ #include "axis2_skel_Calculator.h"
+
+
+
+
+ /**
+ * auto generated function definition signature
+ * for "div|http://localhost/axis/Calculator" operation.
+
+ * @param div
+ */
+
+ adb_divResponse_t* axis2_skel_Calculator_div (const axutil_env_t *env,
+ adb_div_t *_div1)
+ {
+
+
+ adb_divResponse_t *_divresponse2;
+ int int_2;
+
+ int int_0;
+ int int_1;
+
+ /* Extract the request */
+
+ int_0 = adb_div_get_in0(_div1, env);
+ printf("Returned int: %d\n", int_0);
+ int_1 = adb_div_get_in1(_div1, env);
+ printf("Returned int: %d\n", int_1);
+
+ /* Build the response adb */
+
+ _divresponse2 = adb_divResponse_create(env);
+ int_2 = int_0 / int_1;
+ adb_divResponse_set_divReturn(_divresponse2, env, int_2);
+
+ return _divresponse2;
+ }
+
+
+
+ /**
+ * auto generated function definition signature
+ * for "mul|http://localhost/axis/Calculator" operation.
+
+ * @param mul
+ */
+
+ adb_mulResponse_t* axis2_skel_Calculator_mul (const axutil_env_t *env,
+ adb_mul_t *_mul1)
+ {
+
+
+ adb_mulResponse_t *_mulresponse2;
+ int int_5;
+
+ int int_3;
+ int int_4;
+
+ /* Extract the request */
+
+ int_3 = adb_mul_get_in0(_mul1, env);
+ printf("Returned int: %d\n", int_3);
+ int_4 = adb_mul_get_in1(_mul1, env);
+ printf("Returned int: %d\n", int_4);
+
+ /* Build the response adb */
+
+ _mulresponse2 = adb_mulResponse_create(env);
+ int_5 = int_3 * int_4;
+ adb_mulResponse_set_mulReturn(_mulresponse2, env, int_5);
+
+ return _mulresponse2;
+ }
+
+
+
+ /**
+ * auto generated function definition signature
+ * for "add|http://localhost/axis/Calculator" operation.
+
+ * @param add
+ */
+
+ adb_addResponse_t* axis2_skel_Calculator_add (const axutil_env_t *env,
+ adb_add_t *_add1)
+ {
+
+
+ adb_addResponse_t *_addresponse2;
+ int int_8;
+
+ int int_6;
+ int int_7;
+
+ /* Extract the request */
+
+ int_6 = adb_add_get_in0(_add1, env);
+ printf("Returned int: %d\n", int_6);
+ int_7 = adb_add_get_in1(_add1, env);
+ printf("Returned int: %d\n", int_7);
+
+ /* Build the response adb */
+
+ _addresponse2 = adb_addResponse_create(env);
+ int_8 = int_6 + int_7;
+ adb_addResponse_set_addReturn(_addresponse2, env, int_8);
+
+ return _addresponse2;
+ }
+
+
+
+ /**
+ * auto generated function definition signature
+ * for "sub|http://localhost/axis/Calculator" operation.
+
+ * @param sub
+ */
+
+ adb_subResponse_t* axis2_skel_Calculator_sub (const axutil_env_t *env,
+ adb_sub_t *_sub1)
+ {
+
+
+ adb_subResponse_t *_subresponse2;
+ int int_11;
+
+ int int_9;
+ int int_10;
+
+ /* Extract the request */
+
+ int_9 = adb_sub_get_in0(_sub1, env);
+ printf("Returned int: %d\n", int_9);
+ int_10 = adb_sub_get_in1(_sub1, env);
+ printf("Returned int: %d\n", int_10);
+
+ /* Build the response adb */
+
+ _subresponse2 = adb_subResponse_create(env);
+ int_11 = int_9 - int_10;
+ adb_subResponse_set_subReturn(_subresponse2, env, int_11);
+
+ return _subresponse2;
+ }
+
+
diff --git a/samples/codegen/server/calculator/readme b/samples/codegen/server/calculator/readme
new file mode 100644
index 0000000..49b34bc
--- /dev/null
+++ b/samples/codegen/server/calculator/readme
@@ -0,0 +1,12 @@
+This sample demonstrates the use of code generation using Axis2/Java WSDL2Java
+tool (Axis2/Java source revision 414253).
+
+wsdl $AXIS2C_SRC_HOME/test/resources/wsdl/Calculator.wsdl
+
+Command to execute the code generation:
+
+WSDL2C.sh -uri Calculator.wsdl -u -d adb -ss
+WSDL2C.bat -uri Calculator.wsdl -u -d adb -ss
+
+Please check the instruction of $AXIS2C_SRC_HOME/c/tools/codegen/javatool/README.txt
+on how to use the script