4
* axis2_stub_EucalyptusGL.c
6
* This file was auto-generated from WSDL for "EucalyptusGL|http://eucalyptus.ucsb.edu/" service
7
* by the Apache Axis2/Java version: 1.4 Built on : Apr 26, 2008 (06:24:30 EDT)
10
#include "axis2_stub_EucalyptusGL.h"
11
#include <axis2_msg.h>
14
* axis2_stub_EucalyptusGL C implementation
18
axis2_stub_create_EucalyptusGL(const axutil_env_t *env,
19
axis2_char_t *client_home,
20
axis2_char_t *endpoint_uri)
22
axis2_stub_t *stub = NULL;
23
axis2_endpoint_ref_t *endpoint_ref = NULL;
24
AXIS2_FUNC_PARAM_CHECK (client_home, env, NULL)
26
if (NULL == endpoint_uri)
28
endpoint_uri = axis2_stub_get_endpoint_uri_of_EucalyptusGL(env);
31
endpoint_ref = axis2_endpoint_ref_create(env, endpoint_uri);
33
stub = axis2_stub_create_with_endpoint_ref_and_client_home (env, endpoint_ref, client_home);
37
if(NULL != endpoint_ref)
39
axis2_endpoint_ref_free(endpoint_ref, env);
45
axis2_stub_populate_services_for_EucalyptusGL(stub, env);
51
axis2_stub_populate_services_for_EucalyptusGL(axis2_stub_t *stub, const axutil_env_t *env)
53
axis2_svc_client_t *svc_client = NULL;
54
axutil_qname_t *svc_qname = NULL;
55
axutil_qname_t *op_qname = NULL;
56
axis2_svc_t *svc = NULL;
57
axis2_op_t *op = NULL;
58
axis2_op_t *annon_op = NULL;
59
axis2_msg_t *msg_out = NULL;
60
axis2_msg_t *msg_in = NULL;
61
axis2_msg_t *msg_out_fault = NULL;
62
axis2_msg_t *msg_in_fault = NULL;
65
/* Modifying the Service */
66
svc_client = axis2_stub_get_svc_client (stub, env );
67
svc = (axis2_svc_t*)axis2_svc_client_get_svc( svc_client, env );
69
annon_op = axis2_svc_get_op_with_name(svc, env, AXIS2_ANON_OUT_IN_OP);
70
msg_out = axis2_op_get_msg(annon_op, env, AXIS2_MSG_OUT);
71
msg_in = axis2_op_get_msg(annon_op, env, AXIS2_MSG_IN);
72
msg_out_fault = axis2_op_get_msg(annon_op, env, AXIS2_MSG_OUT_FAULT);
73
msg_in_fault = axis2_op_get_msg(annon_op, env, AXIS2_MSG_IN_FAULT);
75
svc_qname = axutil_qname_create(env,"EucalyptusGL" ,NULL, NULL);
76
axis2_svc_set_qname (svc, env, svc_qname);
78
/* creating the operations*/
81
op_qname = axutil_qname_create(env,
83
"http://eucalyptus.ucsb.edu/",
85
op = axis2_op_create_with_qname(env, op_qname);
87
axis2_op_set_msg_exchange_pattern(op, env, AXIS2_MEP_URI_OUT_IN);
89
axis2_msg_increment_ref(msg_out, env);
90
axis2_msg_increment_ref(msg_in, env);
91
axis2_msg_increment_ref(msg_out_fault, env);
92
axis2_msg_increment_ref(msg_in_fault, env);
93
axis2_op_add_msg(op, env, AXIS2_MSG_OUT, msg_out);
94
axis2_op_add_msg(op, env, AXIS2_MSG_IN, msg_in);
95
axis2_op_add_msg(op, env, AXIS2_MSG_OUT_FAULT, msg_out_fault);
96
axis2_op_add_msg(op, env, AXIS2_MSG_IN_FAULT, msg_in_fault);
98
axis2_svc_add_op(svc, env, op);
101
op_qname = axutil_qname_create(env,
103
"http://eucalyptus.ucsb.edu/",
105
op = axis2_op_create_with_qname(env, op_qname);
107
axis2_op_set_msg_exchange_pattern(op, env, AXIS2_MEP_URI_OUT_IN);
109
axis2_msg_increment_ref(msg_out, env);
110
axis2_msg_increment_ref(msg_in, env);
111
axis2_msg_increment_ref(msg_out_fault, env);
112
axis2_msg_increment_ref(msg_in_fault, env);
113
axis2_op_add_msg(op, env, AXIS2_MSG_OUT, msg_out);
114
axis2_op_add_msg(op, env, AXIS2_MSG_IN, msg_in);
115
axis2_op_add_msg(op, env, AXIS2_MSG_OUT_FAULT, msg_out_fault);
116
axis2_op_add_msg(op, env, AXIS2_MSG_IN_FAULT, msg_in_fault);
118
axis2_svc_add_op(svc, env, op);
124
*return end point picked from wsdl
127
axis2_stub_get_endpoint_uri_of_EucalyptusGL( const axutil_env_t *env )
129
axis2_char_t *endpoint_uri = NULL;
130
/* set the address from here */
132
endpoint_uri = "http://cc:9090/axis2/services/EucalyptusGL";
140
* auto generated method signature
141
* for "GetLogs|http://eucalyptus.ucsb.edu/" operation.
145
* @return adb_GetLogsResponse_t*
147
adb_GetLogsResponse_t*
148
axis2_stub_op_EucalyptusGL_GetLogs( axis2_stub_t *stub, const axutil_env_t *env,
149
adb_GetLogs_t* _getLogs)
151
axis2_svc_client_t *svc_client = NULL;
152
axis2_options_t *options = NULL;
153
axiom_node_t *ret_node = NULL;
155
const axis2_char_t *soap_action = NULL;
156
axutil_qname_t *op_qname = NULL;
157
axiom_node_t *payload = NULL;
158
axis2_bool_t is_soap_act_set = AXIS2_TRUE;
160
axutil_string_t *soap_act = NULL;
161
adb_GetLogsResponse_t* ret_val = NULL;
163
payload = adb_GetLogs_serialize(_getLogs, env, NULL, NULL, AXIS2_TRUE, NULL, NULL);
165
svc_client = axis2_stub_get_svc_client(stub, env );
171
options = axis2_stub_get_options( stub, env);
174
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE);
175
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in stub");
178
soap_action = axis2_options_get_action( options, env );
179
if (NULL == soap_action)
181
is_soap_act_set = AXIS2_FALSE;
182
soap_action = "EucalyptusGL#GetLogs";
184
soap_act = axutil_string_create(env, "EucalyptusGL#GetLogs");
185
axis2_options_set_soap_action(options, env, soap_act);
187
axis2_options_set_action( options, env, soap_action );
190
axis2_options_set_soap_version(options, env, AXIOM_SOAP11 );
192
ret_node = axis2_svc_client_send_receive_with_op_qname( svc_client, env, op_qname, payload);
194
if (!is_soap_act_set)
197
axis2_options_set_soap_action(options, env, NULL);
199
axis2_options_set_action( options, env, NULL);
204
if ( NULL == ret_node )
208
ret_val = adb_GetLogsResponse_create(env);
210
if(adb_GetLogsResponse_deserialize(ret_val, env, &ret_node, NULL, AXIS2_FALSE ) == AXIS2_FAILURE)
214
adb_GetLogsResponse_free(ret_val, env);
217
AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "NULL returnted from the GetLogsResponse_deserialize: "
218
"This should be due to an invalid XML");
226
* auto generated method signature
227
* for "GetKeys|http://eucalyptus.ucsb.edu/" operation.
231
* @return adb_GetKeysResponse_t*
233
adb_GetKeysResponse_t*
234
axis2_stub_op_EucalyptusGL_GetKeys( axis2_stub_t *stub, const axutil_env_t *env,
235
adb_GetKeys_t* _getKeys)
237
axis2_svc_client_t *svc_client = NULL;
238
axis2_options_t *options = NULL;
239
axiom_node_t *ret_node = NULL;
241
const axis2_char_t *soap_action = NULL;
242
axutil_qname_t *op_qname = NULL;
243
axiom_node_t *payload = NULL;
244
axis2_bool_t is_soap_act_set = AXIS2_TRUE;
246
axutil_string_t *soap_act = NULL;
247
adb_GetKeysResponse_t* ret_val = NULL;
249
payload = adb_GetKeys_serialize(_getKeys, env, NULL, NULL, AXIS2_TRUE, NULL, NULL);
251
svc_client = axis2_stub_get_svc_client(stub, env );
257
options = axis2_stub_get_options( stub, env);
260
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE);
261
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "options is null in stub");
264
soap_action = axis2_options_get_action( options, env );
265
if (NULL == soap_action)
267
is_soap_act_set = AXIS2_FALSE;
268
soap_action = "EucalyptusGL#GetKeys";
270
soap_act = axutil_string_create(env, "EucalyptusGL#GetKeys");
271
axis2_options_set_soap_action(options, env, soap_act);
273
axis2_options_set_action( options, env, soap_action );
276
axis2_options_set_soap_version(options, env, AXIOM_SOAP11 );
278
ret_node = axis2_svc_client_send_receive_with_op_qname( svc_client, env, op_qname, payload);
280
if (!is_soap_act_set)
283
axis2_options_set_soap_action(options, env, NULL);
285
axis2_options_set_action( options, env, NULL);
290
if ( NULL == ret_node )
294
ret_val = adb_GetKeysResponse_create(env);
296
if(adb_GetKeysResponse_deserialize(ret_val, env, &ret_node, NULL, AXIS2_FALSE ) == AXIS2_FAILURE)
300
adb_GetKeysResponse_free(ret_val, env);
303
AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "NULL returnted from the GetKeysResponse_deserialize: "
304
"This should be due to an invalid XML");
312
struct axis2_stub_EucalyptusGL_GetLogs_callback_data
315
axis2_status_t ( AXIS2_CALL *on_complete ) (const axutil_env_t *, adb_GetLogsResponse_t* _getLogsResponse, void *data);
316
axis2_status_t ( AXIS2_CALL *on_error ) (const axutil_env_t *, int exception, void *data);
319
static axis2_status_t AXIS2_CALL axis2_stub_on_error_EucalyptusGL_GetLogs(axis2_callback_t *callback, const axutil_env_t *env, int exception)
321
axis2_status_t ( AXIS2_CALL *on_error ) (const axutil_env_t *, int, void *data);
322
struct axis2_stub_EucalyptusGL_GetLogs_callback_data* callback_data = NULL;
323
void *user_data = NULL;
325
axis2_status_t status;
327
callback_data = (struct axis2_stub_EucalyptusGL_GetLogs_callback_data*)axis2_callback_get_data(callback);
329
user_data = callback_data->data;
330
on_error = callback_data->on_error;
332
status = on_error(env, exception, user_data);
336
AXIS2_FREE(env->allocator, callback_data);
341
axis2_status_t AXIS2_CALL axis2_stub_on_complete_EucalyptusGL_GetLogs(axis2_callback_t *callback, const axutil_env_t *env)
343
axis2_status_t ( AXIS2_CALL *on_complete ) (const axutil_env_t *, adb_GetLogsResponse_t* _getLogsResponse, void *data);
344
struct axis2_stub_EucalyptusGL_GetLogs_callback_data* callback_data = NULL;
345
void *user_data = NULL;
346
axis2_status_t status = AXIS2_SUCCESS;
348
adb_GetLogsResponse_t* ret_val = NULL;
351
axiom_node_t *ret_node = NULL;
352
axiom_soap_envelope_t *soap_envelope = NULL;
356
callback_data = (struct axis2_stub_EucalyptusGL_GetLogs_callback_data*)axis2_callback_get_data(callback);
358
soap_envelope = axis2_callback_get_envelope(callback, env);
361
axiom_soap_body_t *soap_body;
362
soap_body = axiom_soap_envelope_get_body(soap_envelope, env);
365
axiom_node_t *body_node = axiom_soap_body_get_base_node(soap_body, env);
368
ret_node = axiom_node_get_first_child(body_node, env);
375
user_data = callback_data->data;
376
on_complete = callback_data->on_complete;
381
ret_val = adb_GetLogsResponse_create(env);
383
if(adb_GetLogsResponse_deserialize(ret_val, env, &ret_node, NULL, AXIS2_FALSE ) == AXIS2_FAILURE)
385
AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "NULL returnted from the LendResponse_deserialize: "
386
"This should be due to an invalid XML");
387
adb_GetLogsResponse_free(ret_val, env);
395
status = on_complete(env, ret_val, user_data);
400
AXIS2_FREE(env->allocator, callback_data);
406
* auto generated method signature for asynchronous invocations
407
* for "GetLogs|http://eucalyptus.ucsb.edu/" operation.
411
* @param on_complete callback to handle on complete
412
* @param on_error callback to handle on error
414
void axis2_stub_start_op_EucalyptusGL_GetLogs( axis2_stub_t *stub, const axutil_env_t *env,
415
adb_GetLogs_t* _getLogs,
417
axis2_status_t ( AXIS2_CALL *on_complete ) (const axutil_env_t *, adb_GetLogsResponse_t* _getLogsResponse, void *data) ,
418
axis2_status_t ( AXIS2_CALL *on_error ) (const axutil_env_t *, int exception, void *data) )
421
axis2_callback_t *callback = NULL;
423
axis2_svc_client_t *svc_client = NULL;
424
axis2_options_t *options = NULL;
426
const axis2_char_t *soap_action = NULL;
427
axiom_node_t *payload = NULL;
429
axis2_bool_t is_soap_act_set = AXIS2_TRUE;
431
axutil_string_t *soap_act = NULL;
434
struct axis2_stub_EucalyptusGL_GetLogs_callback_data *callback_data;
436
callback_data = (struct axis2_stub_EucalyptusGL_GetLogs_callback_data*) AXIS2_MALLOC(env->allocator,
437
sizeof(struct axis2_stub_EucalyptusGL_GetLogs_callback_data));
438
if(NULL == callback_data)
440
AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "Can not allocate memeory for the callback data structures");
445
payload = adb_GetLogs_serialize(_getLogs, env, NULL, NULL, AXIS2_TRUE, NULL, NULL);
450
options = axis2_stub_get_options( stub, env);
453
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE);
454
AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "options is null in stub");
457
svc_client = axis2_stub_get_svc_client (stub, env);
458
soap_action =axis2_options_get_action (options, env);
459
if (NULL == soap_action)
461
is_soap_act_set = AXIS2_FALSE;
462
soap_action = "EucalyptusGL#GetLogs";
464
soap_act = axutil_string_create(env, "EucalyptusGL#GetLogs");
465
axis2_options_set_soap_action(options, env, soap_act);
467
axis2_options_set_action( options, env, soap_action);
470
axis2_options_set_soap_version(options, env, AXIOM_SOAP11);
473
callback = axis2_callback_create(env);
474
/* Set our on_complete fucntion pointer to the callback object */
475
axis2_callback_set_on_complete(callback, axis2_stub_on_complete_EucalyptusGL_GetLogs);
476
/* Set our on_error function pointer to the callback object */
477
axis2_callback_set_on_error(callback, axis2_stub_on_error_EucalyptusGL_GetLogs);
479
callback_data-> data = user_data;
480
callback_data-> on_complete = on_complete;
481
callback_data-> on_error = on_error;
483
axis2_callback_set_data(callback, (void*)callback_data);
486
axis2_svc_client_send_receive_non_blocking(svc_client, env, payload, callback);
488
if (!is_soap_act_set)
491
axis2_options_set_soap_action(options, env, NULL);
493
axis2_options_set_action(options, env, NULL);
499
struct axis2_stub_EucalyptusGL_GetKeys_callback_data
502
axis2_status_t ( AXIS2_CALL *on_complete ) (const axutil_env_t *, adb_GetKeysResponse_t* _getKeysResponse, void *data);
503
axis2_status_t ( AXIS2_CALL *on_error ) (const axutil_env_t *, int exception, void *data);
506
static axis2_status_t AXIS2_CALL axis2_stub_on_error_EucalyptusGL_GetKeys(axis2_callback_t *callback, const axutil_env_t *env, int exception)
508
axis2_status_t ( AXIS2_CALL *on_error ) (const axutil_env_t *, int, void *data);
509
struct axis2_stub_EucalyptusGL_GetKeys_callback_data* callback_data = NULL;
510
void *user_data = NULL;
512
axis2_status_t status;
514
callback_data = (struct axis2_stub_EucalyptusGL_GetKeys_callback_data*)axis2_callback_get_data(callback);
516
user_data = callback_data->data;
517
on_error = callback_data->on_error;
519
status = on_error(env, exception, user_data);
523
AXIS2_FREE(env->allocator, callback_data);
528
axis2_status_t AXIS2_CALL axis2_stub_on_complete_EucalyptusGL_GetKeys(axis2_callback_t *callback, const axutil_env_t *env)
530
axis2_status_t ( AXIS2_CALL *on_complete ) (const axutil_env_t *, adb_GetKeysResponse_t* _getKeysResponse, void *data);
531
struct axis2_stub_EucalyptusGL_GetKeys_callback_data* callback_data = NULL;
532
void *user_data = NULL;
533
axis2_status_t status = AXIS2_SUCCESS;
535
adb_GetKeysResponse_t* ret_val = NULL;
538
axiom_node_t *ret_node = NULL;
539
axiom_soap_envelope_t *soap_envelope = NULL;
543
callback_data = (struct axis2_stub_EucalyptusGL_GetKeys_callback_data*)axis2_callback_get_data(callback);
545
soap_envelope = axis2_callback_get_envelope(callback, env);
548
axiom_soap_body_t *soap_body;
549
soap_body = axiom_soap_envelope_get_body(soap_envelope, env);
552
axiom_node_t *body_node = axiom_soap_body_get_base_node(soap_body, env);
555
ret_node = axiom_node_get_first_child(body_node, env);
562
user_data = callback_data->data;
563
on_complete = callback_data->on_complete;
568
ret_val = adb_GetKeysResponse_create(env);
570
if(adb_GetKeysResponse_deserialize(ret_val, env, &ret_node, NULL, AXIS2_FALSE ) == AXIS2_FAILURE)
572
AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "NULL returnted from the LendResponse_deserialize: "
573
"This should be due to an invalid XML");
574
adb_GetKeysResponse_free(ret_val, env);
582
status = on_complete(env, ret_val, user_data);
587
AXIS2_FREE(env->allocator, callback_data);
593
* auto generated method signature for asynchronous invocations
594
* for "GetKeys|http://eucalyptus.ucsb.edu/" operation.
598
* @param on_complete callback to handle on complete
599
* @param on_error callback to handle on error
601
void axis2_stub_start_op_EucalyptusGL_GetKeys( axis2_stub_t *stub, const axutil_env_t *env,
602
adb_GetKeys_t* _getKeys,
604
axis2_status_t ( AXIS2_CALL *on_complete ) (const axutil_env_t *, adb_GetKeysResponse_t* _getKeysResponse, void *data) ,
605
axis2_status_t ( AXIS2_CALL *on_error ) (const axutil_env_t *, int exception, void *data) )
608
axis2_callback_t *callback = NULL;
610
axis2_svc_client_t *svc_client = NULL;
611
axis2_options_t *options = NULL;
613
const axis2_char_t *soap_action = NULL;
614
axiom_node_t *payload = NULL;
616
axis2_bool_t is_soap_act_set = AXIS2_TRUE;
618
axutil_string_t *soap_act = NULL;
621
struct axis2_stub_EucalyptusGL_GetKeys_callback_data *callback_data;
623
callback_data = (struct axis2_stub_EucalyptusGL_GetKeys_callback_data*) AXIS2_MALLOC(env->allocator,
624
sizeof(struct axis2_stub_EucalyptusGL_GetKeys_callback_data));
625
if(NULL == callback_data)
627
AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "Can not allocate memeory for the callback data structures");
632
payload = adb_GetKeys_serialize(_getKeys, env, NULL, NULL, AXIS2_TRUE, NULL, NULL);
637
options = axis2_stub_get_options( stub, env);
640
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE);
641
AXIS2_LOG_ERROR( env->log, AXIS2_LOG_SI, "options is null in stub");
644
svc_client = axis2_stub_get_svc_client (stub, env);
645
soap_action =axis2_options_get_action (options, env);
646
if (NULL == soap_action)
648
is_soap_act_set = AXIS2_FALSE;
649
soap_action = "EucalyptusGL#GetKeys";
651
soap_act = axutil_string_create(env, "EucalyptusGL#GetKeys");
652
axis2_options_set_soap_action(options, env, soap_act);
654
axis2_options_set_action( options, env, soap_action);
657
axis2_options_set_soap_version(options, env, AXIOM_SOAP11);
660
callback = axis2_callback_create(env);
661
/* Set our on_complete fucntion pointer to the callback object */
662
axis2_callback_set_on_complete(callback, axis2_stub_on_complete_EucalyptusGL_GetKeys);
663
/* Set our on_error function pointer to the callback object */
664
axis2_callback_set_on_error(callback, axis2_stub_on_error_EucalyptusGL_GetKeys);
666
callback_data-> data = user_data;
667
callback_data-> on_complete = on_complete;
668
callback_data-> on_error = on_error;
670
axis2_callback_set_data(callback, (void*)callback_data);
673
axis2_svc_client_send_receive_non_blocking(svc_client, env, payload, callback);
675
if (!is_soap_act_set)
678
axis2_options_set_soap_action(options, env, NULL);
680
axis2_options_set_action(options, env, NULL);
688
* function to free any soap input headers
694
* function to free any soap output headers