You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(7) |
Feb
|
Mar
|
Apr
(6) |
May
(14) |
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(7) |
Nov
(1) |
Dec
|
2009 |
Jan
(3) |
Feb
(2) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(5) |
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(9) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <cs...@us...> - 2008-05-08 23:30:18
|
Revision: 42 http://bespp.svn.sourceforge.net/bespp/?rev=42&view=rev Author: csmith Date: 2008-05-08 16:30:24 -0700 (Thu, 08 May 2008) Log Message: ----------- another try to deal with boolean Modified Paths: -------------- trunk/besclient/bes.h trunk/besclient/libbes.c Modified: trunk/besclient/bes.h =================================================================== --- trunk/besclient/bes.h 2008-05-08 23:26:44 UTC (rev 41) +++ trunk/besclient/bes.h 2008-05-08 23:30:24 UTC (rev 42) @@ -68,7 +68,8 @@ #define BES_GETSTATUS_STRING "Failed to get the status of activity" #define BES_BAD_ARG_STRING "Bad arguments for the function" -typedef enum bes_boolean {false, true} bes_boolean_t; +#define BES_FALSE 0 +#define BES_TRUE 1 int bes_init(struct bes_context **); int bes_security(struct bes_context *, char *, char *, char *, char *, char *); @@ -77,7 +78,7 @@ const char* bes_get_lasterror(struct bes_context *context); int createActivity(struct bes_context *, epr_t, char *, epr_t *); -bes_boolean_t terminateActivities(struct bes_context *, epr_t, epr_t); +int terminateActivities(struct bes_context *, epr_t, epr_t); int getActivityStatuses(struct bes_context *, epr_t, epr_t, struct bes_activity_status *); int getActivityDocuments(struct bes_context *, epr_t, epr_t, char **); int getFactoryAttributesDocument(struct bes_context *, epr_t, char **); Modified: trunk/besclient/libbes.c =================================================================== --- trunk/besclient/libbes.c 2008-05-08 23:26:44 UTC (rev 41) +++ trunk/besclient/libbes.c 2008-05-08 23:30:24 UTC (rev 42) @@ -304,7 +304,7 @@ return ret; } -bes_boolean_t +int terminateActivities(struct bes_context *context, epr_t endpointepr, epr_t activityepr) { struct soap *s; @@ -318,7 +318,7 @@ epr = (struct bes_epr *)activityepr; if (ret = generateAddressHeader(context, endpointepr, TERMINATE_ACT, &endpoint)) { - return false; + return BES_FALSE; } memset(&req, 0, sizeof(struct bes__TerminateActivitiesType)); @@ -327,15 +327,15 @@ req.__any = epr->dom; if (soap_call___bes__TerminateActivities(s, endpoint, TERMINATE_ACT, req, &rsp) != SOAP_OK) { setErrorString(context, s, BES_SOAP_ERR); - ret = false; + ret = BES_FALSE; } else { for (i = 0; i < rsp.__sizeResponse; i++) { if (rsp.Response[i].Cancelled == true_) { - ret = true; + ret = BES_TRUE; } else { - ret = false; + ret = BES_FALSE; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-05-08 23:26:50
|
Revision: 41 http://bespp.svn.sourceforge.net/bespp/?rev=41&view=rev Author: csmith Date: 2008-05-08 16:26:44 -0700 (Thu, 08 May 2008) Log Message: ----------- - changed the ignore prop Property Changed: ---------------- trunk/besclient/ Property changes on: trunk/besclient ___________________________________________________________________ Name: svn:ignore - .project .cproject .gdb_history .settings *.log soapClient.c soapC.c soapStub.h soapH.h bes-factory.h BESFactoryBinding.nsmap bes-factory.xsd bes-factory.wsdl besclient + .project .cproject .gdb_history .settings *.log soapClient.c soapC.c soapStub.h soapH.h bes-factory.h BESFactoryBinding.nsmap bes-factory.xsd bes-factory.wsdl besclient libbes.a This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-05-08 23:24:06
|
Revision: 40 http://bespp.svn.sourceforge.net/bespp/?rev=40&view=rev Author: csmith Date: 2008-05-08 16:24:12 -0700 (Thu, 08 May 2008) Log Message: ----------- - changed bool to bes_boolean_t to be more c++ friendly Modified Paths: -------------- trunk/besclient/bes.h trunk/besclient/libbes.c Modified: trunk/besclient/bes.h =================================================================== --- trunk/besclient/bes.h 2008-05-07 22:02:47 UTC (rev 39) +++ trunk/besclient/bes.h 2008-05-08 23:24:12 UTC (rev 40) @@ -68,7 +68,7 @@ #define BES_GETSTATUS_STRING "Failed to get the status of activity" #define BES_BAD_ARG_STRING "Bad arguments for the function" -typedef enum bool {false, true} bool; +typedef enum bes_boolean {false, true} bes_boolean_t; int bes_init(struct bes_context **); int bes_security(struct bes_context *, char *, char *, char *, char *, char *); @@ -77,7 +77,7 @@ const char* bes_get_lasterror(struct bes_context *context); int createActivity(struct bes_context *, epr_t, char *, epr_t *); -bool terminateActivities(struct bes_context *, epr_t, epr_t); +bes_boolean_t terminateActivities(struct bes_context *, epr_t, epr_t); int getActivityStatuses(struct bes_context *, epr_t, epr_t, struct bes_activity_status *); int getActivityDocuments(struct bes_context *, epr_t, epr_t, char **); int getFactoryAttributesDocument(struct bes_context *, epr_t, char **); Modified: trunk/besclient/libbes.c =================================================================== --- trunk/besclient/libbes.c 2008-05-07 22:02:47 UTC (rev 39) +++ trunk/besclient/libbes.c 2008-05-08 23:24:12 UTC (rev 40) @@ -304,7 +304,7 @@ return ret; } -bool +bes_boolean_t terminateActivities(struct bes_context *context, epr_t endpointepr, epr_t activityepr) { struct soap *s; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-05-07 22:02:43
|
Revision: 39 http://bespp.svn.sourceforge.net/bespp/?rev=39&view=rev Author: csmith Date: 2008-05-07 15:02:47 -0700 (Wed, 07 May 2008) Log Message: ----------- - factored the gSOAP specific code into a BES client library Modified Paths: -------------- trunk/besclient/Makefile trunk/besclient/besclient.c Added Paths: ----------- trunk/besclient/bes.h trunk/besclient/libbes.c Modified: trunk/besclient/Makefile =================================================================== --- trunk/besclient/Makefile 2008-05-07 22:01:32 UTC (rev 38) +++ trunk/besclient/Makefile 2008-05-07 22:02:47 UTC (rev 39) @@ -12,8 +12,8 @@ CC = gcc CFLAGS = -g $(GSOAP_DEF) -I. $(GSOAP_INC) $(EXTRA_INC) -LDFLAGS = -g $(EXTRA_LIB) -LIBS = -lssl -lcrypto $(EXTRA_LIBS) +LDFLAGS = -g -L. $(EXTRA_LIB) +LIBS = -lbes -lssl -lcrypto $(EXTRA_LIBS) BES_WSDL = bes-factory.wsdl BES_HEADER = bes-factory.h @@ -26,12 +26,16 @@ SERVER_OBJ = soapServer.o soapC.o $(GSOAP_OBJ) CLIENT_OBJ = soapClient.o soapC.o $(GSOAP_OBJ) -all: besclient +all: libbes.a besclient -besclient: besclient.o $(CLIENT_OBJ) - $(CC) $(LDFLAGS) -o besclient besclient.o $(CLIENT_OBJ) $(LIBS) +besclient: besclient.o libbes.a + $(CC) $(LDFLAGS) -o besclient besclient.o $(LIBS) -besclient.o: besclient.c $(SOAP_NS) +libbes.a: libbes.o $(CLIENT_OBJ) + ar -rsv libbes.a libbes.o $(CLIENT_OBJ) + +besclient.o: besclient.c bes.h +libbes.o: libbes.c bes.h $(SOAP_NS) soapServer.o: soapServer.c soapClient.o: soapClient.c soapC.o: soapC.c @@ -63,7 +67,7 @@ rm -f $(SOAP_C_FILES) rm -f *.nsmap rm -f *.res.xml *.req.xml - rm -f lsfbes besclient *.o *~ + rm -f besclient libbes.a *.o *~ rm -f $(BES_HEADER) rm -f *.log rm -f *.wsdl *.xsd Added: trunk/besclient/bes.h =================================================================== --- trunk/besclient/bes.h (rev 0) +++ trunk/besclient/bes.h 2008-05-07 22:02:47 UTC (rev 39) @@ -0,0 +1,89 @@ +/* ---------------------------------------------------------------- + * bes.h + * + * Header file of BES++ client library + * + * Copyright (C) 2006-2008, Platform Computing Corporation. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#ifndef _BES_H +#define _BES_H + +#define MAX_ERRSTR_LEN 256 + +struct bes_context { + struct soap *soap; + + char *x509cert; + char *x509pass; + char *capath; + char *user; + char *pass; + + char error_string[MAX_ERRSTR_LEN]; +}; + +enum activity_state { + BES_Pending = 0, + BES_Running = 1, + BES_Cancelled = 2, + BES_Failed = 3, + BES_Finished = 4, + BES_State_Num, +}; + +struct bes_activity_status { + enum activity_state state; + char *substate; +}; + +typedef void* epr_t; + +/* Error code */ +#define BES_OK 0 +#define BES_SOAP_ERR 1 +#define BES_SYS_ERR 2 +#define BES_ENDPOINT_ERR 3 +#define BES_MEM_ALLOC 4 +#define BES_GETSTATUS_ERR 5 +#define BES_BAD_ARG 6 + +/*Error strings*/ +#define BES_ENDPOINT_STRING "The endpoint.xml does not contain a valid EPR" +#define BES_MEM_STRRING "Memory allocation error" +#define BES_GETSTATUS_STRING "Failed to get the status of activity" +#define BES_BAD_ARG_STRING "Bad arguments for the function" + +typedef enum bool {false, true} bool; + +int bes_init(struct bes_context **); +int bes_security(struct bes_context *, char *, char *, char *, char *, char *); +int bes_add_usertoken(struct bes_context *context, char *user, char *pass); +int bes_finalize(struct bes_context **); +const char* bes_get_lasterror(struct bes_context *context); + +int createActivity(struct bes_context *, epr_t, char *, epr_t *); +bool terminateActivities(struct bes_context *, epr_t, epr_t); +int getActivityStatuses(struct bes_context *, epr_t, epr_t, struct bes_activity_status *); +int getActivityDocuments(struct bes_context *, epr_t, epr_t, char **); +int getFactoryAttributesDocument(struct bes_context *, epr_t, char **); +void freeEPR(epr_t *epr); +int writeEPRToFile(struct bes_context *, epr_t, char *); +int readEPRFromFile(struct bes_context *, char *, epr_t *); + +#endif /* _BES_H */ + Modified: trunk/besclient/besclient.c =================================================================== --- trunk/besclient/besclient.c 2008-05-07 22:01:32 UTC (rev 38) +++ trunk/besclient/besclient.c 2008-05-07 22:02:47 UTC (rev 39) @@ -3,7 +3,7 @@ * * Client implementation of the OGSA Basic Execution Services * - * Copyright (C) 2006-2007, Platform Computing Corporation. All Rights Reserved. + * Copyright (C) 2006-2008, Platform Computing Corporation. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,49 +22,14 @@ */ #include "../config.h" +#include <stdlib.h> #include <stdio.h> #include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> +#include <unistd.h> -#include "wsseapi.h" -#include "BESFactoryBinding.nsmap" +#include "bes.h" -#define CREATE_ACT "http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/CreateActivity" -#define STATUS_ACT "http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetActivityStatuses" -#define TERMINATE_ACT "http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/TerminateActivities" -#define ACTIVITIES_ACT "http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetActivityDocuments" -#define FACTORY_ACT "http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetFactoryAttributesDocument" -#define WSA_NS "http://www.w3.org/2005/08/addressing" -#define BES_NS "http://schemas.ggf.org/bes/2006/08/bes-factory" - -#define NL "\n" - -struct Namespace default_namespaces[] = -{ - {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope", NULL}, - {"wsse", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", NULL, NULL}, - {"wsa", "http://www.w3.org/2005/08/addressing", NULL, NULL}, - {"bes", "http://schemas.ggf.org/bes/2006/08/bes-factory", NULL, NULL}, - {"jsdl", "http://schemas.ggf.org/jsdl/2005/11/jsdl", NULL, NULL}, - {"app", "http://schemas.ggf.org/jsdl/2006/07/jsdl-hpcpa", NULL, NULL}, - {NULL, NULL, NULL, NULL} -}; - -struct Namespace epr_namespaces[] = { - {"wsa", WSA_NS, NULL, NULL }, - {"bes", BES_NS, NULL, NULL }, - {"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL}, - {NULL, NULL, NULL, NULL} -}; - -int isElement(struct soap_dom_element *, char *, char *); -int isAttribute(struct soap_dom_attribute *, char *, char *); -int generateAddressingHeaders(struct soap*, char *, char *, char **); -void printDom(struct soap*, struct soap_dom_element*, int); -void cleanDom(struct soap*, struct soap_dom_element*); char *readPassword(char *); void zeroPassword(char *); void usage(); @@ -78,14 +43,16 @@ exit(1); } +char *bes_activity_state[BES_State_Num] = {"Pending", "Running", "Cancelled", "Failed", "Finished"}; + int main(int argc, char *argv[]) { - struct soap soap; - char *endpoint, *command, *user, *pass, *status; + struct bes_context *ctx; + char *endpoint, *command, *user, *pass; char *capath, *x509cert, *x509pass; - int poll_interval; - int ch; + int ch, ret_code = 0; + epr_t endpointepr = NULL, activityepr = NULL; endpoint = "endpoint.xml"; capath = "./certs"; @@ -138,76 +105,174 @@ command = argv[0]; - soap_ssl_init(); - soap_init(&soap); - soap_set_mode(&soap, SOAP_C_UTFSTRING); - soap_register_plugin(&soap, soap_wsse); - soap_set_namespaces(&soap, default_namespaces); - soap_header(&soap); + if (bes_init(&ctx)) { + ret_code = 1; + goto end; + } if (user) { - if (pass == NULL ) { - pass = readPassword("WS-Security password:"); - } + if (pass == NULL ) { + pass = readPassword("WS-Security password:"); + } } else { - if (x509pass == NULL) { - x509pass = readPassword("Key passphrase:"); - } + if (x509pass == NULL) { + x509pass = readPassword("Key passphrase:"); + } } - - if (soap_ssl_client_context(&soap, SOAP_SSL_DEFAULT|SOAP_SSL_SKIP_HOST_CHECK, - x509cert, x509pass, NULL, capath, NULL)) { - soap_print_fault(&soap, stderr); - exit(1); + + if (bes_security(ctx, x509cert, x509pass, capath, user, pass)) { + fprintf(stderr, "%s\n", bes_get_lasterror(ctx)); + ret_code = 1; + goto end; } - if (user) { - if (soap_wsse_add_UsernameTokenText(&soap, NULL, user, pass)) { - soap_print_fault(&soap, stderr); - exit(1); - } + if (readEPRFromFile(ctx, endpoint, &endpointepr)) { + fprintf(stderr, "%s\n", bes_get_lasterror(ctx)); + ret_code = 1; + goto end; } + if (!strcmp(command, "status") + || !strcmp(command, "terminate") + || !strcmp(command, "activity") + || !strcmp(command, "poll")) { + if (readEPRFromFile(ctx, argv[1], &activityepr)) { + fprintf(stderr, "%s\n", bes_get_lasterror(ctx)); + ret_code = 1; + goto end; + } + } + if (!strcmp(command, "create")) { - createActivity(&soap, endpoint, argv[1], argv[2]); + epr_t new_activityepr; + + if (createActivity(ctx, endpointepr, argv[1], &new_activityepr)) { + fprintf(stderr, "%s\n", bes_get_lasterror(ctx)); + ret_code = 1; + } + else { + printf("Successfully submitted activity. Wrote EPR to %s\n", argv[2]); + if (writeEPRToFile(ctx, new_activityepr, argv[2])) { + fprintf(stderr, "%s\n", bes_get_lasterror(ctx)); + ret_code = 1; + } + + freeEPR(&new_activityepr); + } } else if (!strcmp(command, "status")) { - getActivityStatuses(&soap, endpoint, argv[1]); + struct bes_activity_status status; + + if (getActivityStatuses(ctx, endpointepr, activityepr, &status)) { + fprintf(stderr, "%s\n", bes_get_lasterror(ctx)); + ret_code = 1; + } + else { + printf("The state of the activity is: %s\n", bes_activity_state[status.state]); + if (status.substate) { + printf("The substate is %s\n", status.substate); + free(status.substate); + } + } + } else if (!strcmp(command, "terminate")) { - terminateActivities(&soap, endpoint, argv[1]); + if (terminateActivities(ctx, endpointepr, activityepr)) { + printf("The activity was canceled\n"); + } + else { + printf("The activity was not canceled\n"); + fprintf(stderr, "%s\n", bes_get_lasterror(ctx)); + ret_code = 1; + } } else if (!strcmp(command, "activity")) { - getActivityDocuments(&soap, endpoint, argv[1]); + char *strDoc; + + if (getActivityDocuments(ctx, endpointepr, activityepr, &strDoc)) { + fprintf(stderr, "%s\n", bes_get_lasterror(ctx)); + ret_code = 1; + } + else { + printf("Got result from server:\n"); + printf("%s\n", strDoc); + free(strDoc); + } } else if (!strcmp(command, "factory")) { - getFactoryAttributesDocument(&soap, endpoint); + char *strDoc; + + if (getFactoryAttributesDocument(ctx, endpointepr, &strDoc)) { + fprintf(stderr, "%s\n", bes_get_lasterror(ctx)); + ret_code = 1; + } + else { + printf("Got result from server:\n"); + printf("%s\n", strDoc); + free(strDoc); + } } else if (!strcmp(command, "poll")) { - poll_interval = atoi(argv[6]); - while (!pollActivityStatuses(&soap, endpoint, argv[1], &status)) { - sleep(poll_interval); - printf("."); - fflush(stdout); - if (user) { - if (soap_wsse_add_UsernameTokenText(&soap, NULL, user, pass)) { - soap_print_fault(&soap, stderr); - exit(1); - } + struct bes_activity_status status; + int poll_interval, ret = 0; + + if (argc != 3) { + fprintf(stderr, "Wrong arguments for poll command.\n", command); + goto end; + } + + poll_interval = atoi(argv[2]); + while (!(ret = getActivityStatuses(ctx, endpointepr, activityepr, &status))) { + if ((status.state == BES_Cancelled) + || (status.state == BES_Failed) + || (status.state == BES_Finished)) { + break; + } + else { + printf("."); + fflush(stdout); + sleep(poll_interval); + + if (user) { + if (bes_add_usertoken(ctx, user, pass)) { + fprintf(stderr, "%s\n", bes_get_lasterror(ctx)); + ret_code = 1; + break; } + } } - printf("Activity has finished. Final status is: %s\n", status); + } + + if (ret) { + fprintf(stderr, "%s\n", bes_get_lasterror(ctx)); + ret_code = 1; + } + else { + printf("Activity has finished. Final status is: %s\n", bes_activity_state[status.state]); + if (status.substate) { + printf("The substate is %s\n", status.substate); + free(status.substate); + } + } } else { fprintf(stderr, "Command %s is unknown.\n", command); exit(1); } + + if (endpointepr) { + freeEPR(&endpointepr); + } + + if (activityepr) { + freeEPR(&activityepr); + } + +end: + bes_finalize(&ctx); - soap_end(&soap); - soap_done(&soap); - - return 0; + return ret_code; } void @@ -247,676 +312,3 @@ return password; } - -int -createActivity(struct soap *s, char *eprfile, char *jsdlfile, char *activityepr) -{ - struct bes__CreateActivityType req; - struct bes__CreateActivityResponseType rsp; - struct soap_dom_element dom, *iter; - struct soap_dom_attribute *attr; - int jsdl, epr; - char *endpoint; - - if (generateAddressingHeaders(s, eprfile, CREATE_ACT, &endpoint)) { - exit(1); - } - - jsdl = open(jsdlfile, O_RDONLY, 0); - if (jsdl == -1) { - perror("Cannot open JSDL file."); - exit(1); - } - dom.soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); - dom.soap->recvfd = jsdl; - if (soap_begin_recv(dom.soap) - || soap_in_xsd__anyType(dom.soap, NULL, &dom, NULL) == NULL - || soap_end_recv(dom.soap)) { - soap_print_fault(dom.soap, stderr); - exit(1); - } - close(jsdl); - - memset(&req, 0, sizeof(struct bes__CreateActivityType)); - memset(&rsp, 0, sizeof(struct bes__CreateActivityResponseType)); - - req.bes__ActivityDocument.__any = &dom; - - if (soap_call___bes__CreateActivity(s, endpoint, CREATE_ACT, &req, &rsp) != SOAP_OK) { - soap_print_fault(s, stderr); - exit(1); - } - else { - cleanDom(s, rsp.__any); - epr = open(activityepr, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); - if (epr == -1) { - perror("createActivity: open eprfile"); - exit(1); - } - soap_set_namespaces(s, epr_namespaces); - s->sendfd = epr; - if (soap_begin_send(s) - || soap_out_xsd__anyType(s, NULL, 0, rsp.__any, NULL) - || soap_end_send(s)) { - soap_print_fault(s, stderr); - soap_set_namespaces(s, default_namespaces); - exit(1); - } - write(epr, (void*)NL, strlen(NL)); - close(epr); - soap_set_namespaces(s, default_namespaces); - printf("Successfully submitted activity. Wrote EPR to %s\n.", activityepr); - } - - soap_end(dom.soap); - soap_done(dom.soap); - free(dom.soap); - - return 0; -} - -int -terminateActivities(struct soap *s, char *eprfile, char *activityepr) -{ - struct bes__TerminateActivitiesType req; - struct bes__TerminateActivitiesResponseType rsp; - struct soap_dom_element dom; - int epr, i; - char *endpoint; - - if (generateAddressingHeaders(s, eprfile, TERMINATE_ACT, &endpoint)) { - exit(1); - } - - epr = open(activityepr, O_RDONLY, 0); - if (epr == -1) { - perror("terminateActivities: open eprfile"); - exit(1); - } - - dom.soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); - dom.soap->recvfd = epr; - if (soap_begin_recv(dom.soap) - || soap_in_xsd__anyType(dom.soap, NULL, &dom, NULL) == NULL - || soap_end_recv(dom.soap)) { - soap_print_fault(dom.soap, stderr); - exit(1); - } - close(epr); - - memset(&req, 0, sizeof(struct bes__TerminateActivitiesType)); - memset(&rsp, 0, sizeof(struct bes__TerminateActivitiesResponseType)); - - req.__any = &dom; - if (soap_call___bes__TerminateActivities(s, endpoint, TERMINATE_ACT, req, &rsp) != SOAP_OK) { - soap_print_fault(s, stdout); - } - else { - for (i = 0; i < rsp.__sizeResponse; i++) { - printf("The activity was "); - if (rsp.Response[i].Cancelled == true_) { - printf("cancelled.\n"); - } - else { - printf("not cancelled.\n"); - } - } - } - - soap_end(dom.soap); - soap_done(dom.soap); - free(dom.soap); - - return 0; -} - -int -getActivityStatuses(struct soap *s, char *eprfile, char *activityepr) -{ - struct bes__GetActivityStatusesType req; - struct bes__GetActivityStatusesResponseType rsp; - struct soap_dom_element *dom; - int epr, i; - char *endpoint; - - if (generateAddressingHeaders(s, eprfile, STATUS_ACT, &endpoint)) { - exit(1); - } - - epr = open(activityepr, O_RDONLY, 0); - if (epr == -1) { - perror("getActivityStatuses: open eprfile"); - exit(1); - } - - dom = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element)); - if (dom == NULL) { - soap_print_fault(s, stderr); - exit(1); - } - memset(dom, 0, sizeof(struct soap_dom_element)); - - dom->soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); - dom->soap->recvfd = epr; - if (soap_begin_recv(dom->soap) - || soap_in_xsd__anyType(dom->soap, NULL, dom, NULL) == NULL - || soap_end_recv(dom->soap)) { - soap_print_fault(dom->soap, stderr); - exit(1); - } - close(epr); - - memset(&req, 0, sizeof(struct bes__GetActivityStatusesType)); - memset(&rsp, 0, sizeof(struct bes__GetActivityStatusesResponseType)); - - req.__any = dom; - if (soap_call___bes__GetActivityStatuses(s, endpoint, STATUS_ACT, req, &rsp) != SOAP_OK) { - soap_print_fault(s, stdout); - } - else { - fprintf(stdout, "Got result from server\n"); - printDom(s, rsp.__any, 0); - } - - soap_end(dom->soap); - soap_done(dom->soap); - free(dom->soap); - - return 0; -} - -int -pollActivityStatuses(struct soap *s, char *eprfile, char *activityepr, char**status) -{ - struct bes__GetActivityStatusesType req; - struct bes__GetActivityStatusesResponseType rsp; - struct soap_dom_element *dom; - int epr, i; - char *endpoint; - static int terminated=0; - static int fault=0; - static int activityPresent=0; - - if (generateAddressingHeaders(s, eprfile, STATUS_ACT, &endpoint)) { - exit(1); - } - - epr = open(activityepr, O_RDONLY, 0); - if (epr == -1) { - perror("pollActivityStatuses: open eprfile"); - exit(1); - } - - dom = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element)); - if (dom == NULL) { - soap_print_fault(s, stderr); - exit(1); - } - memset(dom, 0, sizeof(struct soap_dom_element)); - - dom->soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); - dom->soap->recvfd = epr; - if (soap_begin_recv(dom->soap) - || soap_in_xsd__anyType(dom->soap, NULL, dom, NULL) == NULL - || soap_end_recv(dom->soap)) { - soap_print_fault(dom->soap, stderr); - exit(1); - } - close(epr); - - memset(&req, 0, sizeof(struct bes__GetActivityStatusesType)); - memset(&rsp, 0, sizeof(struct bes__GetActivityStatusesResponseType)); - - req.__any = dom; - if (soap_call___bes__GetActivityStatuses(s, endpoint, STATUS_ACT, req, &rsp) != SOAP_OK) { - terminated=1; - *status="Error in the SOAP call"; - } - else { - if((rsp.__any!=NULL)&&(!strcmp(rsp.__any->name,"Response"))) { - struct soap_dom_element*element=rsp.__any->elts; - while(element!=NULL){ - if(!strcmp(element->name,"ActivityStatus")) { - activityPresent=1; - if((element->elts!=NULL)&&(!strcmp(element->elts->name,"Finished"))) { - terminated=1; - *status="Finished"; - } - if((element->elts!=NULL)&&(!strcmp(element->elts->name,"Cancelled"))) { - terminated=1; - *status="Cancelled"; - } - if((element->elts!=NULL)&&(!strcmp(element->elts->name,"Failed"))) { - terminated=1; - *status="Failed"; - } - if(element->atts!=NULL){ - struct soap_dom_attribute *attributes=element->atts; - while (attributes!=NULL) { - if((attributes->name!=NULL)&&(!strcmp(attributes->name,"state"))){ - if((attributes->data!=NULL)&&(!strcmp(attributes->data,"Finished"))) { - terminated=1; - *status="Finished"; - } - if((attributes->data!=NULL)&&(!strcmp(attributes->data,"Cancelled"))) { - terminated=1; - *status="Cancelled"; - } - if((attributes->data!=NULL)&&(!strcmp(attributes->data,"Failed"))) { - terminated=1; - *status="Failed"; - } - break; - } - attributes=attributes->next; - } - } - break; - } - else if(!strcmp(element->name,"UnknownActivityIdentifierFault")){ - terminated=1; - fault=1; - *status="UnknownActivityIdentifierFault"; - break; - } - else - element=element->next; - } - - } - } - if(fault&&activityPresent) - *status="UnknownActivityIdentifierFault but identifier was seen in the system before."; - - soap_end(dom->soap); - soap_done(dom->soap); - free(dom->soap); - - return terminated; -} - - -int -getActivityDocuments(struct soap *s, char *eprfile, char *activityepr) -{ - struct bes__GetActivityDocumentsType req; - struct bes__GetActivityDocumentsResponseType rsp; - struct soap_dom_element *dom; - int epr, i; - char *endpoint; - - if (generateAddressingHeaders(s, eprfile, ACTIVITIES_ACT, &endpoint)) { - exit(1); - } - - epr = open(activityepr, O_RDONLY, 0); - if (epr == -1) { - perror("getActivityDocuments: open eprfile"); - exit(1); - } - - dom = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element)); - if (dom == NULL) { - soap_print_fault(s, stderr); - exit(1); - } - memset(dom, 0, sizeof(struct soap_dom_element)); - - dom->soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); - dom->soap->recvfd = epr; - if (soap_begin_recv(dom->soap) - || soap_in_xsd__anyType(dom->soap, NULL, dom, NULL) == NULL - || soap_end_recv(dom->soap)) { - soap_print_fault(dom->soap, stderr); - exit(1); - } - close(epr); - - memset(&req, 0, sizeof(struct bes__GetActivityDocumentsType)); - memset(&rsp, 0, sizeof(struct bes__GetActivityDocumentsResponseType)); - - req.__any = dom; - if (soap_call___bes__GetActivityDocuments(s, endpoint, ACTIVITIES_ACT, req, &rsp) != SOAP_OK) { - soap_print_fault(s, stderr); - } - else { - fprintf(stdout, "Got result from server\n"); - printDom(s, rsp.__any, 0); - } - - soap_end(dom->soap); - soap_done(dom->soap); - free(dom->soap); - - return 0; -} - -int -getFactoryAttributesDocument(struct soap *s, char *eprfile) -{ - struct bes__GetFactoryAttributesDocumentType req; - struct bes__GetFactoryAttributesDocumentResponseType rsp; - char *endpoint; - - if (generateAddressingHeaders(s, eprfile, FACTORY_ACT, &endpoint)) { - exit(1); - } - - memset(&req, 0, sizeof(struct bes__GetFactoryAttributesDocumentType)); - memset(&rsp, 0, sizeof(struct bes__GetFactoryAttributesDocumentResponseType)); - - if (soap_call___bes__GetFactoryAttributesDocument(s, endpoint, FACTORY_ACT, &req, &rsp) != SOAP_OK) { - soap_print_fault(s, stderr); - } - else { - fprintf(stdout, "Got result from server\n"); - printDom(s, rsp.__any, 0); - } - - return 0; -} - -void -printDom(struct soap *s, struct soap_dom_element *node, int depth) -{ - struct soap_dom_attribute *attr; - int i; - - if (node == NULL) { - return; - } - - for (i = 0; i < depth; i++) - fprintf(stdout, " "); - fprintf(stdout, "<%s", node->name); - attr = node->atts; - while (attr) { - fprintf(stdout, " %s=\"%s\"", attr->name, attr->data); - attr = attr->next; - } - fprintf(stdout, ">\n"); - - if (node->data && strlen(node->data)) { - for (i = 0; i < depth; i++) - fprintf(stdout, " "); - fprintf(stdout, "%s\n", node->data); - } - - if (node->elts) - printDom(s, node->elts, depth+1); - - for (i = 0; i < depth; i++) - fprintf(stdout, " "); - fprintf(stdout, "</%s>\n", node->name); - - if (node->next) - printDom(s, node->next, depth); - -} - -void -cleanDom(struct soap *s, struct soap_dom_element *node) -{ - struct soap_dom_attribute *attr; - char *cp; - - if (node == NULL) { - return; - } - cp = strchr(node->name, ':'); - if (cp) { - cp++; - node->name = cp; - } - if (node->nstr && strlen(node->nstr) == 0) - node->nstr = NULL; - attr = node->atts; - while (attr) { - cp = strchr(attr->name, ':'); - if (cp) { - cp++; - attr->name = cp; - } - if (attr->nstr && strlen(attr->nstr) == 0) - attr->nstr = NULL; - attr = attr->next; - } - if (node->elts) - cleanDom(s, node->elts); - if (node->next) - cleanDom(s, node->next); -} - -int -generateAddressingHeaders(struct soap *s, - char *eprfile, - char *action, - char **endpoint_ret) -{ - struct soap_dom_element *dom, *iter; - struct soap_dom_element *refparams, *refparam; - struct soap_dom_attribute *isrefparam; - char *endpoint; - int epr, i, numrefparams; - - epr = open(eprfile, O_RDONLY, 0); - if (epr == -1) { - perror("getActivityDocuments: open eprfile"); - exit(1); - } - - dom = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element)); - if (dom == NULL) { - soap_print_fault(s, stderr); - return -1; - } - memset(dom, 0, sizeof(struct soap_dom_element)); - - soap_set_namespaces(s, epr_namespaces); - - dom->soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); - dom->soap->recvfd = epr; - if (soap_begin_recv(dom->soap) - || soap_in_xsd__anyType(dom->soap, NULL, dom, NULL) == NULL - || soap_end_recv(dom->soap)) { - soap_print_fault(dom->soap, stderr); - soap_end(dom->soap); - soap_done(dom->soap); - free(dom->soap); - soap_set_namespaces(s, namespaces); - return -1; - } - close(epr); - - soap_set_namespaces(s, namespaces); - - iter = dom->elts; - if (!iter || !isElement(iter, WSA_NS, "Address")) { - fprintf(stderr, "%s does not contain a valid EPR.", eprfile); - soap_end(dom->soap); - soap_done(dom->soap); - free(dom->soap); - return -1; - } - endpoint = soap_strdup(s, iter->data); - if (endpoint == NULL) { - soap_print_fault(s, stderr); - soap_end(dom->soap); - soap_done(dom->soap); - free(dom->soap); - return -1; - } - s->header->wsa__To.__item = endpoint; - if (endpoint_ret) *endpoint_ret = endpoint; - - s->header->wsa__Action.__item = soap_strdup(s, action); - if (s->header->wsa__Action.__item == NULL) { - soap_print_fault(s, stderr); - soap_end(dom->soap); - soap_done(dom->soap); - free(dom->soap); - return -1; - } - - iter = iter->next; - while (iter) { - if (isElement(iter, WSA_NS, "ReferenceParameters")) { - isrefparam = (struct soap_dom_attribute*)soap_malloc(s, sizeof(struct soap_dom_attribute)); - if (isrefparam == NULL) { - soap_print_fault(s, stderr); - soap_end(dom->soap); - soap_done(dom->soap); - free(dom->soap); - return -1; - } - memset(isrefparam, 0, sizeof(struct soap_dom_attribute)); - isrefparam->soap = s; - isrefparam->nstr = WSA_NS; - isrefparam->name = soap_strdup(s, "wsa:IsReferenceParameter"); - isrefparam->data = soap_strdup(s, "true"); - if (!isrefparam->name || !isrefparam->data) { - soap_print_fault(s, stderr); - soap_end(dom->soap); - soap_done(dom->soap); - free(dom->soap); - return -1; - } - - refparam = iter->elts; - numrefparams = 0; - while (refparam) { - if (refparam->atts) { - struct soap_dom_attribute *last, *attr = refparam->atts; - while (attr) { - if (isAttribute(attr, WSA_NS, "IsReferenceParameter")) { - attr->nstr = isrefparam->nstr; - attr->name = isrefparam->name; - attr->data = isrefparam->data; - break; - } - last = attr; - attr = attr->next; - } - if (!attr) { - last->next = isrefparam; - } - } - else { - refparam->atts = isrefparam; - } - refparam = refparam->next; - numrefparams++; - } - - refparams = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element)*numrefparams); - if (refparams == NULL) { - soap_print_fault(s, stderr); - soap_end(dom->soap); - soap_done(dom->soap); - free(dom->soap); - return -1; - } - memset(refparams, 0, sizeof(struct soap_dom_element)*numrefparams); - refparam = iter->elts; - for (i = 0; i < numrefparams; i++) { - refparams[i].nstr = refparam->nstr; - refparams[i].name = refparam->name; - refparams[i].data = refparam->data; - refparams[i].atts = refparam->atts; - refparams[i].soap = refparam->soap; - refparams[i].elts = refparam->elts; - refparam = refparam->next; - } - - s->header->__size = numrefparams; - s->header->__any = refparams; - } - - iter = iter->next; - } - - soap_end(dom->soap); - soap_done(dom->soap); - free(dom->soap); - - return 0; -} - -int -isElement(struct soap_dom_element *dom, char *ns, char *elt) -{ - char *cp; - - if (!dom || !ns || !elt) { - return 0; - } - if (strcmp(dom->nstr, ns)) { - return 0; - } - cp = strchr(dom->name, ':'); - if (cp) { - cp++; - } - else { - cp = dom->name; - } - if (strcmp(cp, elt)) { - return 0; - } - - return 1; -} - -int -isAttribute(struct soap_dom_attribute *attr, char *ns, char *elt) -{ - char *cp; - - if (!attr || !ns || !elt) { - return 0; - } - if (strcmp(attr->nstr, ns)) { - return 0; - } - cp = strchr(attr->name, ':'); - if (cp) { - cp++; - } - else { - cp = attr->name; - } - if (strcmp(cp, elt)) { - return 0; - } - - return 1; -} - -/* - * Don't know why these aren't being generated, but .... - */ -struct soap_dom_element * -soap_in__bes__CreateActivityFaultMessage(struct soap *s, - const char *tag, - struct soap_dom_element *node, - const char *type) -{ - return soap_in_xsd__anyType(s, tag, node, type); -} - -int -soap_out__bes__CreateActivityFaultMessage(struct soap *s, - const char *tag, - int id, - const struct soap_dom_element *node, - const char *type) -{ - return soap_out_xsd__anyType(s, tag, id, node, type); -} - -void -soap_serialize__bes__CreateActivityFaultMessage(struct soap *s, - const struct soap_dom_element *node) -{ - soap_serialize_xsd__anyType(s, node); -} Added: trunk/besclient/libbes.c =================================================================== --- trunk/besclient/libbes.c (rev 0) +++ trunk/besclient/libbes.c 2008-05-07 22:02:47 UTC (rev 39) @@ -0,0 +1,1236 @@ +/* ---------------------------------------------------------------- + * libbes.c + * + * Client library of the OGSA Basic Execution Services + * + * Copyright (C) 2006-2008, Platform Computing Corporation. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#include "../config.h" + +#include <stdio.h> +#include <string.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <errno.h> + +#include "bes.h" +#include "wsseapi.h" +#include "BESFactoryBinding.nsmap" + +#define CREATE_ACT "http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/CreateActivity" +#define STATUS_ACT "http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetActivityStatuses" +#define TERMINATE_ACT "http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/TerminateActivities" +#define ACTIVITIES_ACT "http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetActivityDocuments" +#define FACTORY_ACT "http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetFactoryAttributesDocument" + +#define WSA_NS "http://www.w3.org/2005/08/addressing" +#define BES_NS "http://schemas.ggf.org/bes/2006/08/bes-factory" + +#define NL "\n" + +struct Namespace default_namespaces[] = +{ + {"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope", NULL}, + {"wsse", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", NULL, NULL}, + {"wsa", "http://www.w3.org/2005/08/addressing", NULL, NULL}, + {"bes", "http://schemas.ggf.org/bes/2006/08/bes-factory", NULL, NULL}, + {"jsdl", "http://schemas.ggf.org/jsdl/2005/11/jsdl", NULL, NULL}, + {"app", "http://schemas.ggf.org/jsdl/2006/07/jsdl-hpcpa", NULL, NULL}, + {NULL, NULL, NULL, NULL} +}; + +struct Namespace epr_namespaces[] = { + {"wsa", WSA_NS, NULL, NULL }, + {"bes", BES_NS, NULL, NULL }, + {"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL}, + {NULL, NULL, NULL, NULL} +}; + +struct bes_epr { + char *str; + struct soap_dom_element *dom; + int domCreateFlag; +}; + +#define FromMalloc 1 + +int isElement(struct soap_dom_element *, char *, char *); +int isAttribute(struct soap_dom_attribute *, char *, char *); +int generateAddressHeader(struct bes_context *, epr_t, char *, char **); +int generateAddressingHeaders(struct bes_context *, char *, char *, char **); +void calcDomSize(struct soap_dom_element *, int *); +void calcDomSize2(struct soap *, struct soap_dom_element *, int *); +void sprintDom(struct soap_dom_element *, char *); +void sprintDom2(struct soap *, struct soap_dom_element *, char *); +void printDom(struct soap*, struct soap_dom_element*, int); +void cleanDom(struct soap_dom_element*); +void setErrorString(struct bes_context *, struct soap *, int); + +int +bes_init(struct bes_context **context) +{ + struct bes_context *ctx; + struct soap *soap; + + *context = NULL; + + ctx = (struct bes_context *)malloc(sizeof(struct bes_context)); + if (ctx == NULL) { + return BES_SYS_ERR; + } + + soap = (struct soap *)malloc(sizeof(struct soap)); + if (soap == NULL) { + free(ctx); + return BES_SYS_ERR; + } + + memset(ctx, 0, sizeof(struct bes_context)); + + soap_ssl_init(); + soap_init(soap); + soap_set_mode(soap, SOAP_C_UTFSTRING); + soap_register_plugin(soap, soap_wsse); + soap_set_namespaces(soap, default_namespaces); + soap_header(soap); + + ctx->soap = soap; + *context = ctx; + + return BES_OK; +} + +int +bes_security(struct bes_context *context, char *x509cert, char *x509pass, char *capath, char *user, char *pass) +{ + struct soap *soap; + + soap = context->soap; + + if (soap_ssl_client_context(soap, SOAP_SSL_DEFAULT|SOAP_SSL_SKIP_HOST_CHECK, + x509cert, x509pass, NULL, capath, NULL)) { + setErrorString(context, context->soap, BES_SOAP_ERR); + return BES_SOAP_ERR; + } + + if (user) { + if (soap_wsse_add_UsernameTokenText(soap, NULL, user, pass)) { + setErrorString(context, context->soap, BES_SOAP_ERR); + return BES_SOAP_ERR; + } + } + + if (x509cert) { + context->x509cert = strdup(x509cert); + } + + if (x509pass) { + context->x509pass = strdup(x509pass); + } + + if (capath) { + context->capath = strdup(capath); + } + + if (user) { + context->user = strdup(user); + } + + if (pass) { + context->pass = strdup(pass); + } + + return BES_OK; +} + +int +bes_add_usertoken(struct bes_context *context, char *user, char *pass) +{ + if (soap_wsse_add_UsernameTokenText(context->soap, NULL, user, pass)) { + setErrorString(context, context->soap, BES_SOAP_ERR); + return BES_SOAP_ERR; + } + + return BES_OK; +} + +int +bes_finalize(struct bes_context **context) +{ + struct bes_context *ctx; + + if (context == NULL || *context == NULL) { + return -1; + } + + ctx = *context; + + soap_end(ctx->soap); + soap_done(ctx->soap); + + free(ctx->soap); + + if (ctx->x509cert) { + free(ctx->x509cert); + } + + if (ctx->x509pass) { + free(ctx->x509pass); + } + + if (ctx->capath) { + free(ctx->capath); + } + + if (ctx->user) { + free(ctx->user); + } + + free(ctx); + *context = NULL; + + return BES_OK; +} + +const char* bes_get_lasterror(struct bes_context *context) +{ + return context->error_string; +} + +int +createActivity(struct bes_context *context, epr_t endpointepr, char *jsdlfile, epr_t *activityepr) +{ + struct soap *s; + struct bes__CreateActivityType req; + struct bes__CreateActivityResponseType rsp; + struct soap_dom_element dom, *tmpdom; + struct soap_dom_attribute *attr; + struct bes_epr *epr; + int jsdl, size = 0, ret = BES_OK; + char *endpoint; + + s = context->soap; + + if (ret = generateAddressHeader(context, endpointepr, CREATE_ACT, &endpoint)) { + return ret; + } + + jsdl = open(jsdlfile, O_RDONLY, 0); + if (jsdl == -1) { + setErrorString(context, NULL, BES_SYS_ERR); + return BES_SYS_ERR; + } + + memset(&dom, 0, sizeof(struct soap_dom_element)); + dom.soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); + dom.soap->recvfd = jsdl; + if (soap_begin_recv(dom.soap) + || soap_in_xsd__anyType(dom.soap, NULL, &dom, NULL) == NULL + || soap_end_recv(dom.soap)) { + setErrorString(context, dom.soap, BES_SOAP_ERR); + close(jsdl); + ret = BES_SOAP_ERR; + goto end; + } + close(jsdl); + + memset(&req, 0, sizeof(struct bes__CreateActivityType)); + memset(&rsp, 0, sizeof(struct bes__CreateActivityResponseType)); + + req.bes__ActivityDocument.__any = &dom; + + if (soap_call___bes__CreateActivity(s, endpoint, CREATE_ACT, &req, &rsp) != SOAP_OK) { + setErrorString(context, s, BES_SOAP_ERR); + ret = BES_SOAP_ERR; + goto end; + } + else { + tmpdom = rsp.__any; + + cleanDom(tmpdom); + soap_set_namespaces(s, epr_namespaces); + + epr = (struct bes_epr *)malloc(sizeof(struct bes_epr)); + if (!epr) { + soap_set_namespaces(s, default_namespaces); + setErrorString(context, NULL, BES_MEM_ALLOC); + ret = BES_MEM_ALLOC; + goto end; + } + memset(epr, 0, sizeof(struct bes_epr)); + + s->ns = 0; + calcDomSize2(s, tmpdom, &size); + epr->str = (char *)malloc(size + 1); + if (!epr->str) { + free(epr); + soap_set_namespaces(s, default_namespaces); + setErrorString(context, NULL, BES_MEM_ALLOC); + ret = BES_MEM_ALLOC; + goto end; + } + memset(epr->str, 0, size + 1); + + s->ns = 0; + sprintDom2(s, tmpdom, epr->str); + + epr->dom = tmpdom; + *activityepr = (epr_t)epr; + + soap_set_namespaces(s, default_namespaces); + } + +end: + soap_end(dom.soap); + soap_done(dom.soap); + free(dom.soap); + + return ret; +} + +bool +terminateActivities(struct bes_context *context, epr_t endpointepr, epr_t activityepr) +{ + struct soap *s; + struct bes__TerminateActivitiesType req; + struct bes__TerminateActivitiesResponseType rsp; + struct bes_epr *epr; + int i, ret = BES_OK; + char *endpoint; + + s = context->soap; + epr = (struct bes_epr *)activityepr; + + if (ret = generateAddressHeader(context, endpointepr, TERMINATE_ACT, &endpoint)) { + return false; + } + + memset(&req, 0, sizeof(struct bes__TerminateActivitiesType)); + memset(&rsp, 0, sizeof(struct bes__TerminateActivitiesResponseType)); + + req.__any = epr->dom; + if (soap_call___bes__TerminateActivities(s, endpoint, TERMINATE_ACT, req, &rsp) != SOAP_OK) { + setErrorString(context, s, BES_SOAP_ERR); + ret = false; + } + else { + for (i = 0; i < rsp.__sizeResponse; i++) { + if (rsp.Response[i].Cancelled == true_) { + ret = true; + } + else { + ret = false; + } + } + } + + return ret; +} + +int +getActivityStatuses(struct bes_context *context, epr_t endpointepr, epr_t activityepr, struct bes_activity_status *status) +{ + struct soap *s; + struct bes__GetActivityStatusesType req; + struct bes__GetActivityStatusesResponseType rsp; + struct bes_epr *epr; + int ret = BES_OK; + char *endpoint; + + s = context->soap; + epr = (struct bes_epr *)activityepr; + + memset(status, 0, sizeof(struct bes_activity_status)); + + if (ret = generateAddressHeader(context, endpointepr, STATUS_ACT, &endpoint)) { + return ret; + } + + memset(&req, 0, sizeof(struct bes__GetActivityStatusesType)); + memset(&rsp, 0, sizeof(struct bes__GetActivityStatusesResponseType)); + + req.__any = epr->dom; + if (soap_call___bes__GetActivityStatuses(s, endpoint, STATUS_ACT, req, &rsp) != SOAP_OK) { + setErrorString(context, s, BES_SOAP_ERR); + ret = BES_SOAP_ERR; + goto end; + } + else { + if ((rsp.__any!=NULL)&&(!strcmp(rsp.__any->name,"Response"))) { + struct soap_dom_element *element = rsp.__any->elts; + int size; + + while (element != NULL) { + if (!strcmp(element->name,"ActivityStatus")) { + if(element->atts!=NULL) { + struct soap_dom_attribute *attributes=element->atts; + + while (attributes != NULL) { + if((attributes->name!=NULL)&&(!strcmp(attributes->name,"state"))) { + if((attributes->data!=NULL)&&(!strcmp(attributes->data,"Pending"))) { + status->state = BES_Pending; + } + else if((attributes->data!=NULL)&&(!strcmp(attributes->data,"Running"))) { + status->state = BES_Running; + } + else if((attributes->data!=NULL)&&(!strcmp(attributes->data,"Cancelled"))) { + status->state = BES_Cancelled; + } + else if((attributes->data!=NULL)&&(!strcmp(attributes->data,"Failed"))) { + status->state = BES_Failed; + } + else if((attributes->data!=NULL)&&(!strcmp(attributes->data,"Finished"))) { + status->state = BES_Finished; + } + break; + } + attributes=attributes->next; + } + + if (element->elts) { + calcDomSize(element->elts, &size); + + status->substate = (char *)malloc(size + 1); + if (!status->substate) { + setErrorString(context, NULL, BES_MEM_ALLOC); + ret = BES_MEM_ALLOC; + goto end; + } + + memset(status->substate, 0, size + 1); + sprintDom(element->elts, status->substate); + } + } + + break; + } + else if(!strcmp(element->name,"Fault")) { + setErrorString(context, NULL, BES_GETSTATUS_ERR); + ret = BES_GETSTATUS_ERR; + goto end; + } + else { + element=element->next; + } + } + } + } + +end: + return ret; +} + +int +getActivityDocuments(struct bes_context *context, epr_t endpointepr, epr_t activityepr, char **strDoc) +{ + struct soap *s; + struct bes__GetActivityDocumentsType req; + struct bes__GetActivityDocumentsResponseType rsp; + struct bes_epr *epr; + int size = 0, ret = BES_OK; + char *endpoint, *str; + + s = context->soap; + epr = (struct bes_epr *)activityepr; + + if (ret = generateAddressHeader(context, endpointepr, ACTIVITIES_ACT, &endpoint)) { + return ret; + } + + memset(&req, 0, sizeof(struct bes__GetActivityDocumentsType)); + memset(&rsp, 0, sizeof(struct bes__GetActivityDocumentsResponseType)); + + req.__any = epr->dom; + if (soap_call___bes__GetActivityDocuments(s, endpoint, ACTIVITIES_ACT, req, &rsp) != SOAP_OK) { + setErrorString(context, s, BES_SOAP_ERR); + ret = BES_SOAP_ERR; + goto end; + } + else { + calcDomSize(rsp.__any, &size); + + str = (char *)malloc(size + 1); + if (!str) { + setErrorString(context, NULL, BES_MEM_ALLOC); + ret = BES_MEM_ALLOC; + goto end; + } + memset(str, 0, size + 1); + + sprintDom(rsp.__any, str); + + *strDoc = str; + } + +end: + return ret; +} + +int +getFactoryAttributesDocument(struct bes_context *context, epr_t endpointepr, char **strDoc) +{ + struct soap *s; + struct bes__GetFactoryAttributesDocumentType req; + struct bes__GetFactoryAttributesDocumentResponseType rsp; + char *endpoint, *str; + int size = 0, ret = BES_OK; + + s = context->soap; + + if (ret = generateAddressHeader(context, endpointepr, FACTORY_ACT, &endpoint)) { + return ret; + } + + memset(&req, 0, sizeof(struct bes__GetFactoryAttributesDocumentType)); + memset(&rsp, 0, sizeof(struct bes__GetFactoryAttributesDocumentResponseType)); + + if (soap_call___bes__GetFactoryAttributesDocument(s, endpoint, FACTORY_ACT, &req, &rsp) != SOAP_OK) { + setErrorString(context, s, BES_SOAP_ERR); + ret = BES_SOAP_ERR; + } + else { + calcDomSize(rsp.__any, &size); + + str = (char *)malloc(size + 1); + if (!str) { + setErrorString(context, NULL, BES_MEM_ALLOC); + return BES_MEM_ALLOC; + } + + memset(str, 0, size + 1); + + sprintDom(rsp.__any, str); + *strDoc = str; + } + + return ret; +} + +void freeEPR(epr_t *epr) +{ + struct bes_epr *tmpEPR; + + if (!epr || !(*epr)) { + return; + } + + tmpEPR = (struct bes_epr *)(*epr); + + if (tmpEPR->domCreateFlag == FromMalloc) { + soap_end(tmpEPR->dom->soap); + soap_done(tmpEPR->dom->soap); + free(tmpEPR->dom->soap); + } + + free(tmpEPR->str); + free(tmpEPR); + + *epr = NULL; +} + +int writeEPRToFile(struct bes_context *context, epr_t epr, char *filename) +{ + struct bes_epr *tmpEPR; + int fd; + + if (!epr) { + setErrorString(context, NULL, BES_BAD_ARG); + return BES_BAD_ARG; + } + + tmpEPR = (struct bes_epr *)(epr); + + fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); + if (fd == -1) { + setErrorString(context, NULL, BES_SYS_ERR); + return BES_SYS_ERR; + } + + if (write(fd, tmpEPR->str, strlen(tmpEPR->str)) == -1) { + setErrorString(context, NULL, BES_SYS_ERR); + return BES_SYS_ERR; + } + + close(fd); + return BES_OK; +} + +int readEPRFromFile(struct bes_context *context, char *filename, epr_t *epr) +{ + int fd, size = 0, ret = BES_OK; + struct soap_dom_element *dom; + struct bes_epr *tmpEPR; + struct stat fileStat; + + if (!epr) { + setErrorString(context, NULL, BES_BAD_ARG); + return BES_BAD_ARG; + } + + fd = open(filename, O_RDONLY, 0); + if (fd == -1) { + setErrorString(context, NULL, BES_SYS_ERR); + return BES_SYS_ERR; + } + + dom = (struct soap_dom_element *)soap_malloc(context->soap, sizeof(struct soap_dom_element)); + if (!dom) { + close(fd); + setErrorString(context, NULL, BES_MEM_ALLOC); + return BES_MEM_ALLOC; + } + + dom->soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); + dom->soap->recvfd = fd; + if (soap_begin_recv(dom->soap) + || soap_in_xsd__anyType(dom->soap, NULL, dom, NULL) == NULL + || soap_end_recv(dom->soap)) { + setErrorString(context, dom->soap, BES_SOAP_ERR); + ret = BES_SOAP_ERR; + goto error_end; + } + + tmpEPR = (struct bes_epr *)malloc(sizeof(struct bes_epr)); + if (!tmpEPR) { + setErrorString(context, NULL, BES_MEM_ALLOC); + ret = BES_MEM_ALLOC; + goto error_end; + } + memset(tmpEPR, 0, sizeof(struct bes_epr)); + + if (lseek(fd, 0, SEEK_SET) == -1) { + free(tmpEPR); + setErrorString(context, NULL, BES_SYS_ERR); + ret = BES_SYS_ERR; + goto error_end; + } + + if (fstat(fd, &fileStat)) { + free(tmpEPR); + setErrorString(context, NULL, BES_SYS_ERR); + ret = BES_SYS_ERR; + goto error_end; + } + + size = fileStat.st_size; + tmpEPR->str = (char *)malloc(size + 1); + if (!tmpEPR->str) { + free(tmpEPR); + setErrorString(context, NULL, BES_MEM_ALLOC); + ret = BES_MEM_ALLOC; + goto error_end; + } + memset(tmpEPR->str, 0, size + 1); + + if (read(fd, tmpEPR->str, size) == -1) { + free(tmpEPR); + setErrorString(context, NULL, BES_SYS_ERR); + ret = BES_SYS_ERR; + goto error_end; + } + + close(fd); + + tmpEPR->dom = dom; + tmpEPR->domCreateFlag = FromMalloc; + *epr = (epr_t)tmpEPR; + + return BES_OK; + +error_end: + close(fd); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); + + return ret; + +} + +const char *getEPRString(epr_t epr) +{ + struct bes_epr *tmpEPR; + + if (!epr) { + return NULL; + } + + tmpEPR = (struct bes_epr *)(epr); + + return tmpEPR->str; +} + +void +calcDomSize(struct soap_dom_element *node, int *size) +{ + struct soap_dom_attribute *attr; + + if (node == NULL) { + return; + } + + *size += strlen(node->name) + 1; + attr = node->atts; + while (attr) { + *size += strlen(attr->name) + strlen(attr->data) + 4; + attr = attr->next; + } + (*size)++; + + if (node->data && strlen(node->data)) { + *size += strlen(node->data); + } + + if (node->elts) + calcDomSize(node->elts, size); + + *size += strlen(node->name) + 3; + + if (node->next) + calcDomSize(node->next, size); + +} + + +void calcElementSize(struct soap *soap, struct soap_dom_element *node, const char *prefix, int *size) +{ + struct Namespace *ns; + + if (!soap->ns) { + *size += strlen("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); + } + + *size += strlen(prefix) + strlen(node->name) + 2; + + if (!soap->ns) { + for (ns = soap->local_namespaces; ns && ns->id; ns++) { + if (*ns->id && (ns->out || ns->ns)) { + *size += strlen(ns->id) + strlen(ns->out ? ns->out : ns->ns) + 10; + } + } + } + + if (!soap->ns) { + soap->ns = 1; + } + +} + +void +calcDomSize2(struct soap *soap, struct soap_dom_element *node, int *size) +{ + struct Namespace *ns; + struct soap_dom_attribute *attr; + struct soap_dom_element *elt; + + for (ns = soap->local_namespaces; ns && ns->id; ns++) { + if (ns->ns == node->nstr || !strcmp(ns->ns, node->nstr)) { + calcElementSize(soap, node, ns->id, size); + break; + } + } + + attr = node->atts; + while (attr) { + *size += strlen(attr->name) + strlen(attr->data) + 4; + attr = attr->next; + } + + (*size)++; + + if (node->data && strlen(node->data)) { + *size += strlen(node->data); + } + + for (elt = node->elts; elt; elt = elt->next) { + calcDomSize2(soap, elt, size); + } + + if (ns && ns->id) { + *size += strlen(ns->id) + strlen(node->name) + 4; + } + +} + +void sprintElement(struct soap *soap, struct soap_dom_element *node, const char *prefix, char *str) +{ + char buf[256]; + struct Namespace *ns; + + if (!soap->ns) { + sprintf(buf, "%s", "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); + strcat(str, buf); + } + + sprintf(buf, "<%s:%s", prefix, node->name); + strcat(str, buf); + + if (!soap->ns) { + for (ns = soap->local_namespaces; ns && ns->id; ns++) { + if (*ns->id && (ns->out || ns->ns)) { + sprintf(buf, " xmlns:%s=\"%s\"", ns->id, ns->out ? ns->out : ns->ns); + strcat(str, buf); + } + } + } + + if (!soap->ns) { + soap->ns = 1; + } + +} + +void sprintDom2(struct soap *soap, struct soap_dom_element *node, char *str) +{ + struct Namespace *ns; + struct soap_dom_element *elt; + struct soap_dom_attribute *attr; + char buf[256]; + + for (ns = soap->local_namespaces; ns && ns->id; ns++) { + if (ns->ns == node->nstr || !strcmp(ns->ns, node->nstr)) { + sprintElement(soap, node, ns->id, str); + break; + } + } + + attr = node->atts; + while (attr) { + sprintf(buf, " %s=\"%s\"", attr->name, attr->data); + strcat(str, buf); + attr = attr->next; + } + + strcat(str, ">"); + + if (node->data) { + strcat(str, node->data); + } + + for (elt = node->elts; elt; elt = elt->next) { + sprintDom2(soap, elt, str); + } + + if (ns && ns->id) { + sprintf(buf, "</%s:%s>", ns->id, node->name); + strcat(str, buf); + } + +} + +void +sprintDom(struct soap_dom_element *node, char *str) +{ + struct soap_dom_attribute *attr; + char buf[256]; + + if (node == NULL) { + return; + } + + sprintf(buf, "<%s", node->name); + strcat(str, buf); + attr = node->atts; + while (attr) { + sprintf(buf, " %s=\"%s\"", attr->name, attr->data); + strcat(str, buf); + attr = attr->next; + } + strcat(str, ">"); + + if (node->data && strlen(node->data)) { + sprintf(buf, "%s", node->data); + strcat(str, buf); + } + + if (node->elts) + sprintDom(node->elts, str); + + sprintf(buf, "</%s>", node->name); + strcat(str, buf); + + if (node->next) + sprintDom(node->next, str); + +} + +void +printDom(struct soap *s, struct soap_dom_element *node, int depth) +{ + struct soap_dom_attribute *attr; + int i; + + if (node == NULL) { + return; + } + + for (i = 0; i < depth; i++) + fprintf(stdout, " "); + fprintf(stdout, "<%s", node->name); + attr = node->atts; + while (attr) { + fprintf(stdout, " %s=\"%s\"", attr->name, attr->data); + attr = attr->next; + } + fprintf(stdout, ">\n"); + + if (node->data && strlen(node->data)) { + for (i = 0; i < depth; i++) + fprintf(stdout, " "); + fprintf(stdout, "%s\n", node->data); + } + + if (node->elts) + printDom(s, node->elts, depth+1); + + for (i = 0; i < depth; i++) + fprintf(stdout, " "); + fprintf(stdout, "</%s>\n", node->name); + + if (node->next) + printDom(s, node->next, depth); + +} + +void +cleanDom(struct soap_dom_element *node) +{ + struct soap_dom_attribute *attr; + char *cp; + + if (node == NULL) { + return; + } + cp = strchr(node->name, ':'); + if (cp) { + cp++; + node->name = cp; + } + if (node->nstr && strlen(node->nstr) == 0) + node->nstr = NULL; + attr = node->atts; + while (attr) { + cp = strchr(attr->name, ':'); + if (cp) { + cp++; + attr->name = cp; + } + if (attr->nstr && strlen(attr->nstr) == 0) + attr->nstr = NULL; + attr = attr->next; + } + if (node->elts) + cleanDom(node->elts); + if (node->next) + cleanDom(node->next); +} + +int +generateAddressHeader(struct bes_context *context, + epr_t endpointepr, + char *action, + char **endpoint_ret) +{ + struct soap *s; + struct soap_dom_element *dom, *iter; + struct bes_epr *epr; + char *endpoint; + + s = context->soap; + epr = (struct bes_epr *)endpointepr; + dom = epr->dom; + + iter = dom->elts; + if (!iter || !isElement(iter, WSA_NS, "Address")) { + setErrorString(context, NULL, BES_ENDPOINT_ERR); + return BES_ENDPOINT_ERR; + } + endpoint = soap_strdup(s, iter->data); + if (endpoint == NULL) { + setErrorString(context, s, BES_SOAP_ERR); + return BES_SOAP_ERR; + } + + s->header->wsa__To.__item = endpoint; + if (endpoint_ret) { + *endpoint_ret = endpoint; + } + + s->header->wsa__Action.__item = soap_strdup(s, action); + if (s->header->wsa__Action.__item == NULL) { + setErrorString(context, s, BES_SOAP_ERR); + return BES_SOAP_ERR; + } + + return BES_OK; +} + + +int +generateAddressingHeaders(struct bes_context *context, + char *eprfile, + char *action, + char **endpoint_ret) +{ + struct soap *s; + struct soap_dom_element dom, *iter; + struct soap_dom_element *refparams, *refparam; + struct soap_dom_attribute *isrefparam; + char *endpoint; + int epr, i, numrefparams, ret = BES_OK; + + s = context->soap; + + epr = open(eprfile, O_RDONLY, 0); + if (epr == -1) { + setErrorString(context, NULL, BES_SYS_ERR); + return BES_SYS_ERR; + } + + soap_set_namespaces(s, epr_namespaces); + + memset(&dom, 0, sizeof(struct soap_dom_element)); + dom.soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); + dom.soap->recvfd = epr; + if (soap_begin_recv(dom.soap) + || soap_in_xsd__anyType(dom.soap, NULL, &dom, NULL) == NULL + || soap_end_recv(dom.soap)) { + setErrorString(context, dom.soap, BES_SOAP_ERR); + soap_set_namespaces(s, namespaces); + close(epr); + ret = BES_SOAP_ERR; + goto end; + } + close(epr); + + soap_set_namespaces(s, namespaces); + + iter = dom.elts; + if (!iter || !isElement(iter, WSA_NS, "Address")) { + setErrorString(context, NULL, BES_ENDPOINT_ERR); + ret = BES_ENDPOINT_ERR; + goto end; + } + endpoint = soap_strdup(s, iter->data); + if (endpoint == NULL) { + setErrorString(context, s, BES_SOAP_ERR); + ret = BES_SOAP_ERR; + goto end; + } + s->header->wsa__To.__item = endpoint; + if (endpoint_ret) *endpoint_ret = endpoint; + + s->header->wsa__Action.__item = soap_strdup(s, action); + if (s->header->wsa__Action.__item == NULL) { + setErrorString(context, s, BES_SOAP_ERR); + ret = BES_SOAP_ERR; + goto end; + } + + iter = iter->next; + while (iter) { + if (isElement(iter, WSA_NS, "ReferenceParameters")) { + isrefparam = (struct soap_dom_attribute*)soap_malloc(s, sizeof(struct soap_dom_attribute)); + if (isrefparam == NULL) { + setErrorString(context, s, BES_SOAP_ERR); + ret = BES_SOAP_ERR; + goto end; + } + memset(isrefparam, 0, sizeof(struct soap_dom_attribute)); + isrefparam->soap = s; + isrefparam->nstr = WSA_NS; + isrefparam->name = soap_strdup(s, "wsa:IsReferenceParameter"); + isrefparam->data = soap_strdup(s, "true"); + if (!isrefparam->name || !isrefparam->data) { + setErrorString(context, s, BES_SOAP_ERR); + ret = BES_SOAP_ERR; + goto end; + } + + refparam = iter->elts; + numrefparams = 0; + while (refparam) { + if (refparam->atts) { + struct soap_dom_attribute *last, *attr = refparam->atts; + while (attr) { + if (isAttribute(attr, WSA_NS, "IsReferenceParameter")) { + attr->nstr = isrefparam->nstr; + attr->name = isrefparam->name; + attr->data = isrefparam->data; + break; + } + last = attr; + attr = attr->next; + } + if (!attr) { + last->next = isrefparam; + } + } + else { + refparam->atts = isrefparam; + } + refparam = refparam->next; + numrefparams++; + } + + refparams = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element)*numrefparams); + if (refparams == NULL) { + setErrorString(context, s, BES_SOAP_ERR); + ret = BES_SOAP_ERR; + goto end; + } + memset(refparams, 0, sizeof(struct soap_dom_element)*numrefparams); + refparam = iter->elts; + for (i = 0; i < numrefparams; i++) { + refparams[i].nstr = refparam->nstr; + refparams[i].name = refparam->name; + refparams[i].data = refparam->data; + refparams[i].atts = refparam->atts; + refparams[i].soap = refparam->soap; + refparams[i].elts = refparam->elts; + refparam = refparam->next; + } + + s->header->__size = numrefparams; + s->header->__any = refparams; + } + + iter = iter->next; + } + +end: + soap_end(dom.soap); + soap_done(dom.soap); + free(dom.soap); + + return ret; +} + +int +isElement(struct soap_dom_element *dom, char *ns, char *elt) +{ + char *cp; + + if (!dom || !ns || !elt) { + return 0; + } + if (strcmp(dom->nstr, ns)) { + return 0; + } + cp = strchr(dom->name... [truncated message content] |
From: <cs...@us...> - 2008-05-07 22:01:34
|
Revision: 38 http://bespp.svn.sourceforge.net/bespp/?rev=38&view=rev Author: csmith Date: 2008-05-07 15:01:32 -0700 (Wed, 07 May 2008) Log Message: ----------- - update the copyright dates Modified Paths: -------------- trunk/config.h Modified: trunk/config.h =================================================================== --- trunk/config.h 2008-04-29 22:50:09 UTC (rev 37) +++ trunk/config.h 2008-05-07 22:01:32 UTC (rev 38) @@ -11,7 +11,7 @@ #define VERSION_STRING "BES++ 1.0.1, 2008-04-09" /* Don't change this one */ -#define COPYRIGHT "Copyright (C) 2007-2008 Platform Computing Corporation" +#define COPYRIGHT "Copyright (C) 2006-2008 Platform Computing Corporation" #endif /* _CONFIG_H */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-04-29 22:50:02
|
Revision: 37 http://bespp.svn.sourceforge.net/bespp/?rev=37&view=rev Author: csmith Date: 2008-04-29 15:50:09 -0700 (Tue, 29 Apr 2008) Log Message: ----------- fixed wrapper script location to user home Modified Paths: -------------- trunk/besclient/sleep.jsdl trunk/besserver/job.c Property Changed: ---------------- trunk/besclient/ trunk/besserver/ Property changes on: trunk/besclient ___________________________________________________________________ Name: svn:ignore - .project .cproject .gdb_history .settings *.log soapClient.c soapC.c soapStub.h soapH.h bes.h BESFactoryBinding.nsmap bes-factory.xsd bes-factory.wsdl besclient + .project .cproject .gdb_history .settings *.log soapClient.c soapC.c soapStub.h soapH.h bes-factory.h BESFactoryBinding.nsmap bes-factory.xsd bes-factory.wsdl besclient Modified: trunk/besclient/sleep.jsdl =================================================================== --- trunk/besclient/sleep.jsdl 2008-04-21 19:58:46 UTC (rev 36) +++ trunk/besclient/sleep.jsdl 2008-04-29 22:50:09 UTC (rev 37) @@ -5,7 +5,7 @@ <JobName>Sleep</JobName> </JobIdentification> <Application> - <HPCProfileApplication xmlns="http://schemas.ggf.org/jsdl/2006/07/jsdl-hpcp"> + <HPCProfileApplication xmlns="http://schemas.ggf.org/jsdl/2006/07/jsdl-hpcpa"> <Executable>sleep</Executable> <Argument>60</Argument> <Output>/dev/null</Output> Property changes on: trunk/besserver ___________________________________________________________________ Name: svn:ignore - server.pem .project .cproject .gdb_history .settings *.log soapServer.c soapC.c soapH.h soapStub.h bes.h BESFactoryBinding.nsmap bes-factory.xsd bes-factory.wsdl besserver + server.pem .project .cproject .gdb_history .settings *.log soapServer.c soapC.c soapH.h soapStub.h bes-factory.h BESFactoryBinding.nsmap bes-factory.xsd bes-factory.wsdl besserver Modified: trunk/besserver/job.c =================================================================== --- trunk/besserver/job.c 2008-04-21 19:58:46 UTC (rev 36) +++ trunk/besserver/job.c 2008-04-29 22:50:09 UTC (rev 37) @@ -1109,7 +1109,7 @@ createJobWrapperScript(struct jobcard *jc, char *osuser, char *scriptname, int namelen) { static char fname[] = "createJobWrapperScript"; - char wrappername[64]; + char wrappername[MAXPATHLEN]; FILE *wrapper; int fd, i; struct passwd *pw; @@ -1129,34 +1129,37 @@ service_uid = geteuid(); if (seteuid(0)) { - perror("createJobWrapperScript: seteuid 0"); - unlink(fname); + perror("createJobWrapperScript: seteuid 0 (1)"); return BESE_SYS_ERR; } - strcpy(wrappername, "/tmp/jobscript.XXXXXX"); + if (seteuid(pw->pw_uid)) { + perror("createJobWrapperScript: seteuid user"); + return BESE_SYS_ERR; + } + + if (strlen(pw->pw_dir) + strlen("/jobscript.XXXXXX") + 1 > MAXPATHLEN) { + fprintf(stderr, "%s: cannot generate wrapper script: path too long\n", fname); + return BESE_SYS_ERR; + } + + sprintf(wrappername, "%s/jobscript.XXXXXX", pw->pw_dir); fd = mkstemp(wrappername); if (fd == -1) { perror("createJobWrapperScript: mkstemp"); return BESE_SYS_ERR; } - if (fchown(fd, pw->pw_uid, pw->pw_gid)) { - perror("createJobWrapperScript: fchown"); - unlink(fname); - return BESE_SYS_ERR; - } - if (fchmod(fd, S_IRWXU)) { perror("createJobWrapperScript: fchmod"); - unlink(fname); + unlink(wrappername); return BESE_SYS_ERR; } wrapper = fdopen(fd, "w"); if (wrapper == NULL) { perror("createJobWrapperScript: fdopen"); - unlink(fname); + unlink(wrappername); return BESE_SYS_ERR; } @@ -1169,7 +1172,7 @@ if (!cp) { fprintf(stderr, "%s: malformed source URI for file transfer %s\n", fname, file->source); fprintf(stderr, "%s: only support ftp URIs at this time\n", fname); - unlink(fname); + unlink(wrappername); return BESE_OTHER; } cp = cp + strlen("ftp://"); @@ -1200,7 +1203,7 @@ if (!cp) { fprintf(stderr, "%s: malformed target URI for file transfer %s\n", fname, file->target); fprintf(stderr, "%s: only support ftp URIs at this time\n", fname); - unlink(fname); + unlink(wrappername); return BESE_OTHER; } cp = cp + strlen("ftp://"); @@ -1215,14 +1218,20 @@ } fprintf(wrapper, "rm $0\n"); - + fprintf(wrapper, "exit $rc\n"); fclose(wrapper); + if (seteuid(0)) { + perror("createJobWrapperScript: seteuid 0 (2)"); + unlink(wrappername); + return BESE_SYS_ERR; + } + if (seteuid(service_uid)) { perror("createJobWrapperScript: seteuid service_uid"); - unlink(fname); + unlink(wrappername); return BESE_SYS_ERR; } @@ -1235,7 +1244,7 @@ submitLSFJob(struct jobcard *jc, int *return_jobid, char *osuser) { static char fname[] = "submitLSFJob"; - char scriptname[64], wrappername[64]; + char scriptname[MAXPATHLEN], wrappername[MAXPATHLEN]; char buf[512]; int fd, i, rc, jobid = 0, rr = 0; FILE *script; @@ -1329,7 +1338,7 @@ fprintf(script, "\" "); } - if ((rc = createJobWrapperScript(jc, osuser, wrappername, 64)) != BESE_OK) { + if ((rc = createJobWrapperScript(jc, osuser, wrappername, MAXPATHLEN)) != BESE_OK) { fclose(script); unlink(scriptname); return rc; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-04-21 19:58:40
|
Revision: 36 http://bespp.svn.sourceforge.net/bespp/?rev=36&view=rev Author: csmith Date: 2008-04-21 12:58:46 -0700 (Mon, 21 Apr 2008) Log Message: ----------- change gsoap generated header file name Modified Paths: -------------- trunk/besclient/Makefile trunk/besserver/Makefile Modified: trunk/besclient/Makefile =================================================================== --- trunk/besclient/Makefile 2008-04-11 23:05:18 UTC (rev 35) +++ trunk/besclient/Makefile 2008-04-21 19:58:46 UTC (rev 36) @@ -16,7 +16,7 @@ LIBS = -lssl -lcrypto $(EXTRA_LIBS) BES_WSDL = bes-factory.wsdl -BES_HEADER = bes.h +BES_HEADER = bes-factory.h SOAP_NS = BESFactoryBinding.nsmap SOAP_H_FILES = soapH.h soapStub.h Modified: trunk/besserver/Makefile =================================================================== --- trunk/besserver/Makefile 2008-04-11 23:05:18 UTC (rev 35) +++ trunk/besserver/Makefile 2008-04-21 19:58:46 UTC (rev 36) @@ -16,7 +16,7 @@ LIBS = -lssl -lcrypto -lpam $(LSF_LIBS) $(EXTRA_LIBS) BES_WSDL = bes-factory.wsdl -BES_HEADER = bes.h +BES_HEADER = bes-factory.h BES_H_FILES = job.h namespaces.h faults.h auth.h BES_OBJ = besserver.o job.o faults.o auth.o This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-04-11 23:05:11
|
Revision: 35 http://bespp.svn.sourceforge.net/bespp/?rev=35&view=rev Author: csmith Date: 2008-04-11 16:05:18 -0700 (Fri, 11 Apr 2008) Log Message: ----------- - added more description of besclient options - fixed core dump in besclient with gSOAP 2.7.10 Modified Paths: -------------- tags/release-1.0.1/README.txt tags/release-1.0.1/besclient/besclient.c Modified: tags/release-1.0.1/README.txt =================================================================== --- tags/release-1.0.1/README.txt 2008-04-11 23:03:42 UTC (rev 34) +++ tags/release-1.0.1/README.txt 2008-04-11 23:05:18 UTC (rev 35) @@ -157,6 +157,17 @@ Note that in BES an "Activity" is the same as a "Job" in LSF or other resource managers. +A BES client will use SSL/TLS to connect to a BES service, and will use +SSL/TLS server authentication using X.509 certificates. This requires +the besclient user to set up a directory of "trusted" certificate files +(either actual server certificates, or trusted CAs). See the -capath +option for more details on the contents of this directory. + +The besclient program will support using either WS-Security's UsernameToken +for client authentication (i.e. username and password), or can authenticate +using X.509 certificates. The mechanism used will depend on the BES service +being used. + There is a sample JSDL document in besclient/sleep.jsdl that should run on pretty much any UNIX type system through LSF if an example job is needed. @@ -202,8 +213,16 @@ -e endpoint.xml the name of a file containing the EPR for the BES service to contact. - Default is './endpoint.xml'. + Default is './endpoint.xml'. EPRs for different BES services will + vary slightly, so you will need to get this EPR from the provider + of the BES service. The format of a BES++ BES service looks like + the following: + <?xml version="1.0" encoding="UTF-8"?> + <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"> + <wsa:Address>https://myhost.mydomain.com:443</wsa:Address> + </wsa:EndpointReference> + -u username the username to use when authenticating to the server using username and password authentication. Modified: tags/release-1.0.1/besclient/besclient.c =================================================================== --- tags/release-1.0.1/besclient/besclient.c 2008-04-11 23:03:42 UTC (rev 34) +++ tags/release-1.0.1/besclient/besclient.c 2008-04-11 23:05:18 UTC (rev 35) @@ -267,11 +267,11 @@ perror("Cannot open JSDL file."); exit(1); } - dom.soap = s; - s->recvfd = jsdl; - if (soap_begin_recv(s) - || soap_in_xsd__anyType(s, NULL, &dom, NULL) == NULL - || soap_end_recv(s)) { + dom.soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); + dom.soap->recvfd = jsdl; + if (soap_begin_recv(dom.soap) + || soap_in_xsd__anyType(dom.soap, NULL, &dom, NULL) == NULL + || soap_end_recv(dom.soap)) { soap_print_fault(dom.soap, stderr); exit(1); } @@ -308,6 +308,10 @@ printf("Successfully submitted activity. Wrote EPR to %s\n.", activityepr); } + soap_end(dom.soap); + soap_done(dom.soap); + free(dom.soap); + return 0; } @@ -330,11 +334,11 @@ exit(1); } - dom.soap = s; - s->recvfd = epr; - if (soap_begin_recv(s) - || soap_in_xsd__anyType(s, NULL, &dom, NULL) == NULL - || soap_end_recv(s)) { + dom.soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); + dom.soap->recvfd = epr; + if (soap_begin_recv(dom.soap) + || soap_in_xsd__anyType(dom.soap, NULL, &dom, NULL) == NULL + || soap_end_recv(dom.soap)) { soap_print_fault(dom.soap, stderr); exit(1); } @@ -359,6 +363,10 @@ } } + soap_end(dom.soap); + soap_done(dom.soap); + free(dom.soap); + return 0; } @@ -388,12 +396,12 @@ } memset(dom, 0, sizeof(struct soap_dom_element)); - dom->soap = s; - s->recvfd = epr; - if (soap_begin_recv(s) - || soap_in_xsd__anyType(s, NULL, dom, NULL) == NULL - || soap_end_recv(s)) { - soap_print_fault(s, stderr); + dom->soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); + dom->soap->recvfd = epr; + if (soap_begin_recv(dom->soap) + || soap_in_xsd__anyType(dom->soap, NULL, dom, NULL) == NULL + || soap_end_recv(dom->soap)) { + soap_print_fault(dom->soap, stderr); exit(1); } close(epr); @@ -409,6 +417,10 @@ fprintf(stdout, "Got result from server\n"); printDom(s, rsp.__any, 0); } + + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); return 0; } @@ -442,12 +454,12 @@ } memset(dom, 0, sizeof(struct soap_dom_element)); - dom->soap = s; - s->recvfd = epr; - if (soap_begin_recv(s) - || soap_in_xsd__anyType(s, NULL, dom, NULL) == NULL - || soap_end_recv(s)) { - soap_print_fault(s, stderr); + dom->soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); + dom->soap->recvfd = epr; + if (soap_begin_recv(dom->soap) + || soap_in_xsd__anyType(dom->soap, NULL, dom, NULL) == NULL + || soap_end_recv(dom->soap)) { + soap_print_fault(dom->soap, stderr); exit(1); } close(epr); @@ -516,6 +528,10 @@ if(fault&&activityPresent) *status="UnknownActivityIdentifierFault but identifier was seen in the system before."; + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); + return terminated; } @@ -546,12 +562,12 @@ } memset(dom, 0, sizeof(struct soap_dom_element)); - dom->soap = s; - s->recvfd = epr; - if (soap_begin_recv(s) - || soap_in_xsd__anyType(s, NULL, dom, NULL) == NULL - || soap_end_recv(s)) { - soap_print_fault(s, stderr); + dom->soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); + dom->soap->recvfd = epr; + if (soap_begin_recv(dom->soap) + || soap_in_xsd__anyType(dom->soap, NULL, dom, NULL) == NULL + || soap_end_recv(dom->soap)) { + soap_print_fault(dom->soap, stderr); exit(1); } close(epr); @@ -568,6 +584,10 @@ printDom(s, rsp.__any, 0); } + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); + return 0; } @@ -694,12 +714,15 @@ soap_set_namespaces(s, epr_namespaces); - dom->soap = s; + dom->soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); dom->soap->recvfd = epr; if (soap_begin_recv(dom->soap) || soap_in_xsd__anyType(dom->soap, NULL, dom, NULL) == NULL || soap_end_recv(dom->soap)) { soap_print_fault(dom->soap, stderr); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); soap_set_namespaces(s, namespaces); return -1; } @@ -710,11 +733,17 @@ iter = dom->elts; if (!iter || !isElement(iter, WSA_NS, "Address")) { fprintf(stderr, "%s does not contain a valid EPR.", eprfile); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); return -1; } endpoint = soap_strdup(s, iter->data); if (endpoint == NULL) { soap_print_fault(s, stderr); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); return -1; } s->header->wsa__To.__item = endpoint; @@ -723,6 +752,9 @@ s->header->wsa__Action.__item = soap_strdup(s, action); if (s->header->wsa__Action.__item == NULL) { soap_print_fault(s, stderr); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); return -1; } @@ -732,6 +764,9 @@ isrefparam = (struct soap_dom_attribute*)soap_malloc(s, sizeof(struct soap_dom_attribute)); if (isrefparam == NULL) { soap_print_fault(s, stderr); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); return -1; } memset(isrefparam, 0, sizeof(struct soap_dom_attribute)); @@ -741,6 +776,9 @@ isrefparam->data = soap_strdup(s, "true"); if (!isrefparam->name || !isrefparam->data) { soap_print_fault(s, stderr); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); return -1; } @@ -773,6 +811,9 @@ refparams = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element)*numrefparams); if (refparams == NULL) { soap_print_fault(s, stderr); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); return -1; } memset(refparams, 0, sizeof(struct soap_dom_element)*numrefparams); @@ -794,6 +835,10 @@ iter = iter->next; } + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); + return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-04-11 23:03:36
|
Revision: 34 http://bespp.svn.sourceforge.net/bespp/?rev=34&view=rev Author: csmith Date: 2008-04-11 16:03:42 -0700 (Fri, 11 Apr 2008) Log Message: ----------- - added more description of besclient options - fixed core dump in besclient with gSOAP 2.7.10 Modified Paths: -------------- trunk/README.txt trunk/besclient/besclient.c Modified: trunk/README.txt =================================================================== --- trunk/README.txt 2008-04-10 00:31:18 UTC (rev 33) +++ trunk/README.txt 2008-04-11 23:03:42 UTC (rev 34) @@ -157,6 +157,17 @@ Note that in BES an "Activity" is the same as a "Job" in LSF or other resource managers. +A BES client will use SSL/TLS to connect to a BES service, and will use +SSL/TLS server authentication using X.509 certificates. This requires +the besclient user to set up a directory of "trusted" certificate files +(either actual server certificates, or trusted CAs). See the -capath +option for more details on the contents of this directory. + +The besclient program will support using either WS-Security's UsernameToken +for client authentication (i.e. username and password), or can authenticate +using X.509 certificates. The mechanism used will depend on the BES service +being used. + There is a sample JSDL document in besclient/sleep.jsdl that should run on pretty much any UNIX type system through LSF if an example job is needed. @@ -202,8 +213,16 @@ -e endpoint.xml the name of a file containing the EPR for the BES service to contact. - Default is './endpoint.xml'. + Default is './endpoint.xml'. EPRs for different BES services will + vary slightly, so you will need to get this EPR from the provider + of the BES service. The format of a BES++ BES service looks like + the following: + <?xml version="1.0" encoding="UTF-8"?> + <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"> + <wsa:Address>https://myhost.mydomain.com:443</wsa:Address> + </wsa:EndpointReference> + -u username the username to use when authenticating to the server using username and password authentication. Modified: trunk/besclient/besclient.c =================================================================== --- trunk/besclient/besclient.c 2008-04-10 00:31:18 UTC (rev 33) +++ trunk/besclient/besclient.c 2008-04-11 23:03:42 UTC (rev 34) @@ -267,11 +267,11 @@ perror("Cannot open JSDL file."); exit(1); } - dom.soap = s; - s->recvfd = jsdl; - if (soap_begin_recv(s) - || soap_in_xsd__anyType(s, NULL, &dom, NULL) == NULL - || soap_end_recv(s)) { + dom.soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); + dom.soap->recvfd = jsdl; + if (soap_begin_recv(dom.soap) + || soap_in_xsd__anyType(dom.soap, NULL, &dom, NULL) == NULL + || soap_end_recv(dom.soap)) { soap_print_fault(dom.soap, stderr); exit(1); } @@ -308,6 +308,10 @@ printf("Successfully submitted activity. Wrote EPR to %s\n.", activityepr); } + soap_end(dom.soap); + soap_done(dom.soap); + free(dom.soap); + return 0; } @@ -330,11 +334,11 @@ exit(1); } - dom.soap = s; - s->recvfd = epr; - if (soap_begin_recv(s) - || soap_in_xsd__anyType(s, NULL, &dom, NULL) == NULL - || soap_end_recv(s)) { + dom.soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); + dom.soap->recvfd = epr; + if (soap_begin_recv(dom.soap) + || soap_in_xsd__anyType(dom.soap, NULL, &dom, NULL) == NULL + || soap_end_recv(dom.soap)) { soap_print_fault(dom.soap, stderr); exit(1); } @@ -359,6 +363,10 @@ } } + soap_end(dom.soap); + soap_done(dom.soap); + free(dom.soap); + return 0; } @@ -388,12 +396,12 @@ } memset(dom, 0, sizeof(struct soap_dom_element)); - dom->soap = s; - s->recvfd = epr; - if (soap_begin_recv(s) - || soap_in_xsd__anyType(s, NULL, dom, NULL) == NULL - || soap_end_recv(s)) { - soap_print_fault(s, stderr); + dom->soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); + dom->soap->recvfd = epr; + if (soap_begin_recv(dom->soap) + || soap_in_xsd__anyType(dom->soap, NULL, dom, NULL) == NULL + || soap_end_recv(dom->soap)) { + soap_print_fault(dom->soap, stderr); exit(1); } close(epr); @@ -409,6 +417,10 @@ fprintf(stdout, "Got result from server\n"); printDom(s, rsp.__any, 0); } + + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); return 0; } @@ -442,12 +454,12 @@ } memset(dom, 0, sizeof(struct soap_dom_element)); - dom->soap = s; - s->recvfd = epr; - if (soap_begin_recv(s) - || soap_in_xsd__anyType(s, NULL, dom, NULL) == NULL - || soap_end_recv(s)) { - soap_print_fault(s, stderr); + dom->soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); + dom->soap->recvfd = epr; + if (soap_begin_recv(dom->soap) + || soap_in_xsd__anyType(dom->soap, NULL, dom, NULL) == NULL + || soap_end_recv(dom->soap)) { + soap_print_fault(dom->soap, stderr); exit(1); } close(epr); @@ -516,6 +528,10 @@ if(fault&&activityPresent) *status="UnknownActivityIdentifierFault but identifier was seen in the system before."; + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); + return terminated; } @@ -546,12 +562,12 @@ } memset(dom, 0, sizeof(struct soap_dom_element)); - dom->soap = s; - s->recvfd = epr; - if (soap_begin_recv(s) - || soap_in_xsd__anyType(s, NULL, dom, NULL) == NULL - || soap_end_recv(s)) { - soap_print_fault(s, stderr); + dom->soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); + dom->soap->recvfd = epr; + if (soap_begin_recv(dom->soap) + || soap_in_xsd__anyType(dom->soap, NULL, dom, NULL) == NULL + || soap_end_recv(dom->soap)) { + soap_print_fault(dom->soap, stderr); exit(1); } close(epr); @@ -568,6 +584,10 @@ printDom(s, rsp.__any, 0); } + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); + return 0; } @@ -694,12 +714,15 @@ soap_set_namespaces(s, epr_namespaces); - dom->soap = s; + dom->soap = soap_new1(SOAP_DOM_TREE|SOAP_C_UTFSTRING); dom->soap->recvfd = epr; if (soap_begin_recv(dom->soap) || soap_in_xsd__anyType(dom->soap, NULL, dom, NULL) == NULL || soap_end_recv(dom->soap)) { soap_print_fault(dom->soap, stderr); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); soap_set_namespaces(s, namespaces); return -1; } @@ -710,11 +733,17 @@ iter = dom->elts; if (!iter || !isElement(iter, WSA_NS, "Address")) { fprintf(stderr, "%s does not contain a valid EPR.", eprfile); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); return -1; } endpoint = soap_strdup(s, iter->data); if (endpoint == NULL) { soap_print_fault(s, stderr); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); return -1; } s->header->wsa__To.__item = endpoint; @@ -723,6 +752,9 @@ s->header->wsa__Action.__item = soap_strdup(s, action); if (s->header->wsa__Action.__item == NULL) { soap_print_fault(s, stderr); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); return -1; } @@ -732,6 +764,9 @@ isrefparam = (struct soap_dom_attribute*)soap_malloc(s, sizeof(struct soap_dom_attribute)); if (isrefparam == NULL) { soap_print_fault(s, stderr); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); return -1; } memset(isrefparam, 0, sizeof(struct soap_dom_attribute)); @@ -741,6 +776,9 @@ isrefparam->data = soap_strdup(s, "true"); if (!isrefparam->name || !isrefparam->data) { soap_print_fault(s, stderr); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); return -1; } @@ -773,6 +811,9 @@ refparams = (struct soap_dom_element*)soap_malloc(s, sizeof(struct soap_dom_element)*numrefparams); if (refparams == NULL) { soap_print_fault(s, stderr); + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); return -1; } memset(refparams, 0, sizeof(struct soap_dom_element)*numrefparams); @@ -794,6 +835,10 @@ iter = iter->next; } + soap_end(dom->soap); + soap_done(dom->soap); + free(dom->soap); + return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-04-10 00:31:13
|
Revision: 33 http://bespp.svn.sourceforge.net/bespp/?rev=33&view=rev Author: csmith Date: 2008-04-09 17:31:18 -0700 (Wed, 09 Apr 2008) Log Message: ----------- Tagging the 1.0.1 release of BES++. Added Paths: ----------- tags/release-1.0.1/ Copied: tags/release-1.0.1 (from rev 32, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-04-10 00:25:44
|
Revision: 32 http://bespp.svn.sourceforge.net/bespp/?rev=32&view=rev Author: csmith Date: 2008-04-09 17:25:49 -0700 (Wed, 09 Apr 2008) Log Message: ----------- Made changes to support gSOAP 2.7.10 Modified Paths: -------------- trunk/Make.config trunk/README.txt trunk/besclient/Makefile trunk/besserver/Makefile trunk/config.h Modified: trunk/Make.config =================================================================== --- trunk/Make.config 2008-01-14 03:40:52 UTC (rev 31) +++ trunk/Make.config 2008-04-10 00:25:49 UTC (rev 32) @@ -1,19 +1,24 @@ # # gSOAP related variables # -# You must set this to the top of your compiled gSOAP -# source distribution -GSOAP_TOP = /home/csmith/src/gsoap-2.7 +# You must set this to the location of your compiled gSOAP +# source distribution. This directory will contain the +# 'import', 'plugin', 'src' and 'wsdl' sub-directories. +GSOAP_TOP = /home/csmith/src/gsoap-2.7/gsoap # # LSF related variables # +# LSF_LOC is where the 'include' and architecture specific +# directories are located. +LSF_LOC = /usr/local/lsf/7.0 +# Set to the appropriate architecture name depending on +# the machine you are building BES++ on. LSF_ARCH = linux2.6-glibc2.3-x86_64 #LSF_ARCH = linux2.6-glibc2.3-x86 #LSF_ARCH = macosx -LSF_TOP = /sw/lsf/7.0 -LSF_INC = -I$(LSF_TOP)/include -LSF_LIB = $(LSF_TOP)/$(LSF_ARCH)/lib +LSF_INC = -I$(LSF_LOC)/include +LSF_LIB = $(LSF_LOC)/$(LSF_ARCH)/lib # need to uncomment only one of the following #LSF_LIBS = -L$(LSF_LIB) -lbat -llsf LSF_LIBS = $(LSF_LIB)/libbat.a $(LSF_LIB)/liblsf.a Modified: trunk/README.txt =================================================================== --- trunk/README.txt 2008-01-14 03:40:52 UTC (rev 31) +++ trunk/README.txt 2008-04-10 00:25:49 UTC (rev 32) @@ -30,7 +30,7 @@ In order to build the BES++ software you need to use the gSOAP Toolkit (http://sourceforge.net/projects/gsoap2) to generate SOAP proxy code. -The version currently used for development is gsoap 2.7.9l. Your mileage +The version currently used for development is gsoap 2.7.10. Your mileage may vary with other versions. Before building BES++, make sure and compile the gSOAP distribution (you don't actually need to install it). @@ -49,12 +49,12 @@ a) GSOAP_TOP to the top-level directory of the gSOAP distribution that you have built. - b) Adjust the LSF parameters to reflect top of the LSF distribution, - and to indicate the architecture that your are building on. If - you are not sure which architecture to use, and your environment - is already setup to use LSF, you can run a command like - 'which lsid' to see which architecture specific directory is - appropriate for your machine. + b) Adjust the LSF parameters to reflect the location of the LSF + distribution and to indicate the architecture that your are + building on. If you are not sure which architecture to use, and + your environment is already setup to use LSF, you can run a + command like 'which lsid' to see which architecture specific + directory is appropriate for your machine. c) If you need to set any extra paths to headers files or libraries, use the EXTRA_* macros. Modified: trunk/besclient/Makefile =================================================================== --- trunk/besclient/Makefile 2008-01-14 03:40:52 UTC (rev 31) +++ trunk/besclient/Makefile 2008-04-10 00:25:49 UTC (rev 32) @@ -1,12 +1,12 @@ TOP = .. include $(TOP)/Make.config -GSOAP_PLUGIN = $(GSOAP_TOP)/soapcpp2/plugin -GSOAP_IMPORT = $(GSOAP_TOP)/soapcpp2/import -GSOAP_INC = -I$(GSOAP_TOP)/soapcpp2 -I$(GSOAP_PLUGIN) +GSOAP_PLUGIN = $(GSOAP_TOP)/plugin +GSOAP_IMPORT = $(GSOAP_TOP)/import +GSOAP_INC = -I$(GSOAP_TOP) -I$(GSOAP_PLUGIN) GSOAP_DEF = -DDEBUG -DWITH_DOM -DWITH_OPENSSL -SOAPCPP2 = $(GSOAP_TOP)/soapcpp2/src/soapcpp2 -LCxc -I$(GSOAP_IMPORT) -WSDL2H = $(GSOAP_TOP)/soapcpp2/wsdl/wsdl2h -cdegy +SOAPCPP2 = $(GSOAP_TOP)/src/soapcpp2 -LCxc -I$(GSOAP_IMPORT) +WSDL2H = $(GSOAP_TOP)/wsdl/wsdl2h -cdegy -I$(GSOAP_IMPORT) SCHEMAS = http://schemas.ggf.org/jsdl/2006/07/jsdl-hpcpa \ http://schemas.ggf.org/jsdl/2005/11/jsdl-posix @@ -36,11 +36,11 @@ soapClient.o: soapClient.c soapC.o: soapC.c -stdsoap2_ssl.o: $(GSOAP_TOP)/soapcpp2/stdsoap2_ssl.c - $(CC) $(CFLAGS) -c $(GSOAP_TOP)/soapcpp2/stdsoap2_ssl.c +stdsoap2_ssl.o: $(GSOAP_TOP)/stdsoap2_ssl.c + $(CC) $(CFLAGS) -c $(GSOAP_TOP)/stdsoap2_ssl.c -dom.o: $(GSOAP_TOP)/soapcpp2/dom.c - $(CC) $(CFLAGS) -c $(GSOAP_TOP)/soapcpp2/dom.c +dom.o: $(GSOAP_TOP)/dom.c + $(CC) $(CFLAGS) -c $(GSOAP_TOP)/dom.c smdevp.o: $(GSOAP_PLUGIN)/smdevp.c $(GSOAP_PLUGIN)/smdevp.h $(CC) $(CFLAGS) -c $(GSOAP_PLUGIN)/smdevp.c Modified: trunk/besserver/Makefile =================================================================== --- trunk/besserver/Makefile 2008-01-14 03:40:52 UTC (rev 31) +++ trunk/besserver/Makefile 2008-04-10 00:25:49 UTC (rev 32) @@ -1,12 +1,12 @@ TOP = .. include $(TOP)/Make.config -GSOAP_PLUGIN = $(GSOAP_TOP)/soapcpp2/plugin -GSOAP_IMPORT = $(GSOAP_TOP)/soapcpp2/import -GSOAP_INC = -I$(GSOAP_TOP)/soapcpp2 -I$(GSOAP_PLUGIN) +GSOAP_PLUGIN = $(GSOAP_TOP)/plugin +GSOAP_IMPORT = $(GSOAP_TOP)/import +GSOAP_INC = -I$(GSOAP_TOP) -I$(GSOAP_PLUGIN) GSOAP_DEF = -DDEBUG -DWITH_DOM -DWITH_OPENSSL -SOAPCPP2 = $(GSOAP_TOP)/soapcpp2/src/soapcpp2 -LSxc -I$(GSOAP_IMPORT) -WSDL2H = $(GSOAP_TOP)/soapcpp2/wsdl/wsdl2h -cdegy +SOAPCPP2 = $(GSOAP_TOP)/src/soapcpp2 -LSxc -I$(GSOAP_IMPORT) +WSDL2H = $(GSOAP_TOP)/wsdl/wsdl2h -cdegy -I$(GSOAP_IMPORT) SCHEMAS = http://schemas.ggf.org/jsdl/2006/07/jsdl-hpcpa \ # http://schemas.ggf.org/jsdl/2005/11/jsdl-posix @@ -42,15 +42,12 @@ soapClient.o: soapClient.c soapC.o: soapC.c -stdsoap2_ssl.o: $(GSOAP_TOP)/soapcpp2/stdsoap2_ssl.c - $(CC) $(CFLAGS) -c $(GSOAP_TOP)/soapcpp2/stdsoap2_ssl.c +stdsoap2.o: $(GSOAP_TOP)/stdsoap2.c + $(CC) $(CFLAGS) -c $(GSOAP_TOP)/stdsoap2.c -stdsoap2.o: $(GSOAP_TOP)/soapcpp2/stdsoap2.c - $(CC) $(CFLAGS) -c $(GSOAP_TOP)/soapcpp2/stdsoap2.c +dom.o: $(GSOAP_TOP)/dom.c + $(CC) $(CFLAGS) -c $(GSOAP_TOP)/dom.c -dom.o: $(GSOAP_TOP)/soapcpp2/dom.c - $(CC) $(CFLAGS) -c $(GSOAP_TOP)/soapcpp2/dom.c - smdevp.o: $(GSOAP_PLUGIN)/smdevp.c $(GSOAP_PLUGIN)/smdevp.h $(CC) $(CFLAGS) -c $(GSOAP_PLUGIN)/smdevp.c Modified: trunk/config.h =================================================================== --- trunk/config.h 2008-01-14 03:40:52 UTC (rev 31) +++ trunk/config.h 2008-04-10 00:25:49 UTC (rev 32) @@ -8,7 +8,7 @@ /* You probably don't need to change these. */ /* Setting the VERSION_STRING macro determines what is output */ /* when using the -V option to besclient and besserver */ -#define VERSION_STRING "BES++ 1.0, 2008-01-14" +#define VERSION_STRING "BES++ 1.0.1, 2008-04-09" /* Don't change this one */ #define COPYRIGHT "Copyright (C) 2007-2008 Platform Computing Corporation" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-01-14 03:40:46
|
Revision: 31 http://bespp.svn.sourceforge.net/bespp/?rev=31&view=rev Author: csmith Date: 2008-01-13 19:40:52 -0800 (Sun, 13 Jan 2008) Log Message: ----------- Tagging the 1.0.0 release of BES++. Added Paths: ----------- tags/release-1.0.0/ Copied: tags/release-1.0.0 (from rev 30, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-01-14 03:38:12
|
Revision: 30 http://bespp.svn.sourceforge.net/bespp/?rev=30&view=rev Author: csmith Date: 2008-01-13 19:38:17 -0800 (Sun, 13 Jan 2008) Log Message: ----------- - adding tags Added Paths: ----------- tags/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-01-14 03:34:34
|
Revision: 29 http://bespp.svn.sourceforge.net/bespp/?rev=29&view=rev Author: csmith Date: 2008-01-13 19:34:39 -0800 (Sun, 13 Jan 2008) Log Message: ----------- - setting up area for code branches Added Paths: ----------- branches/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-01-14 03:29:30
|
Revision: 28 http://bespp.svn.sourceforge.net/bespp/?rev=28&view=rev Author: csmith Date: 2008-01-13 19:29:31 -0800 (Sun, 13 Jan 2008) Log Message: ----------- - more restructuring Removed Paths: ------------- trunk/bespp/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-01-14 03:28:23
|
Revision: 27 http://bespp.svn.sourceforge.net/bespp/?rev=27&view=rev Author: csmith Date: 2008-01-13 19:28:26 -0800 (Sun, 13 Jan 2008) Log Message: ----------- - restructuring repository Added Paths: ----------- trunk/Make.config trunk/Makefile trunk/README.txt trunk/bes-factory.wsdl trunk/bes-factory.xsd trunk/besclient/ trunk/besserver/ trunk/config.h trunk/gpl.txt Removed Paths: ------------- trunk/bespp/Make.config trunk/bespp/Makefile trunk/bespp/README.txt trunk/bespp/bes-factory.wsdl trunk/bespp/bes-factory.xsd trunk/bespp/besclient/ trunk/bespp/besserver/ trunk/bespp/config.h trunk/bespp/gpl.txt Copied: trunk/Make.config (from rev 26, trunk/bespp/Make.config) =================================================================== --- trunk/Make.config (rev 0) +++ trunk/Make.config 2008-01-14 03:28:26 UTC (rev 27) @@ -0,0 +1,29 @@ +# +# gSOAP related variables +# +# You must set this to the top of your compiled gSOAP +# source distribution +GSOAP_TOP = /home/csmith/src/gsoap-2.7 + +# +# LSF related variables +# +LSF_ARCH = linux2.6-glibc2.3-x86_64 +#LSF_ARCH = linux2.6-glibc2.3-x86 +#LSF_ARCH = macosx +LSF_TOP = /sw/lsf/7.0 +LSF_INC = -I$(LSF_TOP)/include +LSF_LIB = $(LSF_TOP)/$(LSF_ARCH)/lib +# need to uncomment only one of the following +#LSF_LIBS = -L$(LSF_LIB) -lbat -llsf +LSF_LIBS = $(LSF_LIB)/libbat.a $(LSF_LIB)/liblsf.a + +# +# Any extra include and lib directories, or libraries +# +# -lnsl needed for Linux systems +# +#EXTRA_INC = -I/usr/local/include +#EXTRA_LIB = -L/usr/local/lib +EXTRA_LIBS = -lnsl + Copied: trunk/Makefile (from rev 26, trunk/bespp/Makefile) =================================================================== --- trunk/Makefile (rev 0) +++ trunk/Makefile 2008-01-14 03:28:26 UTC (rev 27) @@ -0,0 +1,12 @@ +all: server client + +server: + make -C besserver + +client: + make -C besclient + +clean: + make -C besserver clean + make -C besclient clean + Copied: trunk/README.txt (from rev 26, trunk/bespp/README.txt) =================================================================== --- trunk/README.txt (rev 0) +++ trunk/README.txt 2008-01-14 03:28:26 UTC (rev 27) @@ -0,0 +1,248 @@ +Introduction +============ + +BES++ is an implementation of the OGSA Basic Execution Service (BES) +which is a standardized (http://www.ogf.org/documents/GFD.108.pdf) +SOAP-based Web services interface for submitting and managing jobs +running under the control of a resource manager. The BES++ code +was contributed by Platform Computing (http://www.platform.com) after +some HPC Basic Profile interoperability testing that occurred +during the SuperComputing conferences in 2006 and 2007. + +The goals of the BES++ project are: + +- Provide a reference implementation of OGSA-BES that is compliant + with the HPC Basic Profile (http://www.ogf.org/documents/GFD.114.pdf). + +- Provide this implementation as Open Source Software, in order to + encourage the adoption of the standards. + +- Become a vehicle for the development of extensions to the current + specifications according to the needs of the HPC and Grid computing + communities. + +You can always access the latest release of BES++ from +http://sourceforge.net/projects/bespp. + + +Building and Installing +======================= + +In order to build the BES++ software you need to use the gSOAP Toolkit +(http://sourceforge.net/projects/gsoap2) to generate SOAP proxy code. +The version currently used for development is gsoap 2.7.9l. Your mileage +may vary with other versions. Before building BES++, make sure and +compile the gSOAP distribution (you don't actually need to install it). + +Currently BES++ only supports the Platform LSF resource manager. Make +sure that LSF is installed on the machine on which you are building the +BES++ code, as you will need access to the LSF header files and libraries. + +Building the software +--------------------- + +1. Edit config.h in the top level bespp directory to adjust any needed + parameters. See comments in the file for guidance on what to change. + +2. Edit Make.config in the top level bespp directory and set: + + a) GSOAP_TOP to the top-level directory of the gSOAP distribution + that you have built. + + b) Adjust the LSF parameters to reflect top of the LSF distribution, + and to indicate the architecture that your are building on. If + you are not sure which architecture to use, and your environment + is already setup to use LSF, you can run a command like + 'which lsid' to see which architecture specific directory is + appropriate for your machine. + + c) If you need to set any extra paths to headers files or + libraries, use the EXTRA_* macros. + +3. Type 'make'. If all goes well, there will be a besclient binary + in the besclient sub-directory, and a besserver binary in the + besserver sub-directory. + +Installing the software +----------------------- + +You can copy the besclient and besserver binaries wherever you wish +as they have no components which are required to be in any particular +directory. + +If you would like to support the use of user name and password authentication +using PAM, you will need to create a PAM configuration file and install +it into the appropriate place on your system ('man pam.conf' will usually +provide some information on the location ... usually /etc/pam.d). Two +sample pam.conf files are provided in the besserver/samples sub-directory. + +You will need an X.509 certificate for the BES++ service. This can be +a self-signed certificate (see documentation from OpenSSL for information +about this topic) or a certificate from a valid certificate authority. Note +that the PEM formatted file used to contain the server certificate must +include both the certificate and the corresponding private key. + + +Running the besserver +===================== + +Note: in order to run the besserver, it must be able to connect to +your LSF environment. The besserver can be run on any node in the LSF +cluster (including a client-only machine). Make sure and have the LSF +environment variables properly initialized before starting the besserver. +This can be easily accomplished with a shell script wrapper. There is +a sample wrapper in the besserver/samples sub-directory. + +In most cases, the besserver must be started as the root user. This allows +the service to authenticate users using user name and password using +PAM, and then to impersonate the user when submitting and controlling +jobs. The besserver can be run as a regular user, but this is only +supported when: a) SSL mutual authentication is used, and b) all jobs +are submitted and managed as the user running the service. + +besserver takes the following options: + +-u service_user + specifies under which user account the service will run. + Required argument. + +-h hostname + the hostname of the service endpoint. This will also determine which + interfaces the gSOAP stack will bind to for listening for requests. + Default is 'localhost'. + +-p port + the port of the service endpoint. + Default is 443. + +-s server.pem + the file containing the X.509 certificate and corresponding private + key in PEM format for the service. + Default is './server.pem'. + +-e service_endpoint + a URL that indicates to clients how to connect to this service. By + default the endpoint is determined from the hostname and port, but + in some cases (e.g. service is addressed on the internet using a + CNAME alias) it is useful to override the default. + Default is 'https://<hostname>:<port>'. + +-c capath + the directory in which CA certificates are kept for the purpose + of authenticating clients via SSL. Each certificate should be + in a separate file, and should be named '<hash>.0', where <hash> + is determined from the 'openssl x509 -hash' command. + Default is './certs'. + +-g generic_user + specifies the user id under which jobs are run when authenticating + clients via SSL + +-V + the besserver prints out version information and then exits. + +-? + the besserver prints out usage information and then exits. + + + +Using the besclient +=================== + +The besclient program is used to make client requests to a BES service +(any BES compliant service, not just a BES++ service) in order to +submit, control and monitor jobs, and to query the BES service +attributes. + +Note that in BES an "Activity" is the same as a "Job" in LSF or other +resource managers. + +There is a sample JSDL document in besclient/sleep.jsdl that should run +on pretty much any UNIX type system through LSF if an example job is needed. + +The basic command syntax of besclient is: + + besclient <options> <command> <command args> + +The besclient supports the following commands: + +create <JSDL document> <activity epr file> + calls CreateActivity operation using the provided JSDL document + as the input to the operation. On success, the returned activity + EPR is placed in the file indicated by <activity epr file> for use + in other operations. + +status <activity epr file> + calls GetActivityStatuses operation for the activity EPR that is + contained in the provided file. The returned activity status is + printed on stdout. + +terminate <activity epr file> + calls TerminateActivities operation for the activity EPR that is + contained in the provided file. Success or failure of the operation + is indicated on stdout. + +activity <activity epr file> + calls GetActivityDocuments operation for the activity EPR that is + contained in the provided file. Information about the activity is + printed to stdout. + +factory + calls GetFactoryAttributesDocument operation and prints information + about the BES service on stdout. + +besclient takes the following options: + +-c capath + the directory in which CA certificates are kept for the purpose + of authenticating the BES service via SSL. Each certificate should + be in a separate file, and should be named '<hash>.0', where <hash> + is determined from the 'openssl x509 -hash' command. + Default is './certs'. + +-e endpoint.xml + the name of a file containing the EPR for the BES service to contact. + Default is './endpoint.xml'. + +-u username + the username to use when authenticating to the server using username + and password authentication. + One of -u or -x is required (not both). + +-p password + the password to use when authenticating to the server using username + and password authentication. + Default is to prompt for the password from stdin. + +-x client.pem + a file in PEM format containing the X.509 certificate and corresponding + private key that identifies the client to the BES service when + authenticating using SSL mutual authentication. + One of -x or -u is required (not both). + +-k keypassphrase + the passphrase used to encrypt the client certificate. + Default is to prompt for the key's passphrase from stdin. + +-V + the besserver prints out version information and then exits. + +-? + the besserver prints out usage information and then exits. + + +License +======= + +BES++ is distributed under the terms of the GPL version 2 license. +See the file gpl.txt for a description of the terms and conditions +for copying, distribution and modification. + + +Copyright +========= + +BES++ is copyrighted by Platform Computing Corp. +Copyright (C) 2007-2008 Platform Computing Corp. +All Rights Reserved + Copied: trunk/bes-factory.wsdl (from rev 26, trunk/bespp/bes-factory.wsdl) =================================================================== --- trunk/bes-factory.wsdl (rev 0) +++ trunk/bes-factory.wsdl 2008-01-14 03:28:26 UTC (rev 27) @@ -0,0 +1,446 @@ +<wsdl:definitions name="BESFactory" + targetNamespace="http://schemas.ggf.org/bes/2006/08/bes-factory" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:bes-factory="http://schemas.ggf.org/bes/2006/08/bes-factory" + xmlns:wsa="http://www.w3/org/2005/08/addressing" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > + + <wsdl:types> + <xsd:schema + xmlns:wsa="http://www.w3.org/2005/08/addressing" + attributeFormDefault="unqualified" + elementFormDefault="qualified" + targetNamespace="http://schemas.ggf.org/bes/2006/08/bes-factory"> + + <xsd:include schemaLocation="bes-factory.xsd"/> + + <!-- Message Types --> + <xsd:complexType name="CreateActivityType"> + <xsd:sequence> + <xsd:element ref="bes-factory:ActivityDocument"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="CreateActivityResponseType"> + <xsd:sequence> + <xsd:element name="ActivityIdentifier" type="wsa:EndpointReferenceType"/> + <xsd:element ref="bes-factory:ActivityDocument" minOccurs="0"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="GetActivityStatusesType"> + <xsd:sequence> + <xsd:element name="ActivityIdentifier" type="wsa:EndpointReferenceType" maxOccurs="unbounded" minOccurs="0"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="GetActivityStatusesResponseType"> + <xsd:sequence> + <xsd:element name="Response" type="bes-factory:GetActivityStatusResponseType" maxOccurs="unbounded" minOccurs="0"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="TerminateActivitiesType"> + <xsd:sequence> + <xsd:element name="ActivityIdentifier" type="wsa:EndpointReferenceType" minOccurs="0" maxOccurs="unbounded"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="TerminateActivitiesResponseType"> + <xsd:sequence> + <xsd:element name="Response" type="bes-factory:TerminateActivityResponseType" minOccurs="0" maxOccurs="unbounded"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="GetActivityDocumentsType"> + <xsd:sequence> + <xsd:element name="ActivityIdentifier" type="wsa:EndpointReferenceType" minOccurs="0" maxOccurs="unbounded"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="GetActivityDocumentsResponseType"> + <xsd:sequence> + <xsd:element name="Response" type="bes-factory:GetActivityDocumentResponseType" minOccurs="0" maxOccurs="unbounded"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="GetFactoryAttributesDocumentType"> + <xsd:sequence> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="GetFactoryAttributesDocumentResponseType"> + <xsd:sequence> + <xsd:element ref="bes-factory:FactoryResourceAttributesDocument"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <!-- Fault Types --> + <xsd:complexType name="NotAuthorizedFaultType"> + <xsd:sequence> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="NotAcceptingNewActivitiesFaultType"> + <xsd:sequence> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="UnsupportedFeatureFaultType"> + <xsd:sequence> + <xsd:element name="Feature" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="CantApplyOperationToCurrentStateFaultType"> + <xsd:sequence> + <xsd:element name="ActivityStatus" type="bes-factory:ActivityStatusType" /> + <xsd:element name="Message" type="xsd:string"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="OperationWillBeAppliedEventuallyFaultType"> + <xsd:sequence> + <xsd:element name="ActivityStatus" type="bes-factory:ActivityStatusType" /> + <xsd:element name="Message" type="xsd:string"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="InvalidActivityIdentifierFaultType"> + <xsd:sequence> + <xsd:element name="Message" type="xsd:string"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="InvalidRequestMessageFaultType"> + <xsd:sequence> + <xsd:element name="InvalidElement" type="xsd:string" minOccurs="0" maxOccurs ="unbounded"/> + <xsd:element name="Message" type="xsd:string"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <!-- Message Elements --> + <xsd:element name="CreateActivity" + type="bes-factory:CreateActivityType"/> + <xsd:element name="CreateActivityResponse" + type="bes-factory:CreateActivityResponseType"/> + <xsd:element name="GetActivityStatuses" + type="bes-factory:GetActivityStatusesType"/> + <xsd:element name="GetActivityStatusesResponse" + type="bes-factory:GetActivityStatusesResponseType"/> + <xsd:element name="TerminateActivities" + type="bes-factory:TerminateActivitiesType"/> + <xsd:element name="TerminateActivitiesResponse" + type="bes-factory:TerminateActivitiesResponseType"/> + <xsd:element name="GetActivityDocuments" + type="bes-factory:GetActivityDocumentsType"/> + <xsd:element name="GetActivityDocumentsResponse" + type="bes-factory:GetActivityDocumentsResponseType"/> + <xsd:element name="GetFactoryAttributesDocument" + type="bes-factory:GetFactoryAttributesDocumentType"/> + <xsd:element name="GetFactoryAttributesDocumentResponse" + type="bes-factory:GetFactoryAttributesDocumentResponseType"/> + + <!-- Fault Elements --> + <xsd:element name="NotAuthorizedFault" + type="bes-factory:NotAuthorizedFaultType"/> + <xsd:element name="NotAcceptingNewActivitiesFault" + type="bes-factory:NotAcceptingNewActivitiesFaultType"/> + <xsd:element name="UnsupportedFeatureFault" + type="bes-factory:UnsupportedFeatureFaultType"/> + <xsd:element name="CantApplyOperationToCurrentStateFault" + type="bes-factory:CantApplyOperationToCurrentStateFaultType"/> + <xsd:element name="OperationWillBeAppliedEventuallyFault" + type="bes-factory:OperationWillBeAppliedEventuallyFaultType"/> + <xsd:element name="InvalidActivityIdentifierFault" + type="bes-factory:InvalidActivityIdentifierFaultType"/> + <xsd:element name="InvalidRequestMessageFault" + type="bes-factory:InvalidRequestMessageFaultType"/> + </xsd:schema> + </wsdl:types> + + <!-- Messages --> + <wsdl:message name="CreateActivityRequest"> + <wsdl:part name="parameters" + element="bes-factory:CreateActivity"/> + </wsdl:message> + + <wsdl:message name="CreateActivityResponse"> + <wsdl:part name="parameters" + element="bes-factory:CreateActivityResponse"/> + </wsdl:message> + + <wsdl:message name="GetActivityStatusesRequest"> + <wsdl:part name="parameters" + element="bes-factory:GetActivityStatuses"/> + </wsdl:message> + + <wsdl:message name="GetActivityStatusesResponse"> + <wsdl:part name="parameters" + element="bes-factory:GetActivityStatusesResponse"/> + </wsdl:message> + + <wsdl:message name="TerminateActivitiesRequest"> + <wsdl:part name="parameters" + element="bes-factory:TerminateActivities"/> + </wsdl:message> + + <wsdl:message name="TerminateActivitiesResponse"> + <wsdl:part name="parameters" + element="bes-factory:TerminateActivitiesResponse"/> + </wsdl:message> + + <wsdl:message name="GetActivityDocumentsRequest"> + <wsdl:part name="parameters" + element="bes-factory:GetActivityDocuments"/> + </wsdl:message> + + <wsdl:message name="GetActivityDocumentsResponse"> + <wsdl:part name="parameters" + element="bes-factory:GetActivityDocumentsResponse"/> + </wsdl:message> + + <wsdl:message name="GetFactoryAttributesDocumentRequest"> + <wsdl:part name="parameters" + element="bes-factory:GetFactoryAttributesDocument"/> + </wsdl:message> + + <wsdl:message name="GetFactoryAttributesDocumentResponse"> + <wsdl:part name="parameters" + element="bes-factory:GetFactoryAttributesDocumentResponse"/> + </wsdl:message> + + <!-- Fault Messages --> + <wsdl:message name="NotAuthorizedFault"> + <wsdl:part name="Detail" + element="bes-factory:NotAuthorizedFault"/> + </wsdl:message> + + <wsdl:message name="NotAcceptingNewActivitiesFault"> + <wsdl:part name="Detail" + element="bes-factory:NotAcceptingNewActivitiesFault"/> + </wsdl:message> + + <wsdl:message name="UnsupportedFeatureFault"> + <wsdl:part name="Detail" + element="bes-factory:UnsupportedFeatureFault"/> + </wsdl:message> + + <wsdl:message name="CantApplyOperationToCurrentStateFault"> + <wsdl:part name="Detail" + element="bes-factory:CantApplyOperationToCurrentStateFault" /> + </wsdl:message> + + <wsdl:message name="OperationWillBeAppliedEventuallyFault"> + <wsdl:part name="Detail" + element="bes-factory:OperationWillBeAppliedEventuallyFault" /> + </wsdl:message> + + <wsdl:message name="InvalidActivityIdentifierFault"> + <wsdl:part name="Detail" + element="bes-factory:InvalidActivityIdentifierFault" /> + </wsdl:message> + + <wsdl:message name="InvalidRequestMessageFault"> + <wsdl:part name="Detail" + element="bes-factory:InvalidRequestMessageFault" /> + </wsdl:message> + + <!-- Port Type --> + <wsdl:portType name="BESFactoryPortType"> + + <wsdl:operation name="CreateActivity"> + <wsdl:input + name="CreateActivity" + message="bes-factory:CreateActivityRequest" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/CreateActivity"/> + <wsdl:output + name="CreateActivityResponse" + message="bes-factory:CreateActivityResponse" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/CreateActivityResponse"/> + <wsdl:fault name="NotAuthorizedFault" + message="bes-factory:NotAuthorizedFault" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/Fault"/> + <wsdl:fault name="NotAcceptingNewActivitiesFault" + message="bes-factory:NotAcceptingNewActivitiesFault" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/Fault"/> + <wsdl:fault name="UnsupportedFeatureFault" + message="bes-factory:UnsupportedFeatureFault" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/Fault"/> + <wsdl:fault name="InvalidRequestMessageFault" + message="bes-factory:InvalidRequestMessageFault" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/Fault"/> + </wsdl:operation> + + <wsdl:operation name="GetActivityStatuses"> + <wsdl:input + name="GetActivityStatuses" + message="bes-factory:GetActivityStatusesRequest" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetActivityStatuses"/> + <wsdl:output + name="GetActivityStatusesResponse" + message="bes-factory:GetActivityStatusesResponse" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetActivityStatusesResponse"/> + <wsdl:fault name="InvalidRequestMessageFault" + message="bes-factory:InvalidRequestMessageFault" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/Fault"/> + </wsdl:operation> + + <wsdl:operation name="TerminateActivities"> + <wsdl:input + name="TerminateActivities" + message="bes-factory:TerminateActivitiesRequest" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/TerminateActivities"/> + <wsdl:output + name="TerminateActivitiesResponse" + message="bes-factory:TerminateActivitiesResponse" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/TerminateActivitiesResponse"/> + <wsdl:fault name="InvalidRequestMessageFault" + message="bes-factory:InvalidRequestMessageFault" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/Fault"/> + </wsdl:operation> + + <wsdl:operation name="GetActivityDocuments"> + <wsdl:input + name="GetActivityDocuments" + message="bes-factory:GetActivityDocumentsRequest" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetActivityDocuments"/> + <wsdl:output + name="GetActivityDocumentsResponse" + message="bes-factory:GetActivityDocumentsResponse" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetActivityDocumentsResponse"/> + <wsdl:fault name="InvalidRequestMessageFault" + message="bes-factory:InvalidRequestMessageFault" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/Fault"/> + </wsdl:operation> + + <wsdl:operation name="GetFactoryAttributesDocument"> + <wsdl:input + name="GetFactoryAttributesDocument" + message="bes-factory:GetFactoryAttributesDocumentRequest" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetFactoryAttributesDocument"/> + <wsdl:output + name="GetFactoryAttributesDocumentResponse" + message="bes-factory:GetFactoryAttributesDocumentResponse" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetFactoryAttributesDocumentResponse"/> + <wsdl:fault name="InvalidRequestMessageFault" + message="bes-factory:InvalidRequestMessageFault" + wsa:Action="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/Fault"/> + </wsdl:operation> + </wsdl:portType> + + <!-- Bindings --> + <wsdl:binding name="BESFactoryBinding" type="bes-factory:BESFactoryPortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> + + <wsdl:operation name="CreateActivity"> + <soap:operation soapAction="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/CreateActivity" /> + <wsdl:input name="CreateActivity"> + <soap:body use="literal" /> + </wsdl:input> + <wsdl:output name="CreateActivityResponse"> + <soap:body use="literal" /> + </wsdl:output> + <wsdl:fault name="NotAuthorizedFault"> + <soap:fault name="NotAuthorizedFault" use="literal" /> + </wsdl:fault> + <wsdl:fault name="NotAcceptingNewActivitiesFault"> + <soap:fault name="NotAcceptingNewActivitiesFault" use="literal" /> + </wsdl:fault> + <wsdl:fault name="UnsupportedFeatureFault"> + <soap:fault name="UnsupportedFeatureFault" use="literal" /> + </wsdl:fault> + <wsdl:fault name="InvalidRequestMessageFault"> + <soap:fault name="InvalidRequestMessageFault" use="literal" /> + </wsdl:fault> + </wsdl:operation> + + <wsdl:operation name="GetActivityStatuses"> + <soap:operation soapAction="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetActivityStatuses" /> + <wsdl:input name="GetActivityStatuses"> + <soap:body use="literal" /> + </wsdl:input> + <wsdl:output name="GetActivityStatusesResponse"> + <soap:body use="literal" /> + </wsdl:output> + <wsdl:fault name="InvalidRequestMessageFault"> + <soap:fault name="InvalidRequestMessageFault" use="literal" /> + </wsdl:fault> + </wsdl:operation> + + <wsdl:operation name="TerminateActivities"> + <soap:operation soapAction="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/TerminateActivities" /> + <wsdl:input name="TerminateActivities"> + <soap:body use="literal" /> + </wsdl:input> + <wsdl:output name="TerminateActivitiesResponse"> + <soap:body use="literal" /> + </wsdl:output> + <wsdl:fault name="InvalidRequestMessageFault"> + <soap:fault name="InvalidRequestMessageFault" use="literal" /> + </wsdl:fault> + </wsdl:operation> + + <wsdl:operation name="GetActivityDocuments"> + <soap:operation soapAction="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetActivityDocuments" /> + <wsdl:input name="GetActivityDocuments"> + <soap:body use="literal" /> + </wsdl:input> + <wsdl:output name="GetActivityDocumentsResponse"> + <soap:body use="literal" /> + </wsdl:output> + <wsdl:fault name="InvalidRequestMessageFault"> + <soap:fault name="InvalidRequestMessageFault" use="literal" /> + </wsdl:fault> + </wsdl:operation> + + <wsdl:operation name="GetFactoryAttributesDocument"> + <soap:operation soapAction="http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetFactoryAttributesDocument" /> + <wsdl:input name="GetFactoryAttributesDocument"> + <soap:body use="literal" /> + </wsdl:input> + <wsdl:output name="GetFactoryAttributesDocumentResponse"> + <soap:body use="literal" /> + </wsdl:output> + <wsdl:fault name="InvalidRequestMessageFault"> + <soap:fault name="InvalidRequestMessageFault" use="literal" /> + </wsdl:fault> + </wsdl:operation> + </wsdl:binding> +</wsdl:definitions> + Copied: trunk/bes-factory.xsd (from rev 26, trunk/bespp/bes-factory.xsd) =================================================================== --- trunk/bes-factory.xsd (rev 0) +++ trunk/bes-factory.xsd 2008-01-14 03:28:26 UTC (rev 27) @@ -0,0 +1,125 @@ +<xsd:schema + targetNamespace="http://schemas.ggf.org/bes/2006/08/bes-factory" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:wsa="http://www.w3.org/2005/08/addressing" + xmlns:bes-factory="http://schemas.ggf.org/bes/2006/08/bes-factory" + xmlns:jsdl="http://schemas.ggf.org/jsdl/2005/11/jsdl" + xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> + + <xsd:import + namespace="http://schemas.xmlsoap.org/soap/envelope/" + schemaLocation="http://schemas.xmlsoap.org/soap/envelope/"/> + + <xsd:import + namespace="http://www.w3.org/2005/08/addressing" + schemaLocation="http://www.w3.org/2002/ws/addr/ns/ws-addr"/> + + <xsd:import + namespace="http://schemas.ggf.org/jsdl/2005/11/jsdl" + schemaLocation="http://schemas.ggf.org/jsdl/2005/11/jsdl"/> + + <!-- Attribute Document Types --> + <xsd:complexType name="BasicResourceAttributesDocumentType"> + <xsd:sequence> + <xsd:element name="ResourceName" type="xsd:string" minOccurs="0"/> + <xsd:element name="OperatingSystem" type="jsdl:OperatingSystem_Type" minOccurs="0"/> + <xsd:element name="CPUArchitecture" type="jsdl:CPUArchitecture_Type" minOccurs="0"/> + <xsd:element name="CPUCount" type="xsd:double" minOccurs="0"/> + <xsd:element name="CPUSpeed" type="xsd:double" minOccurs="0"/> + <xsd:element name="PhysicalMemory" type="xsd:double" minOccurs="0"/> + <xsd:element name="VirtualMemory" type="xsd:double" minOccurs="0"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="FactoryResourceAttributesDocumentType"> + <xsd:sequence> + <xsd:element ref="bes-factory:BasicResourceAttributesDocument" minOccurs="0"/> + <xsd:element name="IsAcceptingNewActivities" type="xsd:boolean"/> + <xsd:element name="CommonName" type="xsd:string" minOccurs="0" maxOccurs ="1"/> + <xsd:element name="LongDescription" type="xsd:string" minOccurs="0" maxOccurs ="1"/> + <xsd:element name="TotalNumberOfActivities" type="xsd:long"/> + <xsd:element name="ActivityReference" type="wsa:EndpointReferenceType" minOccurs="0" maxOccurs="unbounded"/> + <xsd:element name="TotalNumberOfContainedResources" type="xsd:long"/> + <xsd:element name="ContainedResource" type="xsd:anyType" minOccurs="0" maxOccurs="unbounded"/> + <xsd:element name="NamingProfile" type="xsd:anyURI" maxOccurs="unbounded"/> + <xsd:element name="BESExtension" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xsd:element name="LocalResourceManagerType" type="xsd:anyURI"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <!-- Message Helper Types --> + <xsd:complexType name="ActivityDocumentType"> + <xsd:sequence> + <xsd:element ref="jsdl:JobDefinition"/> + <xsd:any namespace="##other" processContents="lax" + minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:simpleType name="ActivityStateEnumeration"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="Pending"/> + <xsd:enumeration value="Running"/> + <xsd:enumeration value="Cancelled"/> + <xsd:enumeration value="Failed"/> + <xsd:enumeration value="Finished"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="ActivityStatusType"> + <xsd:sequence> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="state" type="bes-factory:ActivityStateEnumeration" use="required"/> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="GetActivityStatusResponseType"> + <xsd:sequence> + <xsd:element name="ActivityIdentifier" type="wsa:EndpointReferenceType"/> + <xsd:element ref="bes-factory:ActivityStatus" minOccurs="0"/> + <xsd:element name="Fault" type="xsd:anyType" minOccurs="0"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="GetActivityDocumentResponseType"> + <xsd:sequence> + <xsd:element name="ActivityIdentifier" type="wsa:EndpointReferenceType"/> + <xsd:element name="JobDefinition" type="jsdl:JobDefinition_Type" minOccurs="0"/> + <xsd:element name="Fault" type="xsd:anyType" minOccurs="0"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <xsd:complexType name="TerminateActivityResponseType"> + <xsd:sequence> + <xsd:element name="ActivityIdentifier" type="wsa:EndpointReferenceType"/> + <xsd:element name="Cancelled" type="xsd:boolean"/> + <xsd:element name="Fault" type="xsd:anyType" minOccurs="0"/> + <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:anyAttribute namespace="##other" processContents="lax"/> + </xsd:complexType> + + <!-- Message Helper Elements --> + <xsd:element name="BasicResourceAttributesDocument" + type="bes-factory:BasicResourceAttributesDocumentType"/> + <xsd:element name="FactoryResourceAttributesDocument" + type="bes-factory:FactoryResourceAttributesDocumentType"/> + <xsd:element name="ActivityDocument" + type="bes-factory:ActivityDocumentType"/> + <xsd:element name="ActivityStatus" + type="bes-factory:ActivityStatusType"/> + +</xsd:schema> + Copied: trunk/besclient (from rev 26, trunk/bespp/besclient) Deleted: trunk/bespp/Make.config =================================================================== --- trunk/bespp/Make.config 2008-01-14 03:16:15 UTC (rev 26) +++ trunk/bespp/Make.config 2008-01-14 03:28:26 UTC (rev 27) @@ -1,29 +0,0 @@ -# -# gSOAP related variables -# -# You must set this to the top of your compiled gSOAP -# source distribution -GSOAP_TOP = /home/csmith/src/gsoap-2.7 - -# -# LSF related variables -# -LSF_ARCH = linux2.6-glibc2.3-x86_64 -#LSF_ARCH = linux2.6-glibc2.3-x86 -#LSF_ARCH = macosx -LSF_TOP = /sw/lsf/7.0 -LSF_INC = -I$(LSF_TOP)/include -LSF_LIB = $(LSF_TOP)/$(LSF_ARCH)/lib -# need to uncomment only one of the following -#LSF_LIBS = -L$(LSF_LIB) -lbat -llsf -LSF_LIBS = $(LSF_LIB)/libbat.a $(LSF_LIB)/liblsf.a - -# -# Any extra include and lib directories, or libraries -# -# -lnsl needed for Linux systems -# -#EXTRA_INC = -I/usr/local/include -#EXTRA_LIB = -L/usr/local/lib -EXTRA_LIBS = -lnsl - Deleted: trunk/bespp/Makefile =================================================================== --- trunk/bespp/Makefile 2008-01-14 03:16:15 UTC (rev 26) +++ trunk/bespp/Makefile 2008-01-14 03:28:26 UTC (rev 27) @@ -1,12 +0,0 @@ -all: server client - -server: - make -C besserver - -client: - make -C besclient - -clean: - make -C besserver clean - make -C besclient clean - Deleted: trunk/bespp/README.txt =================================================================== --- trunk/bespp/README.txt 2008-01-14 03:16:15 UTC (rev 26) +++ trunk/bespp/README.txt 2008-01-14 03:28:26 UTC (rev 27) @@ -1,248 +0,0 @@ -Introduction -============ - -BES++ is an implementation of the OGSA Basic Execution Service (BES) -which is a standardized (http://www.ogf.org/documents/GFD.108.pdf) -SOAP-based Web services interface for submitting and managing jobs -running under the control of a resource manager. The BES++ code -was contributed by Platform Computing (http://www.platform.com) after -some HPC Basic Profile interoperability testing that occurred -during the SuperComputing conferences in 2006 and 2007. - -The goals of the BES++ project are: - -- Provide a reference implementation of OGSA-BES that is compliant - with the HPC Basic Profile (http://www.ogf.org/documents/GFD.114.pdf). - -- Provide this implementation as Open Source Software, in order to - encourage the adoption of the standards. - -- Become a vehicle for the development of extensions to the current - specifications according to the needs of the HPC and Grid computing - communities. - -You can always access the latest release of BES++ from -http://sourceforge.net/projects/bespp. - - -Building and Installing -======================= - -In order to build the BES++ software you need to use the gSOAP Toolkit -(http://sourceforge.net/projects/gsoap2) to generate SOAP proxy code. -The version currently used for development is gsoap 2.7.9l. Your mileage -may vary with other versions. Before building BES++, make sure and -compile the gSOAP distribution (you don't actually need to install it). - -Currently BES++ only supports the Platform LSF resource manager. Make -sure that LSF is installed on the machine on which you are building the -BES++ code, as you will need access to the LSF header files and libraries. - -Building the software ---------------------- - -1. Edit config.h in the top level bespp directory to adjust any needed - parameters. See comments in the file for guidance on what to change. - -2. Edit Make.config in the top level bespp directory and set: - - a) GSOAP_TOP to the top-level directory of the gSOAP distribution - that you have built. - - b) Adjust the LSF parameters to reflect top of the LSF distribution, - and to indicate the architecture that your are building on. If - you are not sure which architecture to use, and your environment - is already setup to use LSF, you can run a command like - 'which lsid' to see which architecture specific directory is - appropriate for your machine. - - c) If you need to set any extra paths to headers files or - libraries, use the EXTRA_* macros. - -3. Type 'make'. If all goes well, there will be a besclient binary - in the besclient sub-directory, and a besserver binary in the - besserver sub-directory. - -Installing the software ------------------------ - -You can copy the besclient and besserver binaries wherever you wish -as they have no components which are required to be in any particular -directory. - -If you would like to support the use of user name and password authentication -using PAM, you will need to create a PAM configuration file and install -it into the appropriate place on your system ('man pam.conf' will usually -provide some information on the location ... usually /etc/pam.d). Two -sample pam.conf files are provided in the besserver/samples sub-directory. - -You will need an X.509 certificate for the BES++ service. This can be -a self-signed certificate (see documentation from OpenSSL for information -about this topic) or a certificate from a valid certificate authority. Note -that the PEM formatted file used to contain the server certificate must -include both the certificate and the corresponding private key. - - -Running the besserver -===================== - -Note: in order to run the besserver, it must be able to connect to -your LSF environment. The besserver can be run on any node in the LSF -cluster (including a client-only machine). Make sure and have the LSF -environment variables properly initialized before starting the besserver. -This can be easily accomplished with a shell script wrapper. There is -a sample wrapper in the besserver/samples sub-directory. - -In most cases, the besserver must be started as the root user. This allows -the service to authenticate users using user name and password using -PAM, and then to impersonate the user when submitting and controlling -jobs. The besserver can be run as a regular user, but this is only -supported when: a) SSL mutual authentication is used, and b) all jobs -are submitted and managed as the user running the service. - -besserver takes the following options: - --u service_user - specifies under which user account the service will run. - Required argument. - --h hostname - the hostname of the service endpoint. This will also determine which - interfaces the gSOAP stack will bind to for listening for requests. - Default is 'localhost'. - --p port - the port of the service endpoint. - Default is 443. - --s server.pem - the file containing the X.509 certificate and corresponding private - key in PEM format for the service. - Default is './server.pem'. - --e service_endpoint - a URL that indicates to clients how to connect to this service. By - default the endpoint is determined from the hostname and port, but - in some cases (e.g. service is addressed on the internet using a - CNAME alias) it is useful to override the default. - Default is 'https://<hostname>:<port>'. - --c capath - the directory in which CA certificates are kept for the purpose - of authenticating clients via SSL. Each certificate should be - in a separate file, and should be named '<hash>.0', where <hash> - is determined from the 'openssl x509 -hash' command. - Default is './certs'. - --g generic_user - specifies the user id under which jobs are run when authenticating - clients via SSL - --V - the besserver prints out version information and then exits. - --? - the besserver prints out usage information and then exits. - - - -Using the besclient -=================== - -The besclient program is used to make client requests to a BES service -(any BES compliant service, not just a BES++ service) in order to -submit, control and monitor jobs, and to query the BES service -attributes. - -Note that in BES an "Activity" is the same as a "Job" in LSF or other -resource managers. - -There is a sample JSDL document in besclient/sleep.jsdl that should run -on pretty much any UNIX type system through LSF if an example job is needed. - -The basic command syntax of besclient is: - - besclient <options> <command> <command args> - -The besclient supports the following commands: - -create <JSDL document> <activity epr file> - calls CreateActivity operation using the provided JSDL document - as the input to the operation. On success, the returned activity - EPR is placed in the file indicated by <activity epr file> for use - in other operations. - -status <activity epr file> - calls GetActivityStatuses operation for the activity EPR that is - contained in the provided file. The returned activity status is - printed on stdout. - -terminate <activity epr file> - calls TerminateActivities operation for the activity EPR that is - contained in the provided file. Success or failure of the operation - is indicated on stdout. - -activity <activity epr file> - calls GetActivityDocuments operation for the activity EPR that is - contained in the provided file. Information about the activity is - printed to stdout. - -factory - calls GetFactoryAttributesDocument operation and prints information - about the BES service on stdout. - -besclient takes the following options: - --c capath - the directory in which CA certificates are kept for the purpose - of authenticating the BES service via SSL. Each certificate should - be in a separate file, and should be named '<hash>.0', where <hash> - is determined from the 'openssl x509 -hash' command. - Default is './certs'. - --e endpoint.xml - the name of a file containing the EPR for the BES service to contact. - Default is './endpoint.xml'. - --u username - the username to use when authenticating to the server using username - and password authentication. - One of -u or -x is required (not both). - --p password - the password to use when authenticating to the server using username - and password authentication. - Default is to prompt for the password from stdin. - --x client.pem - a file in PEM format containing the X.509 certificate and corresponding - private key that identifies the client to the BES service when - authenticating using SSL mutual authentication. - One of -x or -u is required (not both). - --k keypassphrase - the passphrase used to encrypt the client certificate. - Default is to prompt for the key's passphrase from stdin. - --V - the besserver prints out version information and then exits. - --? - the besserver prints out usage information and then exits. - - -License -======= - -BES++ is distributed under the terms of the GPL version 2 license. -See the file gpl.txt for a description of the terms and conditions -for copying, distribution and modification. - - -Copyright -========= - -BES++ is copyrighted by Platform Computing Corp. -Copyright (C) 2007-2008 Platform Computing Corp. -All Rights Reserved - Deleted: trunk/bespp/bes-factory.wsdl =================================================================== --- trunk/bespp/bes-factory.wsdl 2008-01-14 03:16:15 UTC (rev 26) +++ trunk/bespp/bes-factory.wsdl 2008-01-14 03:28:26 UTC (rev 27) @@ -1,446 +0,0 @@ -<wsdl:definitions name="BESFactory" - targetNamespace="http://schemas.ggf.org/bes/2006/08/bes-factory" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:bes-factory="http://schemas.ggf.org/bes/2006/08/bes-factory" - xmlns:wsa="http://www.w3/org/2005/08/addressing" - xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" - xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > - - <wsdl:types> - <xsd:schema - xmlns:wsa="http://www.w3.org/2005/08/addressing" - attributeFormDefault="unqualified" - elementFormDefault="qualified" - targetNamespace="http://schemas.ggf.org/bes/2006/08/bes-factory"> - - <xsd:include schemaLocation="bes-factory.xsd"/> - - <!-- Message Types --> - <xsd:complexType name="CreateActivityType"> - <xsd:sequence> - <xsd:element ref="bes-factory:ActivityDocument"/> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="CreateActivityResponseType"> - <xsd:sequence> - <xsd:element name="ActivityIdentifier" type="wsa:EndpointReferenceType"/> - <xsd:element ref="bes-factory:ActivityDocument" minOccurs="0"/> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="GetActivityStatusesType"> - <xsd:sequence> - <xsd:element name="ActivityIdentifier" type="wsa:EndpointReferenceType" maxOccurs="unbounded" minOccurs="0"/> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="GetActivityStatusesResponseType"> - <xsd:sequence> - <xsd:element name="Response" type="bes-factory:GetActivityStatusResponseType" maxOccurs="unbounded" minOccurs="0"/> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="TerminateActivitiesType"> - <xsd:sequence> - <xsd:element name="ActivityIdentifier" type="wsa:EndpointReferenceType" minOccurs="0" maxOccurs="unbounded"/> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="TerminateActivitiesResponseType"> - <xsd:sequence> - <xsd:element name="Response" type="bes-factory:TerminateActivityResponseType" minOccurs="0" maxOccurs="unbounded"/> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="GetActivityDocumentsType"> - <xsd:sequence> - <xsd:element name="ActivityIdentifier" type="wsa:EndpointReferenceType" minOccurs="0" maxOccurs="unbounded"/> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="GetActivityDocumentsResponseType"> - <xsd:sequence> - <xsd:element name="Response" type="bes-factory:GetActivityDocumentResponseType" minOccurs="0" maxOccurs="unbounded"/> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="GetFactoryAttributesDocumentType"> - <xsd:sequence> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="GetFactoryAttributesDocumentResponseType"> - <xsd:sequence> - <xsd:element ref="bes-factory:FactoryResourceAttributesDocument"/> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <!-- Fault Types --> - <xsd:complexType name="NotAuthorizedFaultType"> - <xsd:sequence> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="NotAcceptingNewActivitiesFaultType"> - <xsd:sequence> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="UnsupportedFeatureFaultType"> - <xsd:sequence> - <xsd:element name="Feature" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="CantApplyOperationToCurrentStateFaultType"> - <xsd:sequence> - <xsd:element name="ActivityStatus" type="bes-factory:ActivityStatusType" /> - <xsd:element name="Message" type="xsd:string"/> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="OperationWillBeAppliedEventuallyFaultType"> - <xsd:sequence> - <xsd:element name="ActivityStatus" type="bes-factory:ActivityStatusType" /> - <xsd:element name="Message" type="xsd:string"/> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="InvalidActivityIdentifierFaultType"> - <xsd:sequence> - <xsd:element name="Message" type="xsd:string"/> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <xsd:complexType name="InvalidRequestMessageFaultType"> - <xsd:sequence> - <xsd:element name="InvalidElement" type="xsd:string" minOccurs="0" maxOccurs ="unbounded"/> - <xsd:element name="Message" type="xsd:string"/> - <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:anyAttribute namespace="##other" processContents="lax"/> - </xsd:complexType> - - <!-- Message Elements --> - <xsd:element name="CreateActivity" - type="bes-factory:CreateActivityType"/> - <xsd:element name="CreateActivityResponse" - type="bes-factory:CreateActivityResponseType"/> - <xsd:element name="GetActivityStatuses" - type="bes-factory:GetActivityStatusesType"/> - <xsd:element name="GetActivityStatusesResponse" - type="bes-factory:GetActivityStatusesResponseType"/> - <xsd:element name="TerminateActivities" - type="bes-factory:TerminateActivitiesType"/> - <xsd:element name="TerminateActivitiesResponse" - type="bes-factory:TerminateActivitiesResponseType"/> - <xsd:element name="GetActivityDocuments" - type="bes-factory:GetActivityDocumentsType"/> - <xsd:element name="GetActivityDocumentsResponse" - type="bes-factory:GetActivityDocumentsResponseType"/> - <xsd:element name="GetFactoryAttributesDocument" - type="bes-factory:GetFactoryAttributesDocumentType"/> - <xsd:element name="GetFactoryAttributesDocumentResponse" - type="bes-factory:GetFactoryAttributesDocumentResponseType"/> - - <!-- Fault Elements --> - <xsd:element name="NotAuthorizedFault" - type="bes-factory:NotAuthorizedFaultType"/> - <xsd:element name="NotAcceptingNewActivitiesFault" - type="bes-factory:NotAcceptingNewActivitiesFaultType"/> - <xsd:element name="UnsupportedFeatureFault" - type="bes-factory:UnsupportedFeatureFaultType"/> - <xsd:element name="CantApplyOperationToCurrentStateFault" - type="bes-factory:CantApplyOperationToCurrentStateFaultType"/> - <xsd:element name="OperationWillBeAppliedEventuallyFault" - type="bes-factory:OperationWillBeAppliedEventuallyFaultType"/> - <xsd:element name="InvalidActivityIdentifierFault" - type="bes-factory:InvalidActivityIdentifierFaultType"/> - <xsd:element name="InvalidRequestMessageFault" - type="bes-factory:InvalidRequestMessageFaultType"/> - </xsd:schema> - </wsdl:types> - - <!-- Messages --> - <wsdl:message name="CreateActivityRequest"> - <wsdl:part name="parameters" - element="bes-factory:CreateActivity"/> - </wsdl:message> - - <wsdl:message name="CreateActivityResponse"> - <wsdl:part name="parameters" - element="bes-factory:CreateActivityResponse"/> - </wsdl:message> - - <wsdl:message name="GetActivityStatusesRequest"> - <wsdl:part name="parameters" - ... [truncated message content] |
From: <cs...@us...> - 2008-01-14 03:16:10
|
Revision: 26 http://bespp.svn.sourceforge.net/bespp/?rev=26&view=rev Author: csmith Date: 2008-01-13 19:16:15 -0800 (Sun, 13 Jan 2008) Log Message: ----------- - minor changes to Make.config and config.h Modified Paths: -------------- trunk/bespp/Make.config trunk/bespp/config.h Modified: trunk/bespp/Make.config =================================================================== --- trunk/bespp/Make.config 2008-01-12 03:06:46 UTC (rev 25) +++ trunk/bespp/Make.config 2008-01-14 03:16:15 UTC (rev 26) @@ -8,10 +8,10 @@ # # LSF related variables # -#LSF_ARCH = linux2.6-glibc2.3-x86_64 -#LSF_ARCH = linux2.6-glibc2.3-x86_64 -LSF_ARCH = macosx -LSF_TOP = /usr/local/lsf/7.0 +LSF_ARCH = linux2.6-glibc2.3-x86_64 +#LSF_ARCH = linux2.6-glibc2.3-x86 +#LSF_ARCH = macosx +LSF_TOP = /sw/lsf/7.0 LSF_INC = -I$(LSF_TOP)/include LSF_LIB = $(LSF_TOP)/$(LSF_ARCH)/lib # need to uncomment only one of the following @@ -25,5 +25,5 @@ # #EXTRA_INC = -I/usr/local/include #EXTRA_LIB = -L/usr/local/lib -#EXTRA_LIBS = -lnsl +EXTRA_LIBS = -lnsl Modified: trunk/bespp/config.h =================================================================== --- trunk/bespp/config.h 2008-01-12 03:06:46 UTC (rev 25) +++ trunk/bespp/config.h 2008-01-14 03:16:15 UTC (rev 26) @@ -3,7 +3,7 @@ /* You can set project global definitions and includes here */ /* Uncomment the next line if you are building on Mac OS X */ -#define MACOSX +/* #define MACOSX */ /* You probably don't need to change these. */ /* Setting the VERSION_STRING macro determines what is output */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-01-12 03:06:55
|
Revision: 25 http://bespp.svn.sourceforge.net/bespp/?rev=25&view=rev Author: csmith Date: 2008-01-11 19:06:46 -0800 (Fri, 11 Jan 2008) Log Message: ----------- - Created a README file with installation and usage instructions - moved around some files - provided some samples (JSDL doc and server wrapper script) - added option to besclient and besserver to print version string Modified Paths: -------------- trunk/bespp/besclient/Makefile trunk/bespp/besclient/besclient.c trunk/bespp/besserver/Makefile trunk/bespp/besserver/auth.c trunk/bespp/besserver/besserver.c Added Paths: ----------- trunk/bespp/Make.config trunk/bespp/Makefile trunk/bespp/README.txt trunk/bespp/besclient/sleep.jsdl trunk/bespp/besserver/samples/run_server.sh trunk/bespp/config.h trunk/bespp/gpl.txt Removed Paths: ------------- trunk/bespp/besclient/gpl.txt trunk/bespp/besserver/gpl.txt Added: trunk/bespp/Make.config =================================================================== --- trunk/bespp/Make.config (rev 0) +++ trunk/bespp/Make.config 2008-01-12 03:06:46 UTC (rev 25) @@ -0,0 +1,29 @@ +# +# gSOAP related variables +# +# You must set this to the top of your compiled gSOAP +# source distribution +GSOAP_TOP = /home/csmith/src/gsoap-2.7 + +# +# LSF related variables +# +#LSF_ARCH = linux2.6-glibc2.3-x86_64 +#LSF_ARCH = linux2.6-glibc2.3-x86_64 +LSF_ARCH = macosx +LSF_TOP = /usr/local/lsf/7.0 +LSF_INC = -I$(LSF_TOP)/include +LSF_LIB = $(LSF_TOP)/$(LSF_ARCH)/lib +# need to uncomment only one of the following +#LSF_LIBS = -L$(LSF_LIB) -lbat -llsf +LSF_LIBS = $(LSF_LIB)/libbat.a $(LSF_LIB)/liblsf.a + +# +# Any extra include and lib directories, or libraries +# +# -lnsl needed for Linux systems +# +#EXTRA_INC = -I/usr/local/include +#EXTRA_LIB = -L/usr/local/lib +#EXTRA_LIBS = -lnsl + Added: trunk/bespp/Makefile =================================================================== --- trunk/bespp/Makefile (rev 0) +++ trunk/bespp/Makefile 2008-01-12 03:06:46 UTC (rev 25) @@ -0,0 +1,12 @@ +all: server client + +server: + make -C besserver + +client: + make -C besclient + +clean: + make -C besserver clean + make -C besclient clean + Added: trunk/bespp/README.txt =================================================================== --- trunk/bespp/README.txt (rev 0) +++ trunk/bespp/README.txt 2008-01-12 03:06:46 UTC (rev 25) @@ -0,0 +1,248 @@ +Introduction +============ + +BES++ is an implementation of the OGSA Basic Execution Service (BES) +which is a standardized (http://www.ogf.org/documents/GFD.108.pdf) +SOAP-based Web services interface for submitting and managing jobs +running under the control of a resource manager. The BES++ code +was contributed by Platform Computing (http://www.platform.com) after +some HPC Basic Profile interoperability testing that occurred +during the SuperComputing conferences in 2006 and 2007. + +The goals of the BES++ project are: + +- Provide a reference implementation of OGSA-BES that is compliant + with the HPC Basic Profile (http://www.ogf.org/documents/GFD.114.pdf). + +- Provide this implementation as Open Source Software, in order to + encourage the adoption of the standards. + +- Become a vehicle for the development of extensions to the current + specifications according to the needs of the HPC and Grid computing + communities. + +You can always access the latest release of BES++ from +http://sourceforge.net/projects/bespp. + + +Building and Installing +======================= + +In order to build the BES++ software you need to use the gSOAP Toolkit +(http://sourceforge.net/projects/gsoap2) to generate SOAP proxy code. +The version currently used for development is gsoap 2.7.9l. Your mileage +may vary with other versions. Before building BES++, make sure and +compile the gSOAP distribution (you don't actually need to install it). + +Currently BES++ only supports the Platform LSF resource manager. Make +sure that LSF is installed on the machine on which you are building the +BES++ code, as you will need access to the LSF header files and libraries. + +Building the software +--------------------- + +1. Edit config.h in the top level bespp directory to adjust any needed + parameters. See comments in the file for guidance on what to change. + +2. Edit Make.config in the top level bespp directory and set: + + a) GSOAP_TOP to the top-level directory of the gSOAP distribution + that you have built. + + b) Adjust the LSF parameters to reflect top of the LSF distribution, + and to indicate the architecture that your are building on. If + you are not sure which architecture to use, and your environment + is already setup to use LSF, you can run a command like + 'which lsid' to see which architecture specific directory is + appropriate for your machine. + + c) If you need to set any extra paths to headers files or + libraries, use the EXTRA_* macros. + +3. Type 'make'. If all goes well, there will be a besclient binary + in the besclient sub-directory, and a besserver binary in the + besserver sub-directory. + +Installing the software +----------------------- + +You can copy the besclient and besserver binaries wherever you wish +as they have no components which are required to be in any particular +directory. + +If you would like to support the use of user name and password authentication +using PAM, you will need to create a PAM configuration file and install +it into the appropriate place on your system ('man pam.conf' will usually +provide some information on the location ... usually /etc/pam.d). Two +sample pam.conf files are provided in the besserver/samples sub-directory. + +You will need an X.509 certificate for the BES++ service. This can be +a self-signed certificate (see documentation from OpenSSL for information +about this topic) or a certificate from a valid certificate authority. Note +that the PEM formatted file used to contain the server certificate must +include both the certificate and the corresponding private key. + + +Running the besserver +===================== + +Note: in order to run the besserver, it must be able to connect to +your LSF environment. The besserver can be run on any node in the LSF +cluster (including a client-only machine). Make sure and have the LSF +environment variables properly initialized before starting the besserver. +This can be easily accomplished with a shell script wrapper. There is +a sample wrapper in the besserver/samples sub-directory. + +In most cases, the besserver must be started as the root user. This allows +the service to authenticate users using user name and password using +PAM, and then to impersonate the user when submitting and controlling +jobs. The besserver can be run as a regular user, but this is only +supported when: a) SSL mutual authentication is used, and b) all jobs +are submitted and managed as the user running the service. + +besserver takes the following options: + +-u service_user + specifies under which user account the service will run. + Required argument. + +-h hostname + the hostname of the service endpoint. This will also determine which + interfaces the gSOAP stack will bind to for listening for requests. + Default is 'localhost'. + +-p port + the port of the service endpoint. + Default is 443. + +-s server.pem + the file containing the X.509 certificate and corresponding private + key in PEM format for the service. + Default is './server.pem'. + +-e service_endpoint + a URL that indicates to clients how to connect to this service. By + default the endpoint is determined from the hostname and port, but + in some cases (e.g. service is addressed on the internet using a + CNAME alias) it is useful to override the default. + Default is 'https://<hostname>:<port>'. + +-c capath + the directory in which CA certificates are kept for the purpose + of authenticating clients via SSL. Each certificate should be + in a separate file, and should be named '<hash>.0', where <hash> + is determined from the 'openssl x509 -hash' command. + Default is './certs'. + +-g generic_user + specifies the user id under which jobs are run when authenticating + clients via SSL + +-V + the besserver prints out version information and then exits. + +-? + the besserver prints out usage information and then exits. + + + +Using the besclient +=================== + +The besclient program is used to make client requests to a BES service +(any BES compliant service, not just a BES++ service) in order to +submit, control and monitor jobs, and to query the BES service +attributes. + +Note that in BES an "Activity" is the same as a "Job" in LSF or other +resource managers. + +There is a sample JSDL document in besclient/sleep.jsdl that should run +on pretty much any UNIX type system through LSF if an example job is needed. + +The basic command syntax of besclient is: + + besclient <options> <command> <command args> + +The besclient supports the following commands: + +create <JSDL document> <activity epr file> + calls CreateActivity operation using the provided JSDL document + as the input to the operation. On success, the returned activity + EPR is placed in the file indicated by <activity epr file> for use + in other operations. + +status <activity epr file> + calls GetActivityStatuses operation for the activity EPR that is + contained in the provided file. The returned activity status is + printed on stdout. + +terminate <activity epr file> + calls TerminateActivities operation for the activity EPR that is + contained in the provided file. Success or failure of the operation + is indicated on stdout. + +activity <activity epr file> + calls GetActivityDocuments operation for the activity EPR that is + contained in the provided file. Information about the activity is + printed to stdout. + +factory + calls GetFactoryAttributesDocument operation and prints information + about the BES service on stdout. + +besclient takes the following options: + +-c capath + the directory in which CA certificates are kept for the purpose + of authenticating the BES service via SSL. Each certificate should + be in a separate file, and should be named '<hash>.0', where <hash> + is determined from the 'openssl x509 -hash' command. + Default is './certs'. + +-e endpoint.xml + the name of a file containing the EPR for the BES service to contact. + Default is './endpoint.xml'. + +-u username + the username to use when authenticating to the server using username + and password authentication. + One of -u or -x is required (not both). + +-p password + the password to use when authenticating to the server using username + and password authentication. + Default is to prompt for the password from stdin. + +-x client.pem + a file in PEM format containing the X.509 certificate and corresponding + private key that identifies the client to the BES service when + authenticating using SSL mutual authentication. + One of -x or -u is required (not both). + +-k keypassphrase + the passphrase used to encrypt the client certificate. + Default is to prompt for the key's passphrase from stdin. + +-V + the besserver prints out version information and then exits. + +-? + the besserver prints out usage information and then exits. + + +License +======= + +BES++ is distributed under the terms of the GPL version 2 license. +See the file gpl.txt for a description of the terms and conditions +for copying, distribution and modification. + + +Copyright +========= + +BES++ is copyrighted by Platform Computing Corp. +Copyright (C) 2007-2008 Platform Computing Corp. +All Rights Reserved + Modified: trunk/bespp/besclient/Makefile =================================================================== --- trunk/bespp/besclient/Makefile 2007-11-21 19:33:35 UTC (rev 24) +++ trunk/bespp/besclient/Makefile 2008-01-12 03:06:46 UTC (rev 25) @@ -1,5 +1,6 @@ +TOP = .. +include $(TOP)/Make.config -GSOAP_TOP = /home/csmith/src/gsoap-2.7 GSOAP_PLUGIN = $(GSOAP_TOP)/soapcpp2/plugin GSOAP_IMPORT = $(GSOAP_TOP)/soapcpp2/import GSOAP_INC = -I$(GSOAP_TOP)/soapcpp2 -I$(GSOAP_PLUGIN) @@ -10,9 +11,9 @@ http://schemas.ggf.org/jsdl/2005/11/jsdl-posix CC = gcc -CFLAGS = -g $(GSOAP_DEF) -I. $(GSOAP_INC) -I/usr/local/include -LDFLAGS = -g -L/usr/local/lib -LIBS = -lssl -lcrypto +CFLAGS = -g $(GSOAP_DEF) -I. $(GSOAP_INC) $(EXTRA_INC) +LDFLAGS = -g $(EXTRA_LIB) +LIBS = -lssl -lcrypto $(EXTRA_LIBS) BES_WSDL = bes-factory.wsdl BES_HEADER = bes.h Modified: trunk/bespp/besclient/besclient.c =================================================================== --- trunk/bespp/besclient/besclient.c 2007-11-21 19:33:35 UTC (rev 24) +++ trunk/bespp/besclient/besclient.c 2008-01-12 03:06:46 UTC (rev 25) @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ +#include "../config.h" + #include <stdio.h> #include <string.h> #include <sys/types.h> @@ -92,7 +94,7 @@ user = NULL; pass = NULL; - while ((ch = getopt(argc, argv, "c:e:u:p:x:k:")) != -1) { + while ((ch = getopt(argc, argv, "Vc:e:u:p:x:k:")) != -1) { switch (ch) { case 'c': capath = optarg; @@ -112,6 +114,10 @@ case 'k': x509pass = optarg; break; + case 'V': + printf("besclient, %s\n%s\n", VERSION_STRING, COPYRIGHT); + exit(0); + break; case '?': default: usage(); Deleted: trunk/bespp/besclient/gpl.txt =================================================================== --- trunk/bespp/besclient/gpl.txt 2007-11-21 19:33:35 UTC (rev 24) +++ trunk/bespp/besclient/gpl.txt 2008-01-12 03:06:46 UTC (rev 25) @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. Added: trunk/bespp/besclient/sleep.jsdl =================================================================== --- trunk/bespp/besclient/sleep.jsdl (rev 0) +++ trunk/bespp/besclient/sleep.jsdl 2008-01-12 03:06:46 UTC (rev 25) @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<JobDefinition xmlns="http://schemas.ggf.org/jsdl/2005/11/jsdl"> + <JobDescription> + <JobIdentification> + <JobName>Sleep</JobName> + </JobIdentification> + <Application> + <HPCProfileApplication xmlns="http://schemas.ggf.org/jsdl/2006/07/jsdl-hpcp"> + <Executable>sleep</Executable> + <Argument>60</Argument> + <Output>/dev/null</Output> + <WorkingDirectory>/tmp</WorkingDirectory> + </HPCProfileApplication> + </Application> + <Resources> + <TotalCPUCount> + <Exact>1</Exact> + </TotalCPUCount> + </Resources> + </JobDescription> +</JobDefinition> + Modified: trunk/bespp/besserver/Makefile =================================================================== --- trunk/bespp/besserver/Makefile 2007-11-21 19:33:35 UTC (rev 24) +++ trunk/bespp/besserver/Makefile 2008-01-12 03:06:46 UTC (rev 25) @@ -1,14 +1,6 @@ -# -# This Makefile only works on UNIX systems. Builds on Windows must be -# done within the utopia tree in lsbatch/cmd -# -LSF_TOP = /usr/local/lsf/7.0 -LSF_INC = $(LSF_TOP)/include -LSF_LIB = $(LSF_TOP)/linux2.6-glibc2.3-x86_64/lib -#LSFLIBS = -L$(LSF_LIB) -lbat -llsf -LSFLIBS = $(LSF_LIB)/libbat.a $(LSF_LIB)/liblsf.a +TOP = .. +include $(TOP)/Make.config -GSOAP_TOP = /home/csmith/src/gsoap-2.7 GSOAP_PLUGIN = $(GSOAP_TOP)/soapcpp2/plugin GSOAP_IMPORT = $(GSOAP_TOP)/soapcpp2/import GSOAP_INC = -I$(GSOAP_TOP)/soapcpp2 -I$(GSOAP_PLUGIN) @@ -19,9 +11,9 @@ # http://schemas.ggf.org/jsdl/2005/11/jsdl-posix CC = gcc -CFLAGS = -g $(GSOAP_DEF) -I. $(GSOAP_INC) -I$(LSF_INC) #-DMACOSX -LDFLAGS = -g -LIBS = -lssl -lcrypto -lpam -lnsl +CFLAGS = -g $(GSOAP_DEF) -I. $(GSOAP_INC) $(LSF_INC) $(EXTRA_INC) +LDFLAGS = -g $(EXTRA_LIB) +LIBS = -lssl -lcrypto -lpam $(LSF_LIBS) $(EXTRA_LIBS) BES_WSDL = bes-factory.wsdl BES_HEADER = bes.h Modified: trunk/bespp/besserver/auth.c =================================================================== --- trunk/bespp/besserver/auth.c 2007-11-21 19:33:35 UTC (rev 24) +++ trunk/bespp/besserver/auth.c 2008-01-12 03:06:46 UTC (rev 25) @@ -1,3 +1,5 @@ +#include "../config.h" + #ifdef MACOSX #include <pam/pam_appl.h> #else Modified: trunk/bespp/besserver/besserver.c =================================================================== --- trunk/bespp/besserver/besserver.c 2007-11-21 19:33:35 UTC (rev 24) +++ trunk/bespp/besserver/besserver.c 2008-01-12 03:06:46 UTC (rev 25) @@ -23,6 +23,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ +#include "../config.h" + #include <string.h> #include <wchar.h> #include <stdio.h> @@ -109,7 +111,7 @@ capath = "certs"; service_user = NULL; - while ((ch = getopt(argc, argv, "h:p:s:c:u:e:g:")) != -1) { + while ((ch = getopt(argc, argv, "Vh:p:s:c:u:e:g:")) != -1) { switch (ch) { case 'h': host = optarg; @@ -133,6 +135,10 @@ case 'g': generic_user = optarg; break; + case 'V': + printf("besserver, %s\n%s\n", VERSION_STRING, COPYRIGHT); + exit(0); + break; case '?': default: usage(); Deleted: trunk/bespp/besserver/gpl.txt =================================================================== --- trunk/bespp/besserver/gpl.txt 2007-11-21 19:33:35 UTC (rev 24) +++ trunk/bespp/besserver/gpl.txt 2008-01-12 03:06:46 UTC (rev 25) @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. Added: trunk/bespp/besserver/samples/run_server.sh =================================================================== --- trunk/bespp/besserver/samples/run_server.sh (rev 0) +++ trunk/bespp/besserver/samples/run_server.sh 2008-01-12 03:06:46 UTC (rev 25) @@ -0,0 +1,23 @@ +#!/bin/sh + +besserver=/home/csmith/src/bespp/besserver +service_user=service +host=ws.domain.com +endpoint="https://${host}" +certfile=/home/csmith/src/bespp/besserver/server.pem +# needed for SSL mutual authentication +capath=/home/csmith/src/bespp/besserver/certs +# user to run jobs from users authenticated using SSL +generic_user=generic + +if [ -f /ego/lsf/conf/profile.lsf ]; then + . /ego/lsf/conf/profile.lsf +else + echo "$0: can't find profile.lsf" + exit 1 +fi + +$besserver -u $service_user -h $host -e $endpoint -s $certfile -c $capath -g $generic_user + +exit 0 + Property changes on: trunk/bespp/besserver/samples/run_server.sh ___________________________________________________________________ Name: svn:executable + * Added: trunk/bespp/config.h =================================================================== --- trunk/bespp/config.h (rev 0) +++ trunk/bespp/config.h 2008-01-12 03:06:46 UTC (rev 25) @@ -0,0 +1,17 @@ +#ifndef _CONFIG_H + +/* You can set project global definitions and includes here */ + +/* Uncomment the next line if you are building on Mac OS X */ +#define MACOSX + +/* You probably don't need to change these. */ +/* Setting the VERSION_STRING macro determines what is output */ +/* when using the -V option to besclient and besserver */ +#define VERSION_STRING "BES++ 1.0, 2008-01-14" + +/* Don't change this one */ +#define COPYRIGHT "Copyright (C) 2007-2008 Platform Computing Corporation" + +#endif /* _CONFIG_H */ + Added: trunk/bespp/gpl.txt =================================================================== --- trunk/bespp/gpl.txt (rev 0) +++ trunk/bespp/gpl.txt 2008-01-12 03:06:46 UTC (rev 25) @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy a... [truncated message content] |
From: <cs...@us...> - 2007-11-21 19:33:32
|
Revision: 24 http://bespp.svn.sourceforge.net/bespp/?rev=24&view=rev Author: csmith Date: 2007-11-21 11:33:35 -0800 (Wed, 21 Nov 2007) Log Message: ----------- - minor changes Modified Paths: -------------- trunk/bespp/besserver/Makefile Modified: trunk/bespp/besserver/Makefile =================================================================== --- trunk/bespp/besserver/Makefile 2007-11-21 19:31:44 UTC (rev 23) +++ trunk/bespp/besserver/Makefile 2007-11-21 19:33:35 UTC (rev 24) @@ -2,7 +2,7 @@ # This Makefile only works on UNIX systems. Builds on Windows must be # done within the utopia tree in lsbatch/cmd # -LSF_TOP = /ego/lsf/7.0 +LSF_TOP = /usr/local/lsf/7.0 LSF_INC = $(LSF_TOP)/include LSF_LIB = $(LSF_TOP)/linux2.6-glibc2.3-x86_64/lib #LSFLIBS = -L$(LSF_LIB) -lbat -llsf @@ -19,7 +19,7 @@ # http://schemas.ggf.org/jsdl/2005/11/jsdl-posix CC = gcc -CFLAGS = -g $(GSOAP_DEF) -I. $(GSOAP_INC) -I$(LSF_INC) +CFLAGS = -g $(GSOAP_DEF) -I. $(GSOAP_INC) -I$(LSF_INC) #-DMACOSX LDFLAGS = -g LIBS = -lssl -lcrypto -lpam -lnsl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2007-11-21 19:31:43
|
Revision: 23 http://bespp.svn.sourceforge.net/bespp/?rev=23&view=rev Author: csmith Date: 2007-11-21 11:31:44 -0800 (Wed, 21 Nov 2007) Log Message: ----------- - added some ignores Property Changed: ---------------- trunk/bespp/besserver/ Property changes on: trunk/bespp/besserver ___________________________________________________________________ Name: svn:ignore - server.pem .project .cproject .gdb_history .settings *.log + server.pem .project .cproject .gdb_history .settings *.log soapServer.c soapC.c soapH.h soapStub.h bes.h BESFactoryBinding.nsmap bes-factory.xsd bes-factory.wsdl besserver This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2007-11-21 18:33:47
|
Revision: 22 http://bespp.svn.sourceforge.net/bespp/?rev=22&view=rev Author: csmith Date: 2007-11-21 10:33:46 -0800 (Wed, 21 Nov 2007) Log Message: ----------- - added support for simple ftp based file staging - added X.509 client authentication support - worked around a problem with security headers being caught in xsd:any elements - couple of bug fixes Modified Paths: -------------- trunk/bespp/besserver/auth.c trunk/bespp/besserver/besserver.c trunk/bespp/besserver/job.c trunk/bespp/besserver/job.h trunk/bespp/besserver/namespaces.h Modified: trunk/bespp/besserver/auth.c =================================================================== --- trunk/bespp/besserver/auth.c 2007-11-21 18:31:08 UTC (rev 21) +++ trunk/bespp/besserver/auth.c 2007-11-21 18:33:46 UTC (rev 22) @@ -3,12 +3,15 @@ #else #include <security/pam_appl.h> #endif +#include <openssl/ssl.h> #include "wsseapi.h" #include "auth.h" const char pam_service[] = "besserver"; extern uid_t service_uid; +extern char *generic_user; +extern int isElement(struct soap_dom_element *, char *, char *); int changeToUid(uid_t new_uid) @@ -62,6 +65,42 @@ return PAM_SUCCESS; } +int +getUsernameTokenFromDOM(struct soap *s, char **username, char **password) +{ + static char fname[] = "getUsernameTokenFromDOM"; + struct soap_dom_element *token; + struct soap_dom_attribute *attr; + char *user, *pass; + int i, found = 0; + + for (i = 0; i < s->header->__size; i++) { + token = &(s->header->__any[i]); + if (isElement(token, WSSE_NS, "Security")) { + token = token->elts; + if (!isElement(token, WSSE_NS, "UsernameToken")) { + return soap_wsse_fault(s, wsse__UnsupportedSecurityToken, NULL); + } + if (isElement(token->elts, WSSE_NS, "Username")) { + user = token->elts->data; + if (isElement(token->elts->next, WSSE_NS, "Password")) { + pass = token->elts->next->data; + found = 1; + } + } + } + } + + if (found) { + *username = user; + *password = pass; + return SOAP_OK; + } + else { + return soap_wsse_fault(s, wsse__FailedAuthentication, NULL); + } +} + int authenticate(struct soap *s, char *username, int namelen) { @@ -70,16 +109,44 @@ struct auth_username_token *userinfo; struct pam_conv *conv_info; pam_handle_t *pamh = NULL; + char *user, *password; + X509 *clientcert; int rc; + clientcert = SSL_get_peer_certificate(s->ssl); + if (clientcert) { + if (SSL_get_verify_result(s->ssl) != X509_V_OK) { + return soap_wsse_fault(s, wsse__FailedAuthentication, NULL); + } + /* currently will just map to a generic user */ + X509_free(clientcert); + + if (username && namelen) { + strncpy(username, generic_user, namelen-1); + username[namelen-1] = 0; + } + + return SOAP_OK; + } + + /* no X.509 certificate ... look for WS-Security tokens */ token = soap_wsse_UsernameToken(s, NULL); - if (!token || !token->Username || !token->Password) { - return soap_wsse_fault(s, wsse__FailedAuthentication, NULL); + if (token) { + if (!token->Username || !token->Password) { + return soap_wsse_fault(s, wsse__FailedAuthentication, NULL); + } + if (token->Password->Type && strcmp(token->Password->Type, + wsse_PasswordTextURI)) { + return soap_wsse_fault(s, wsse__UnsupportedSecurityToken, NULL); + } + user = token->Username; + password = token->Password->__item; } - - if (token->Password->Type && strcmp(token->Password->Type, - wsse_PasswordTextURI)) { - return soap_wsse_fault(s, wsse__UnsupportedSecurityToken, NULL); + else { + /* see if the security header got stuck in the header __any */ + if (rc = getUsernameTokenFromDOM(s, &user, &password)) { + return rc; + } } userinfo = (struct auth_username_token*)soap_malloc(s, @@ -89,8 +156,8 @@ return soap_receiver_fault(s, MEM_ALLOC, NULL); } userinfo->s = 0; - userinfo->username = soap_strdup(s, token->Username); - userinfo->password = soap_strdup(s, token->Password->__item); + userinfo->username = soap_strdup(s, user); + userinfo->password = soap_strdup(s, password); if (!userinfo->username || !userinfo->password) { return soap_receiver_fault(s, MEM_ALLOC, NULL); } Modified: trunk/bespp/besserver/besserver.c =================================================================== --- trunk/bespp/besserver/besserver.c 2007-11-21 18:31:08 UTC (rev 21) +++ trunk/bespp/besserver/besserver.c 2007-11-21 18:33:46 UTC (rev 22) @@ -31,6 +31,7 @@ #include <signal.h> #include <pwd.h> #include <paths.h> +#include <time.h> #include <lsf/lsf.h> #include <lsf/lsbatch.h> @@ -43,11 +44,11 @@ #include "namespaces.h" #include "faults.h" + #define USERNAMELEN 256 #define clear_header(x) if (x->header) memset(x->header, 0, sizeof(struct SOAP_ENV__Header)); -char *service_endpoint = NULL; int isElement(struct soap_dom_element *, char *, char *); int makeActivityEPR(struct soap*, char *, int, struct wsa__EndpointReferenceType*); @@ -58,6 +59,10 @@ int getContainedResources(struct soap*, struct bes__FactoryResourceAttributesDocumentType*, int); +char *service_endpoint = NULL; +char *generic_user = NULL; +uid_t service_uid; + char *remoteApplications[] = { "WRF", NULL @@ -74,16 +79,16 @@ {NULL, NULL, NULL, NULL} }; -uid_t service_uid; void usage() { fprintf(stderr, "Usage: besserver"); - fprintf(stderr, " -u user"); + fprintf(stderr, " -u serviceuser"); fprintf(stderr, " [-h hostname] [-p port]"); fprintf(stderr, " [-s server.pem] [-c capath]"); fprintf(stderr, " [-e service_endpoint]"); + fprintf(stderr, " [-g generic user]"); fprintf(stderr, "\n"); exit(1); } @@ -95,15 +100,16 @@ int m, s, i, ch, port; char *host, *portstr, *capath, *certfile, *service_user; struct passwd *pwent; + time_t now; host = "localhost"; - portstr = "443"; + portstr = ""; port = 443; certfile = "server.pem"; capath = "certs"; service_user = NULL; - while ((ch = getopt(argc, argv, "h:p:s:c:u:e:")) != -1) { + while ((ch = getopt(argc, argv, "h:p:s:c:u:e:g:")) != -1) { switch (ch) { case 'h': host = optarg; @@ -124,6 +130,9 @@ case 'e': service_endpoint = optarg; break; + case 'g': + generic_user = optarg; + break; case '?': default: usage(); @@ -134,6 +143,14 @@ usage(); } + if (generic_user) { + pwent = getpwnam(generic_user); + if (pwent == NULL) { + perror("getpwnam generic_user"); + exit(1); + } + } + pwent = getpwnam(service_user); if (pwent == NULL) { perror("getpwnam"); @@ -166,7 +183,7 @@ soap_init(&soap); - soap_set_mode(&soap, SOAP_C_UTFSTRING); + soap_set_mode(&soap, SOAP_C_UTFSTRING|SOAP_IO_STORE); soap_register_plugin(&soap, soap_wsse); if (soap_ssl_server_context(&soap, SOAP_SSL_DEFAULT, certfile, @@ -182,7 +199,7 @@ soap_print_fault(&soap, stderr); exit(1); } - sprintf(service_endpoint, "https://%s:%s", host, portstr); + sprintf(service_endpoint, "https://%s%s%s", host, strlen(portstr)?":":"", portstr); } m = soap_bind(&soap, host, port, 100); @@ -202,6 +219,9 @@ for (i = 1;; i++) { soap_set_namespaces(&soap, namespaces); s = soap_accept(&soap); + if (time(&now) > -1) { + printf("%s", ctime(&now)); + } fprintf(stderr, "Accepted connection\n"); if (s < 0) { soap_print_fault(&soap, stderr); Modified: trunk/bespp/besserver/job.c =================================================================== --- trunk/bespp/besserver/job.c 2007-11-21 18:31:08 UTC (rev 21) +++ trunk/bespp/besserver/job.c 2007-11-21 18:33:46 UTC (rev 22) @@ -142,6 +142,60 @@ return SOAP_OK; } +int +processCredential(struct soap *s, struct soap_dom_element *dom, + struct credential **cred) +{ + struct soap_dom_element *cur = dom->elts; + struct soap_dom_element *user, *pass; + struct credential *new_cred = NULL; + + printf("----%s\n", dom->name); + + while (cur) { + if (isElement(cur, WSSE_NS, "UsernameToken")) { + printf("-----%s\n", cur->name); + user = cur->elts; + if (!isElement(user, WSSE_NS, "Username")) { + struct SOAP_ENV__Fault *fault; + fault = bes_UnsupportedFault(s, ELEMENT_UNKNOWN, user->name); + if (!fault) { + return soap_receiver_fault(s, MEM_ALLOC, NULL); + } + return bes_send_fault(s, fault); + } + pass = user->next; + if (!isElement(pass, WSSE_NS, "Password")) { + struct SOAP_ENV__Fault *fault; + fault = bes_UnsupportedFault(s, ELEMENT_UNKNOWN, pass->name); + if (!fault) { + return soap_receiver_fault(s, MEM_ALLOC, NULL); + } + return bes_send_fault(s, fault); + } + new_cred = (struct credential*)soap_malloc(s, sizeof(struct credential)); + if (new_cred == NULL) { + return soap_receiver_fault(s, MEM_ALLOC, NULL); + } + new_cred->username = soap_strdup(s, user->data); + new_cred->password = soap_strdup(s, pass->data); + if (!new_cred->username || !new_cred->password) { + return soap_receiver_fault(s, MEM_ALLOC, NULL); + } + *cred = new_cred; + } + else { + struct SOAP_ENV__Fault *fault; + fault = bes_UnsupportedFault(s, ELEMENT_UNKNOWN, cur->name); + if (!fault) { + return soap_receiver_fault(s, MEM_ALLOC, NULL); + } + return bes_send_fault(s, fault); + } + cur = cur->next; + } + return SOAP_OK; +} int processHPCProfileApplication(struct soap *s, struct soap_dom_element *dom, struct jobcard *jc) @@ -505,14 +559,117 @@ struct soap_dom_element *cur = dom->elts; int rc; struct SOAP_ENV__Fault *fault; + struct fileStage *file, *cur_file; + struct credential *cred; printf("---%s\n", dom->name); - fault = bes_UnsupportedFault(s, ELEMENT_UNSUPPORTED, dom->name); - if (!fault) { + file = (struct fileStage *)soap_malloc(s, sizeof(struct fileStage)); + if (file == NULL) { return soap_receiver_fault(s, MEM_ALLOC, NULL); } - return bes_send_fault(s, fault); + memset(file, 0, sizeof(struct fileStage)); + + + while (cur) { + if (isElement(cur, JSDL_NS, "FileName")) { + printf("----FileName\n"); + file->filename = soap_strdup(s, cur->data); + if (file->filename == NULL) { + return soap_receiver_fault(s, MEM_ALLOC, NULL); + } + } + else if (isElement(cur, JSDL_NS, "FileSystemName")) { + printf("----FileSystemName\n"); + fault = bes_UnsupportedFault(s, ELEMENT_UNSUPPORTED, cur->name); + if (!fault) { + return soap_receiver_fault(s, MEM_ALLOC, NULL); + } + return bes_send_fault(s, fault); + } + else if (isElement(cur, JSDL_NS, "CreationFlag")) { + printf("----CreationFlag\n"); + if (!strcmp(cur->data, "overwrite")) { + file->creationflag = overwrite; + } + else if (!strcmp(cur->data, "append")) { + file->creationflag = append; + } + else if (!strcmp(cur->data, "dontOverwrite")) { + file->creationflag = dontOverwrite; + } + } + else if (isElement(cur, JSDL_NS, "DeleteOnTermination")) { + printf("----DeleteOnTermination\n"); + if (!strcmp(cur->data, "true")) { + file->delete = true_; + } + else { + file->delete = false_; + } + } + else if (isElement(cur, JSDL_NS, "Source")) { + printf("----Source\n"); + if (isElement(cur->elts, JSDL_NS, "URI")) { + file->source = soap_strdup(s, cur->elts->data); + if (file->source == NULL) { + return soap_receiver_fault(s, MEM_ALLOC, NULL); + } + } + else { + fault = bes_UnsupportedFault(s, ELEMENT_UNSUPPORTED, cur->elts->name); + if (!fault) { + return soap_receiver_fault(s, MEM_ALLOC, NULL); + } + return bes_send_fault(s, fault); + } + } + else if (isElement(cur, JSDL_NS, "Target")) { + printf("----Target\n"); + if (isElement(cur->elts, JSDL_NS, "URI")) { + file->target = soap_strdup(s, cur->elts->data); + if (file->target == NULL) { + return soap_receiver_fault(s, MEM_ALLOC, NULL); + } + } + else { + fault = bes_UnsupportedFault(s, ELEMENT_UNSUPPORTED, cur->elts->name); + if (!fault) { + return soap_receiver_fault(s, MEM_ALLOC, NULL); + } + return bes_send_fault(s, fault); + } + } + else if (isElement(cur, HPCP_AC_NS, "Credential")) { + cred = NULL; + if ((rc = processCredential(s, cur, &cred)) != SOAP_OK) { + return rc; + } + file->credential = cred; + } + else { + fault = bes_UnsupportedFault(s, ELEMENT_UNSUPPORTED, cur->name); + if (!fault) { + return soap_receiver_fault(s, MEM_ALLOC, NULL); + } + return bes_send_fault(s, fault); + } + + cur = cur->next; + } + + cur_file = jc->files; + if (cur_file) { + while (cur_file->next) { + cur_file = cur_file->next; + } + cur_file->next = file; + } + else { + jc->files = file; + } + + return SOAP_OK; } int @@ -948,11 +1105,137 @@ return jobid; } +int +createJobWrapperScript(struct jobcard *jc, char *osuser, char *scriptname, int namelen) +{ + static char fname[] = "createJobWrapperScript"; + char wrappername[64]; + FILE *wrapper; + int fd, i; + struct passwd *pw; + uid_t service_uid; + struct fileStage *file; + char *cp; + + if (!jc || !osuser || !scriptname) { + return BESE_OTHER; + } + + if ((pw = getpwnam(osuser)) == NULL) { + fprintf(stderr, "%s: couldn't get user %s from passwd\n", fname, osuser); + return BESE_BAD_ARG; + } + + service_uid = geteuid(); + + if (seteuid(0)) { + perror("createJobWrapperScript: seteuid 0"); + unlink(fname); + return BESE_SYS_ERR; + } + + strcpy(wrappername, "/tmp/jobscript.XXXXXX"); + fd = mkstemp(wrappername); + if (fd == -1) { + perror("createJobWrapperScript: mkstemp"); + return BESE_SYS_ERR; + } + + if (fchown(fd, pw->pw_uid, pw->pw_gid)) { + perror("createJobWrapperScript: fchown"); + unlink(fname); + return BESE_SYS_ERR; + } + + if (fchmod(fd, S_IRWXU)) { + perror("createJobWrapperScript: fchmod"); + unlink(fname); + return BESE_SYS_ERR; + } + + wrapper = fdopen(fd, "w"); + if (wrapper == NULL) { + perror("createJobWrapperScript: fdopen"); + unlink(fname); + return BESE_SYS_ERR; + } + + fprintf(wrapper, "#!/bin/sh\n"); + + file = jc->files; + while (file) { + if (file->source) { + cp = strstr(file->source, "ftp://"); + if (!cp) { + fprintf(stderr, "%s: malformed source URI for file transfer %s\n", fname, file->source); + fprintf(stderr, "%s: only support ftp URIs at this time\n", fname); + unlink(fname); + return BESE_OTHER; + } + cp = cp + strlen("ftp://"); + + fprintf(wrapper, "%s -o %s ftp://", FTP_PROGRAM, file->filename); + if (file->credential) { + fprintf(wrapper, "%s:%s@", file->credential->username, file->credential->password); + } + fprintf(wrapper, "%s\n", cp); + } + file = file->next; + } + + if (jc->executable) { + fprintf(wrapper, "%s", jc->executable); + } + for (i = 0; i < jc->num_args; i++) { + fprintf(wrapper, " %s", jc->args[i]); + } + fprintf(wrapper, "\n"); + + fprintf(wrapper, "rc=$?\n"); + + file = jc->files; + while (file) { + if (file->target) { + cp = strstr(file->target, "ftp://"); + if (!cp) { + fprintf(stderr, "%s: malformed target URI for file transfer %s\n", fname, file->target); + fprintf(stderr, "%s: only support ftp URIs at this time\n", fname); + unlink(fname); + return BESE_OTHER; + } + cp = cp + strlen("ftp://"); + + fprintf(wrapper, "%s -u ftp://", FTP_PROGRAM); + if (file->credential) { + fprintf(wrapper, "%s:%s@", file->credential->username, file->credential->password); + } + fprintf(wrapper, "%s %s\n", cp, file->filename); + } + file = file->next; + } + + fprintf(wrapper, "rm $0\n"); + + fprintf(wrapper, "exit $rc\n"); + + fclose(wrapper); + + if (seteuid(service_uid)) { + perror("createJobWrapperScript: seteuid service_uid"); + unlink(fname); + return BESE_SYS_ERR; + } + + strncpy(scriptname, wrappername, namelen-1); + + return BESE_OK; +} + int submitLSFJob(struct jobcard *jc, int *return_jobid, char *osuser) { static char fname[] = "submitLSFJob"; - char scriptname[64]; + char scriptname[64], wrappername[64]; char buf[512]; int fd, i, rc, jobid = 0, rr = 0; FILE *script; @@ -1042,18 +1325,23 @@ } fprintf(script, "cpuarch == %s", jc->cpuarch); } - if (rr) + if (rr) { fprintf(script, "\" "); - if (jc->executable) - fprintf(script, "%s", jc->executable); - for (i = 0; i < jc->num_args; i++) - fprintf(script, " %s", jc->args[i]); - fprintf(script, "\n"); + } + + if ((rc = createJobWrapperScript(jc, osuser, wrappername, 64)) != BESE_OK) { + fclose(script); + unlink(scriptname); + return rc; + } + + fprintf(script, "%s\n", wrappername); fclose(script); if (chmod(scriptname, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)) { perror("submitLSFJob: chmod"); + unlink(wrappername); unlink(scriptname); return BESE_OTHER; } @@ -1117,6 +1405,7 @@ } if (lsb_signaljob(jobid, SIGKILL)) { + lsb_perror("terminateLSFJob (child)"); lsb_rc = lsberrno; } Modified: trunk/bespp/besserver/job.h =================================================================== --- trunk/bespp/besserver/job.h 2007-11-21 18:31:08 UTC (rev 21) +++ trunk/bespp/besserver/job.h 2007-11-21 18:33:46 UTC (rev 22) @@ -31,6 +31,8 @@ #include "namespaces.h" #include "faults.h" +#define FTP_PROGRAM "/usr/bin/ftp" + struct envvar { struct envvar *next; @@ -38,6 +40,24 @@ char *val; }; +struct credential +{ + char *username; + char *password; +}; + +struct fileStage +{ + struct fileStage *next; + char *filename; + char *filesystemname; + enum jsdl__CreationFlagEnumeration creationflag; + enum xsd__boolean delete; + char *source; + char *target; + struct credential *credential; +}; + struct jobcard { char *jobname; @@ -67,6 +87,8 @@ char *wd; struct envvar *environment; char *username; + + struct fileStage *files; }; int processJobDefinition(struct soap*, struct soap_dom_element*, struct jobcard*); Modified: trunk/bespp/besserver/namespaces.h =================================================================== --- trunk/bespp/besserver/namespaces.h 2007-11-21 18:31:08 UTC (rev 21) +++ trunk/bespp/besserver/namespaces.h 2007-11-21 18:33:46 UTC (rev 22) @@ -32,6 +32,7 @@ #define WSA_NS "http://www.w3.org/2005/08/addressing" #define WSSE_NS "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" #define WSU_NS "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" +#define HPCP_AC_NS "http://schemas.ogf.org/hpcp/2007/11/ac" #endif /* _NAMESPACES_H */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2007-11-21 18:31:04
|
Revision: 21 http://bespp.svn.sourceforge.net/bespp/?rev=21&view=rev Author: csmith Date: 2007-11-21 10:31:08 -0800 (Wed, 21 Nov 2007) Log Message: ----------- - provided a couple of sample pam.conf files for the besserver Added Paths: ----------- trunk/bespp/besserver/samples/ trunk/bespp/besserver/samples/besserver.macosx trunk/bespp/besserver/samples/besserver.suse10 Removed Paths: ------------- trunk/bespp/besserver/besserver_pam.conf Deleted: trunk/bespp/besserver/besserver_pam.conf =================================================================== --- trunk/bespp/besserver/besserver_pam.conf 2007-11-21 18:21:45 UTC (rev 20) +++ trunk/bespp/besserver/besserver_pam.conf 2007-11-21 18:31:08 UTC (rev 21) @@ -1,7 +0,0 @@ -# besserver: auth account password session -auth required pam_nologin.so -auth sufficient pam_unix2.so -auth required pam_deny.so -account required pam_unix2.so -password required pam_deny.so -session required pam_deny.so Added: trunk/bespp/besserver/samples/besserver.macosx =================================================================== --- trunk/bespp/besserver/samples/besserver.macosx (rev 0) +++ trunk/bespp/besserver/samples/besserver.macosx 2007-11-21 18:31:08 UTC (rev 21) @@ -0,0 +1,8 @@ +# besserver: auth account password session +auth required pam_nologin.so +auth sufficient pam_securityserver.so +auth sufficient pam_unix.so +auth required pam_deny.so +account required pam_unix.so +password required pam_deny.so +session required pam_deny.so Added: trunk/bespp/besserver/samples/besserver.suse10 =================================================================== --- trunk/bespp/besserver/samples/besserver.suse10 (rev 0) +++ trunk/bespp/besserver/samples/besserver.suse10 2007-11-21 18:31:08 UTC (rev 21) @@ -0,0 +1,7 @@ +# besserver: auth account password session +auth required pam_nologin.so +auth sufficient pam_unix2.so +auth required pam_deny.so +account required pam_unix2.so +password required pam_deny.so +session required pam_deny.so This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2007-11-21 18:21:44
|
Revision: 20 http://bespp.svn.sourceforge.net/bespp/?rev=20&view=rev Author: csmith Date: 2007-11-21 10:21:45 -0800 (Wed, 21 Nov 2007) Log Message: ----------- - more ignores added Property Changed: ---------------- trunk/bespp/besclient/ Property changes on: trunk/bespp/besclient ___________________________________________________________________ Name: svn:ignore - .project .cproject .gdb_history .settings *.log + .project .cproject .gdb_history .settings *.log soapClient.c soapC.c soapStub.h soapH.h bes.h BESFactoryBinding.nsmap bes-factory.xsd bes-factory.wsdl besclient This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2007-11-21 18:19:01
|
Revision: 19 http://bespp.svn.sourceforge.net/bespp/?rev=19&view=rev Author: csmith Date: 2007-11-21 10:19:02 -0800 (Wed, 21 Nov 2007) Log Message: ----------- - re-factored support for client X.509 authentication - added getopt processing for command-line Modified Paths: -------------- trunk/bespp/besclient/besclient-typemap.dat trunk/bespp/besclient/besclient.c Removed Paths: ------------- trunk/bespp/besclient/ws-header.h Modified: trunk/bespp/besclient/besclient-typemap.dat =================================================================== --- trunk/bespp/besclient/besclient-typemap.dat 2007-11-21 18:15:49 UTC (rev 18) +++ trunk/bespp/besclient/besclient-typemap.dat 2007-11-21 18:19:02 UTC (rev 19) @@ -34,17 +34,18 @@ hpcp = "http://www.platform.com/HPCProfile" app = "http://schemas.ggf.org/jsdl/2006/07/jsdl-hpcpa" -bes__CreateActivityType =struct bes__CreateActivityType { xsd__anyType* __any; }; |struct bes__CreateActivityType|struct bes__CreateActivityType req* -#bes__ActivityDocumentType = struct bes__ActivityDocumentType { xsd__anyType* __any; }; | struct bes__ActivityDocumentType | struct bes__ActivityDocumentType* +bes__ActivityDocumentType = struct bes__ActivityDocumentType { xsd__anyType* __any; }; | struct bes__ActivityDocumentType | struct bes__ActivityDocumentType* bes__CreateActivityResponseType = struct bes__CreateActivityResponseType { xsd__anyType* __any; }; | struct bes__CreateActivityResponseType | struct bes__CreateActivityResponseType* bes__TerminateActivitiesType = struct bes__TerminateActivitiesType { xsd__anyType* __any; }; | struct bes__TerminateActivitiesType | struct bes__TerminateActivitiesType* bes__GetActivityStatusesType = struct bes__GetActivityStatusesType { xsd__anyType* __any; }; | struct bes__GetActivityStatusesType | struct bes__GetActivityStatusesType* bes__GetActivityDocumentsType = struct bes__GetActivityDocumentsType { xsd__anyType* __any; }; | struct bes__GetActivityDocumentsType | struct bes__GetActivityDocumentsType* -bes__GetFactoryAttributesDocumentType = struct bes__GetFactoryAttributesDocumentType { xsd__anyType* __any; }; | struct bes__GetFactoryAttributesDocumentType | struct bes__GetFactoryAttributesDocumentType* bes__GetFactoryAttributesDocumentResponseType = struct bes__GetFactoryAttributesDocumentResponseType { xsd__anyType* __any; }; | struct bes__GetFactoryAttributesDocumentResponseType | struct bes__GetFactoryAttributesDocumentResponseType* bes__GetActivityDocumentsResponseType = struct bes__GetActivityDocumentsResponseType { xsd__anyType* __any; }; | struct bes__GetActivityDocumentsResponseType | struct bes__GetActivityDocumentsResponseType* bes__GetActivityStatusesResponseType = struct bes__GetActivityStatusesResponseType { xsd__anyType* __any; }; | struct bes__GetActivityStatusesResponseType | struct bes__GetActivityStatusesResponseType* +[ +#import "wsse.h" +] SOAP_ENV__Header =\ struct SOAP_ENV__Header\n\ {\n\ Modified: trunk/bespp/besclient/besclient.c =================================================================== --- trunk/bespp/besclient/besclient.c 2007-11-21 18:15:49 UTC (rev 18) +++ trunk/bespp/besclient/besclient.c 2007-11-21 18:19:02 UTC (rev 19) @@ -27,7 +27,7 @@ #include <fcntl.h> #include "wsseapi.h" -#include "bes.nsmap" +#include "BESFactoryBinding.nsmap" #define CREATE_ACT "http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/CreateActivity" #define STATUS_ACT "http://schemas.ggf.org/bes/2006/08/bes-factory/BESFactoryPortType/GetActivityStatuses" @@ -47,7 +47,7 @@ {"wsa", "http://www.w3.org/2005/08/addressing", NULL, NULL}, {"bes", "http://schemas.ggf.org/bes/2006/08/bes-factory", NULL, NULL}, {"jsdl", "http://schemas.ggf.org/jsdl/2005/11/jsdl", NULL, NULL}, - {"app", "http://schemas.ggf.org/jsdl/2006/07/jsdl-hpcp", NULL, NULL}, + {"app", "http://schemas.ggf.org/jsdl/2006/07/jsdl-hpcpa", NULL, NULL}, {NULL, NULL, NULL, NULL} }; @@ -61,189 +61,187 @@ int isElement(struct soap_dom_element *, char *, char *); int isAttribute(struct soap_dom_attribute *, char *, char *); int generateAddressingHeaders(struct soap*, char *, char *, char **); -void printDom(struct soap *, struct soap_dom_element *, int); -void cleanDom(struct soap *, struct soap_dom_element *); -char*readPassword(char *); -int initialize(struct soap *, char *, char *, char *, char *, char *, char *); +void printDom(struct soap*, struct soap_dom_element*, int); +void cleanDom(struct soap*, struct soap_dom_element*); +char *readPassword(char *); void zeroPassword(char *); void usage(); +void usage(void) +{ + fprintf(stderr, "Usage: besclient -u <username> [-p <password>]"); + fprintf(stderr, " [-e <endpoint>] [-c <capath>] <command> [<command args>]\n"); + fprintf(stderr, " besclient -x <certificate> [-k <keypassphrase>]"); + fprintf(stderr, " [-e <endpoint>] [-c <capath>] <command> [<command args>]\n"); + exit(1); +} + int main(int argc, char *argv[]) { struct soap soap; - char *endpoint, *command, *user, *method, *status, *capath, *certpath; - char *commandArg1 = (char *) 0; - char *commandArg2 = (char *) 0; - char *pass = (char *) 0; - char *x509pass = (char *) 0; - int rc; + char *endpoint, *command, *user, *pass, *status; + char *capath, *x509cert, *x509pass; + int poll_interval; + int ch; - if (argc < 6) { - usage(); - exit(1); + endpoint = "endpoint.xml"; + capath = "./certs"; + x509cert = NULL; + x509pass = NULL; + user = NULL; + pass = NULL; + + while ((ch = getopt(argc, argv, "c:e:u:p:x:k:")) != -1) { + switch (ch) { + case 'c': + capath = optarg; + break; + case 'e': + endpoint = optarg; + break; + case 'u': + user = optarg; + break; + case 'p': + pass = optarg; + break; + case 'x': + x509cert = optarg; + break; + case 'k': + x509pass = optarg; + break; + case '?': + default: + usage(); + } } - method = argv[1]; - if(!strcmp(method, "x509")) { - x509pass = readPassword("PEM passphrase:"); - certpath = argv[2]; - capath = argv[3]; - endpoint = argv[4]; - if(argc<7) { - usage(); - exit(1); - } - user = argv[5]; - command = argv[6]; - if(argc >= 8) - commandArg1 = argv[7]; - if(argc >= 9) - commandArg2 = argv[8]; + if ((user && x509cert) || (!user && !x509cert)) { + fprintf(stderr, "You must specify only one of username or certificate file.\n"); + usage(); } - else if(!strcmp(method, "password")) { - capath = argv[2]; - endpoint = argv[3]; - user = argv[4]; - command = argv[5]; - if(argc >= 7) - commandArg1 = argv[6]; - if(argc >= 8) - commandArg2 = argv[7]; + + argc -= optind; + argv += optind; + + if (argc < 1) { + usage(); } + + command = argv[0]; + + soap_ssl_init(); + soap_init(&soap); + soap_set_mode(&soap, SOAP_C_UTFSTRING); + soap_register_plugin(&soap, soap_wsse); + soap_set_namespaces(&soap, default_namespaces); + soap_header(&soap); + + if (user) { + if (pass == NULL ) { + pass = readPassword("WS-Security password:"); + } + } else { - fprintf(stderr, "Incorrect authentication method selected\n"); - usage(); - exit(1); + if (x509pass == NULL) { + x509pass = readPassword("Key passphrase:"); + } } - - pass = readPassword("WS-Security password:"); - rc = initialize(&soap,method,capath,certpath,user,pass,x509pass); - if(rc) { - zeroPassword(x509pass); - zeroPassword(pass); - exit(rc); + if (soap_ssl_client_context(&soap, SOAP_SSL_DEFAULT|SOAP_SSL_SKIP_HOST_CHECK, + x509cert, x509pass, NULL, capath, NULL)) { + soap_print_fault(&soap, stderr); + exit(1); } - if(strcmp(command, "poll")) { - /*We must zero the passwords as soon as possible. - We can do this for all commands except poll, - since it generates a new request every polling - interval*/ - zeroPassword(x509pass); - zeroPassword(pass); + if (user) { + if (soap_wsse_add_UsernameTokenText(&soap, NULL, user, pass)) { + soap_print_fault(&soap, stderr); + exit(1); + } } if (!strcmp(command, "create")) { - createActivity(&soap, endpoint, commandArg1, commandArg2); + createActivity(&soap, endpoint, argv[1], argv[2]); } else if (!strcmp(command, "status")) { - getActivityStatuses(&soap, endpoint, commandArg1); + getActivityStatuses(&soap, endpoint, argv[1]); } else if (!strcmp(command, "terminate")) { - terminateActivities(&soap, endpoint, commandArg1); + terminateActivities(&soap, endpoint, argv[1]); } else if (!strcmp(command, "activity")) { - getActivityDocuments(&soap, endpoint, commandArg1); + getActivityDocuments(&soap, endpoint, argv[1]); } else if (!strcmp(command, "factory")) { - getFactoryAttributesDocument(&soap, endpoint,commandArg1); + getFactoryAttributesDocument(&soap, endpoint); } else if (!strcmp(command, "poll")) { - int poll=atoi(commandArg2); - while(!pollActivityStatuses(&soap, endpoint, commandArg1, &status)) { - sleep(poll); - rc = initialize(&soap, method, capath, certpath, user, pass, x509pass); - if(rc) { - zeroPassword(x509pass); - zeroPassword(pass); - return rc; - } - } - zeroPassword(x509pass); - zeroPassword(pass); - printf("Activity no longer in the system. Final status is:%s\n", status); + poll_interval = atoi(argv[6]); + while (!pollActivityStatuses(&soap, endpoint, argv[1], &status)) { + sleep(poll_interval); + printf("."); + fflush(stdout); + if (user) { + if (soap_wsse_add_UsernameTokenText(&soap, NULL, user, pass)) { + soap_print_fault(&soap, stderr); + exit(1); + } + } + } + printf("Activity has finished. Final status is: %s\n", status); } else { fprintf(stderr, "Command %s is unknown.\n", command); - usage(); exit(1); } soap_end(&soap); soap_done(&soap); - + return 0; } void zeroPassword(char *password) { - if(password!=NULL) - memset(password, 0, strlen(password) * sizeof(char)); + if (password) { + memset(password, 0, strlen(password) * sizeof(char)); + } } -void -usage() -{ - fprintf(stderr, "Usage: besclient password CApath <endpoint> <username> <command> [<command args>] or\n"); - fprintf(stderr, " besclient x509 CERTpath CApath <endpoint> <username> <command> [<command args>]\n"); -} char* readPassword(char *message) { - char *pw, *password; - - if (isatty (fileno (stdin))){ - pw = getpass(message); - } else { - printf("Program does not run from a terminal\n"); - exit(1); - } - if (pw[strlen(pw)-1] == '\n') - pw[strlen(pw)-1] = '\0'; - password=(char *) malloc(strlen(pw) * sizeof(char)); - memset(password, 0, strlen(pw) * sizeof(char)); - strcpy(password, pw); - memset(pw, 0, strlen(pw) * sizeof(char)); - return password; + char *pw, *password; + + if (isatty(fileno(stdin))) { + pw = getpass(message); + } + else { + fprintf(stderr, "Can only prompt for password if running from a terminal.\n"); + fprintf(stderr, "Use the -p or -k options to supply the password on the command-line.\n"); + exit(1); + } + + if (pw[strlen(pw)-1] == '\n') { + pw[strlen(pw)-1] = 0; + } + + password = (char*)malloc(strlen(pw) * sizeof(char)); + if (password == NULL) { + perror("malloc password"); + exit(1); + } + memset(password, 0, strlen(pw) * sizeof(char)); + strcpy(password, pw); + memset(pw, 0, strlen(pw) * sizeof(char)); + + return password; } -int -initialize(struct soap* soap,char *method, char *capath, char *certpath, char *user, char *pass, char *x509pass) -{ - soap_ssl_init(); - soap_init(soap); - soap_set_mode(soap, SOAP_C_UTFSTRING); - soap_register_plugin(soap, soap_wsse); - soap_set_namespaces(soap, default_namespaces); - - if(!strcmp(method, "x509")) { - if (soap_ssl_client_context(soap, SOAP_SSL_DEFAULT | SOAP_SSL_SKIP_HOST_CHECK, certpath, x509pass, - NULL, capath, NULL)) { - soap_print_fault(soap, stderr); - return 1; - } - } - else if(!strcmp(method, "password")) { - if (soap_ssl_client_context(soap, SOAP_SSL_NO_AUTHENTICATION, NULL, NULL, NULL, - capath, NULL)) { - soap_print_fault(soap, stderr); - return 1; - } - } - else { - usage(); - return 1; - } - - if (soap_wsse_add_UsernameTokenText(soap, NULL, user, pass)) { - soap_print_fault(soap, stderr); - return 1; - } - return 0; -} int createActivity(struct soap *s, char *eprfile, char *jsdlfile, char *activityepr) { @@ -276,9 +274,9 @@ memset(&req, 0, sizeof(struct bes__CreateActivityType)); memset(&rsp, 0, sizeof(struct bes__CreateActivityResponseType)); - req.__any = &dom; + req.bes__ActivityDocument.__any = &dom; - if (soap_call___hpcp__CreateActivity(s, endpoint, CREATE_ACT, req, &rsp) != SOAP_OK) { + if (soap_call___bes__CreateActivity(s, endpoint, CREATE_ACT, &req, &rsp) != SOAP_OK) { soap_print_fault(s, stderr); exit(1); } @@ -340,7 +338,7 @@ memset(&rsp, 0, sizeof(struct bes__TerminateActivitiesResponseType)); req.__any = &dom; - if (soap_call___hpcp__TerminateActivities(s, endpoint, TERMINATE_ACT, req, &rsp) != SOAP_OK) { + if (soap_call___bes__TerminateActivities(s, endpoint, TERMINATE_ACT, req, &rsp) != SOAP_OK) { soap_print_fault(s, stdout); } else { @@ -398,7 +396,7 @@ memset(&rsp, 0, sizeof(struct bes__GetActivityStatusesResponseType)); req.__any = dom; - if (soap_call___hpcp__GetActivityStatuses(s, endpoint, STATUS_ACT, req, &rsp) != SOAP_OK) { + if (soap_call___bes__GetActivityStatuses(s, endpoint, STATUS_ACT, req, &rsp) != SOAP_OK) { soap_print_fault(s, stdout); } else { @@ -410,18 +408,16 @@ } int -pollActivityStatuses(struct soap *s, char *eprfile, char *activityepr, char **status) +pollActivityStatuses(struct soap *s, char *eprfile, char *activityepr, char**status) { struct bes__GetActivityStatusesType req; struct bes__GetActivityStatusesResponseType rsp; struct soap_dom_element *dom; - struct soap_dom_attribute *attributes; - struct soap_dom_element *element; int epr, i; char *endpoint; - static int terminated = 0; - static int fault = 0; - static int activityPresent = 0; + static int terminated=0; + static int fault=0; + static int activityPresent=0; if (generateAddressingHeaders(s, eprfile, STATUS_ACT, &endpoint)) { exit(1); @@ -454,85 +450,70 @@ memset(&rsp, 0, sizeof(struct bes__GetActivityStatusesResponseType)); req.__any = dom; - if (soap_call___hpcp__GetActivityStatuses(s, endpoint, STATUS_ACT, req, &rsp) != SOAP_OK) { - terminated = 1; - *status="Error in the SOAP call"; + if (soap_call___bes__GetActivityStatuses(s, endpoint, STATUS_ACT, req, &rsp) != SOAP_OK) { + terminated=1; + *status="Error in the SOAP call"; } else { - if((rsp.__any != NULL) - &&(!strcmp(rsp.__any->name, "Response"))) { - element = rsp.__any->elts; - while(element != NULL){ - if(!strcmp(element->name, "ActivityStatus")) { - activityPresent = 1; - if(element->elts != NULL){ - struct soap_dom_element *children = element->elts; - while(children != NULL){ - if((children->name != NULL) - &&(!strcmp(children->name, "Finished"))) { - terminated = 1; - *status = "Finished"; - break; - } - if((children->name != NULL) - &&(!strcmp(children->name, "Cancelled"))) { - terminated = 1; - *status = "Cancelled"; - break; - } - if((children->name != NULL) - &&(!strcmp(children->name, "Failed"))) { - terminated = 1; - *status = "Failed"; - break; - } - children = children->next; - } - } - if(element->atts != NULL){ - attributes = element->atts; - while (attributes != NULL) { - if((attributes->name != NULL) - &&(!strcmp(attributes->name, "state"))){ - if((attributes->data != NULL) - &&(!strcmp(attributes->data, "Finished"))) { - terminated = 1; - *status = "Finished"; - } - if((attributes->data != NULL) - &&(!strcmp(attributes->data, "Cancelled"))) { - terminated = 1; - *status = "Cancelled"; - } - if((attributes->data != NULL) - &&(!strcmp(attributes->data, "Failed"))) { - terminated = 1; - *status = "Failed"; - } - break; - } - attributes = attributes->next; - } - } - break; - } - else if(!strcmp(element->name, "UnknownActivityIdentifierFault")) { - terminated = 1; - fault = 1; - *status = "UnknownActivityIdentifierFault"; - break; - } - else - element = element->next; + if((rsp.__any!=NULL)&&(!strcmp(rsp.__any->name,"Response"))) { + struct soap_dom_element*element=rsp.__any->elts; + while(element!=NULL){ + if(!strcmp(element->name,"ActivityStatus")) { + activityPresent=1; + if((element->elts!=NULL)&&(!strcmp(element->elts->name,"Finished"))) { + terminated=1; + *status="Finished"; + } + if((element->elts!=NULL)&&(!strcmp(element->elts->name,"Cancelled"))) { + terminated=1; + *status="Cancelled"; + } + if((element->elts!=NULL)&&(!strcmp(element->elts->name,"Failed"))) { + terminated=1; + *status="Failed"; + } + if(element->atts!=NULL){ + struct soap_dom_attribute *attributes=element->atts; + while (attributes!=NULL) { + if((attributes->name!=NULL)&&(!strcmp(attributes->name,"state"))){ + if((attributes->data!=NULL)&&(!strcmp(attributes->data,"Finished"))) { + terminated=1; + *status="Finished"; } + if((attributes->data!=NULL)&&(!strcmp(attributes->data,"Cancelled"))) { + terminated=1; + *status="Cancelled"; + } + if((attributes->data!=NULL)&&(!strcmp(attributes->data,"Failed"))) { + terminated=1; + *status="Failed"; + } + break; + } + attributes=attributes->next; + } + } + break; + } + else if(!strcmp(element->name,"UnknownActivityIdentifierFault")){ + terminated=1; + fault=1; + *status="UnknownActivityIdentifierFault"; + break; + } + else + element=element->next; + } - } + } } if(fault&&activityPresent) - *status = "UnknownActivityIdentifierFault but identifier was seen in the system before."; + *status="UnknownActivityIdentifierFault but identifier was seen in the system before."; return terminated; } + + int getActivityDocuments(struct soap *s, char *eprfile, char *activityepr) { @@ -573,7 +554,7 @@ memset(&rsp, 0, sizeof(struct bes__GetActivityDocumentsResponseType)); req.__any = dom; - if (soap_call___hpcp__GetActivityDocuments(s, endpoint, ACTIVITIES_ACT, req, &rsp) != SOAP_OK) { + if (soap_call___bes__GetActivityDocuments(s, endpoint, ACTIVITIES_ACT, req, &rsp) != SOAP_OK) { soap_print_fault(s, stderr); } else { @@ -585,13 +566,11 @@ } int -getFactoryAttributesDocument(struct soap *s, char *eprfile, char* filterfile) +getFactoryAttributesDocument(struct soap *s, char *eprfile) { struct bes__GetFactoryAttributesDocumentType req; struct bes__GetFactoryAttributesDocumentResponseType rsp; char *endpoint; - int filters; - struct soap_dom_element dom; if (generateAddressingHeaders(s, eprfile, FACTORY_ACT, &endpoint)) { exit(1); @@ -599,27 +578,8 @@ memset(&req, 0, sizeof(struct bes__GetFactoryAttributesDocumentType)); memset(&rsp, 0, sizeof(struct bes__GetFactoryAttributesDocumentResponseType)); - - if(filterfile != NULL){ - filters = open(filterfile, O_RDONLY, 0); - if (filters == -1) { - perror("Cannot open filter file."); - exit(1); - } - dom.soap = s; - s->recvfd = filters; - if (soap_begin_recv(s) - || soap_in_xsd__anyType(s, NULL, &dom, NULL) == NULL - || soap_end_recv(s)) { - soap_print_fault(dom.soap, stderr); - exit(1); - } - close(filters); - req.__any=&dom; - } - - if (soap_call___hpcp__GetFactoryAttributesDocument(s, endpoint, FACTORY_ACT, req, &rsp) != SOAP_OK) { + if (soap_call___bes__GetFactoryAttributesDocument(s, endpoint, FACTORY_ACT, &req, &rsp) != SOAP_OK) { soap_print_fault(s, stderr); } else { @@ -909,4 +869,3 @@ { soap_serialize_xsd__anyType(s, node); } - Deleted: trunk/bespp/besclient/ws-header.h =================================================================== --- trunk/bespp/besclient/ws-header.h 2007-11-21 18:15:49 UTC (rev 18) +++ trunk/bespp/besclient/ws-header.h 2007-11-21 18:19:02 UTC (rev 19) @@ -1,14 +0,0 @@ -struct SOAP_ENV__Header -{ - mustUnderstand _wsse__Security *wsse__Security 0; ///< WS-Security - _wsa__MessageID wsa__MessageID 0; ///< WS-Addressing - _wsa__RelatesTo *wsa__RelatesTo 0; ///< WS-Addressing - _wsa__From *wsa__From 0; ///< WS-Addressing - _wsa__ReplyTo *wsa__ReplyTo 0; ///< WS-Addressing - _wsa__FaultTo *wsa__FaultTo 0; ///< WS-Addressing - _wsa__To wsa__To 0; ///< WS-Addressing - _wsa__Action wsa__Action 0; ///< WS-Addressing - int __size ; - xsd__anyType *__any 0; -}; - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2007-11-21 18:15:44
|
Revision: 18 http://bespp.svn.sourceforge.net/bespp/?rev=18&view=rev Author: csmith Date: 2007-11-21 10:15:49 -0800 (Wed, 21 Nov 2007) Log Message: ----------- - added ignore property Property Changed: ---------------- trunk/bespp/besclient/ Property changes on: trunk/bespp/besclient ___________________________________________________________________ Name: svn:ignore + .project .cproject .gdb_history .settings *.log This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |