This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 258
/
gl-client-marshal-adb.c
69 lines (52 loc) · 2.16 KB
/
gl-client-marshal-adb.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include <stdio.h>
#include <stdlib.h>
#include <gl-client-marshal.h>
#include <euca_auth.h>
int gl_getLogs(char *service, char **outCClog, char **outNClog, char **outHlog, char **outAlog, axutil_env_t *env, axis2_stub_t *stub) {
char *outservice;
adb_GetLogsResponse_t *out;
adb_getLogsResponseType_t *response;
adb_GetLogs_t *in;
adb_getLogsType_t *request;
request = adb_getLogsType_create(env);
adb_getLogsType_set_userId(request, env, "eucalyptus");
adb_getLogsType_set_correlationId(request, env, "12345678");
adb_getLogsType_set_serviceTag(request, env, service);
in = adb_GetLogs_create(env);
adb_GetLogs_set_GetLogs(in, env, request);
out = axis2_stub_op_EucalyptusGL_GetLogs(stub, env, in);
if (!out) {
printf("ERROR: operation call failed\n");
return(1);
}
response = adb_GetLogsResponse_get_GetLogsResponse(out, env);
outservice = adb_getLogsResponseType_get_serviceTag(response, env);
*outCClog = adb_getLogsResponseType_get_CCLog(response, env);
*outNClog = adb_getLogsResponseType_get_NCLog(response, env);
*outHlog = adb_getLogsResponseType_get_httpdLog(response, env);
*outAlog = adb_getLogsResponseType_get_axis2Log(response, env);
return(0);
}
int gl_getKeys(char *service, char **outCCCert, char **outNCCert, axutil_env_t *env, axis2_stub_t *stub) {
char *outservice;
adb_GetKeysResponse_t *out;
adb_getKeysResponseType_t *response;
adb_GetKeys_t *in;
adb_getKeysType_t *request;
request = adb_getKeysType_create(env);
adb_getKeysType_set_userId(request, env, "eucalyptus");
adb_getKeysType_set_correlationId(request, env, "12345678");
adb_getKeysType_set_serviceTag(request, env, service);
in = adb_GetKeys_create(env);
adb_GetKeys_set_GetKeys(in, env, request);
out = axis2_stub_op_EucalyptusGL_GetKeys(stub, env, in);
if (!out) {
printf("ERROR: operation call failed\n");
return(1);
}
response = adb_GetKeysResponse_get_GetKeysResponse(out, env);
outservice = adb_getKeysResponseType_get_serviceTag(response, env);
*outCCCert = adb_getKeysResponseType_get_CCcert(response, env);
*outNCCert = adb_getKeysResponseType_get_NCcert(response, env);
return(0);
}