From: Daniel KouĊ™il Date: Mon, 23 Jan 2006 13:14:39 +0000 (+0000) Subject: Improved examples to generate better WSDL which can be swallowed by Java utils X-Git-Tag: merge_for_3_1_dst~39 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=2a11335a6c67556a79b0a5f340429847b715756b;p=jra1mw.git Improved examples to generate better WSDL which can be swallowed by Java utils --- diff --git a/org.glite.security.gsoap-plugin/examples/calc.h.S b/org.glite.security.gsoap-plugin/examples/calc.h.S index 385e872..da6ea9f 100644 --- a/org.glite.security.gsoap-plugin/examples/calc.h.S +++ b/org.glite.security.gsoap-plugin/examples/calc.h.S @@ -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; } * ); diff --git a/org.glite.security.gsoap-plugin/examples/wscalc_clt_ex.c b/org.glite.security.gsoap-plugin/examples/wscalc_clt_ex.c index b96827d..b289716 100644 --- a/org.glite.security.gsoap-plugin/examples/wscalc_clt_ex.c +++ b/org.glite.security.gsoap-plugin/examples/wscalc_clt_ex.c @@ -1,7 +1,7 @@ #include #include "GSOAP_H.h" -#include "wscalc.nsmap" +#include "CalcService.nsmap" static const char *server = "http://localhost:9999/"; diff --git a/org.glite.security.gsoap-plugin/examples/wscalc_srv_ex.c b/org.glite.security.gsoap-plugin/examples/wscalc_srv_ex.c index 96d58f4..dc0011d 100644 --- a/org.glite.security.gsoap-plugin/examples/wscalc_srv_ex.c +++ b/org.glite.security.gsoap-plugin/examples/wscalc_srv_ex.c @@ -4,7 +4,7 @@ #include #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; } diff --git a/org.glite.security.gsoap-plugin/examples/wscalc_srv_ex2.c b/org.glite.security.gsoap-plugin/examples/wscalc_srv_ex2.c index 8a7c001..5753aba 100644 --- a/org.glite.security.gsoap-plugin/examples/wscalc_srv_ex2.c +++ b/org.glite.security.gsoap-plugin/examples/wscalc_srv_ex2.c @@ -4,7 +4,7 @@ #include #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; }