Improved examples to generate better WSDL which can be swallowed by Java utils
authorDaniel Kouřil <kouril@ics.muni.cz>
Mon, 23 Jan 2006 13:14:39 +0000 (13:14 +0000)
committerDaniel Kouřil <kouril@ics.muni.cz>
Mon, 23 Jan 2006 13:14:39 +0000 (13:14 +0000)
org.glite.security.gsoap-plugin/examples/calc.h.S
org.glite.security.gsoap-plugin/examples/wscalc_clt_ex.c
org.glite.security.gsoap-plugin/examples/wscalc_srv_ex.c
org.glite.security.gsoap-plugin/examples/wscalc_srv_ex2.c

index 385e872..da6ea9f 100644 (file)
@@ -1,13 +1,13 @@
-//gsoap egeesec schema namespace:   urn:calc
-//
-//gsoap egeesec service name:       calc
-//gsoap egeesec service port:       http://localhost:9999/
-//gsoap egeesec service namespace:  urn:calc:wscalc
+//gsoap wscalc service name:       CalcService
+//gsoap wscalc service type:       Calc
+//gsoap wscalc service port:       https://localhost:19999/
+//gsoap wscalc service namespace:  urn:calc:wscalc
+//gsoap wscalc service documentation: Calculator service
 
-//gsoap egeesec service method-style:       add rpc
-//gsoap egeesec service method-action:      add ""
-int wscalc__add(double a, double b, double *result);
+//gsoap wscalc service method-documentation: add Adds two numbers
+int wscalc__add(double a, double b, struct wscalc__addResponse {
+double result; } * );
 
-//gsoap egeesec service method-style:       sub rpc
-//gsoap egeesec service method-action:      sub ""
-int wscalc__sub(double a, double b, double *result);
+//gsoap wscalc service method-documentation: sub Subtracts two numbers
+int wscalc__sub(double a, double b, struct wscalc__subResponse {
+double result; } * );
index b96827d..b289716 100644 (file)
@@ -1,7 +1,7 @@
 #include <glite_gsplugin.h>
 
 #include "GSOAP_H.h"
-#include "wscalc.nsmap"
+#include "CalcService.nsmap"
 
 static const char *server = "http://localhost:9999/";
 
index 96d58f4..dc0011d 100644 (file)
@@ -4,7 +4,7 @@
 #include <glite_gsplugin.h>
 
 #include "GSOAP_H.h"
-#include "wscalc.nsmap"
+#include "CalcService.nsmap"
 
 
 static struct option long_options[] = {
@@ -59,7 +59,7 @@ main(int argc, char **argv)
                exit(1);
        }
 
-       if ( soap_bind(&soap, NULL, 9999, 100) < 0 ) {
+       if ( soap_bind(&soap, NULL, 19999, 100) < 0 ) {
                soap_print_fault(&soap, stderr);
                exit(1);
        }
@@ -89,14 +89,14 @@ main(int argc, char **argv)
        return 0;
 } 
 
-int wscalc__add(struct soap *soap, double a, double b, double *result)
+int wscalc__add(struct soap *soap, double a, double b, struct wscalc__addResponse *result)
 {
-       *result = a + b;
+       result->result = a + b;
        return SOAP_OK;
 } 
 
-int wscalc__sub(struct soap *soap, double a, double b, double *result)
+int wscalc__sub(struct soap *soap, double a, double b, struct wscalc__subResponse *result)
 {
-       *result = a - b;
+       result->result = a - b;
        return SOAP_OK;
 } 
index 8a7c001..5753aba 100644 (file)
@@ -4,7 +4,7 @@
 #include <glite_gsplugin.h>
 
 #include "GSOAP_H.h"
-#include "wscalc.nsmap"
+#include "CalcService.nsmap"
 
 
 static struct option long_options[] = {
@@ -117,14 +117,14 @@ main(int argc, char **argv)
        return 0;
 } 
 
-int wscalc__add(struct soap *soap, double a, double b, double *result)
+int wscalc__add(struct soap *soap, double a, double b, struct wscalc__addResponse *result)
 {
-       *result = a + b;
+       result->result = a + b;
        return SOAP_OK;
 } 
 
-int wscalc__sub(struct soap *soap, double a, double b, double *result)
+int wscalc__sub(struct soap *soap, double a, double b, struct wscalc__subResponse *result)
 {
-       *result = a - b;
+       result->result = a - b;
        return SOAP_OK;
 }