4
* adb_startNetworkResponseType.c
6
* This file was auto-generated from WSDL
7
* by the Apache Axis2/C version: SNAPSHOT Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
10
#include "adb_startNetworkResponseType.h"
13
* This type was generated from the piece of schema that had
14
* name = startNetworkResponseType
15
* Namespace URI = http://eucalyptus.ucsb.edu/
16
* Namespace Prefix = ns1
21
struct adb_startNetworkResponseType
23
axis2_char_t* property_correlationId;
26
axis2_bool_t is_valid_correlationId;
29
axis2_char_t* property_userId;
32
axis2_bool_t is_valid_userId;
35
axis2_char_t* property_statusMessage;
38
axis2_bool_t is_valid_statusMessage;
41
axis2_bool_t property_return;
44
axis2_bool_t is_valid_return;
51
/************************* Private Function prototypes ********************************/
54
axis2_status_t AXIS2_CALL
55
adb_startNetworkResponseType_set_correlationId_nil(
56
adb_startNetworkResponseType_t* _startNetworkResponseType,
57
const axutil_env_t *env);
60
axis2_status_t AXIS2_CALL
61
adb_startNetworkResponseType_set_userId_nil(
62
adb_startNetworkResponseType_t* _startNetworkResponseType,
63
const axutil_env_t *env);
66
axis2_status_t AXIS2_CALL
67
adb_startNetworkResponseType_set_return_nil(
68
adb_startNetworkResponseType_t* _startNetworkResponseType,
69
const axutil_env_t *env);
73
/************************* Function Implmentations ********************************/
74
adb_startNetworkResponseType_t* AXIS2_CALL
75
adb_startNetworkResponseType_create(
76
const axutil_env_t *env)
78
adb_startNetworkResponseType_t *_startNetworkResponseType = NULL;
80
AXIS2_ENV_CHECK(env, NULL);
82
_startNetworkResponseType = (adb_startNetworkResponseType_t *) AXIS2_MALLOC(env->
83
allocator, sizeof(adb_startNetworkResponseType_t));
85
if(NULL == _startNetworkResponseType)
87
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
91
memset(_startNetworkResponseType, 0, sizeof(adb_startNetworkResponseType_t));
93
_startNetworkResponseType->property_correlationId = NULL;
94
_startNetworkResponseType->is_valid_correlationId = AXIS2_FALSE;
95
_startNetworkResponseType->property_userId = NULL;
96
_startNetworkResponseType->is_valid_userId = AXIS2_FALSE;
97
_startNetworkResponseType->property_statusMessage = NULL;
98
_startNetworkResponseType->is_valid_statusMessage = AXIS2_FALSE;
99
_startNetworkResponseType->is_valid_return = AXIS2_FALSE;
102
return _startNetworkResponseType;
105
axis2_status_t AXIS2_CALL
106
adb_startNetworkResponseType_free (
107
adb_startNetworkResponseType_t* _startNetworkResponseType,
108
const axutil_env_t *env)
112
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
113
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, AXIS2_FAILURE);
115
adb_startNetworkResponseType_reset_correlationId(_startNetworkResponseType, env);
116
adb_startNetworkResponseType_reset_userId(_startNetworkResponseType, env);
117
adb_startNetworkResponseType_reset_statusMessage(_startNetworkResponseType, env);
118
adb_startNetworkResponseType_reset_return(_startNetworkResponseType, env);
121
if(_startNetworkResponseType)
123
AXIS2_FREE(env->allocator, _startNetworkResponseType);
124
_startNetworkResponseType = NULL;
126
return AXIS2_SUCCESS;
132
axis2_status_t AXIS2_CALL
133
adb_startNetworkResponseType_deserialize(
134
adb_startNetworkResponseType_t* _startNetworkResponseType,
135
const axutil_env_t *env,
136
axiom_node_t **dp_parent,
137
axis2_bool_t *dp_is_early_node_valid,
138
axis2_bool_t dont_care_minoccurs)
140
axiom_node_t *parent = *dp_parent;
142
axis2_status_t status = AXIS2_SUCCESS;
144
axis2_char_t* text_value = NULL;
145
axutil_qname_t *qname = NULL;
147
axutil_qname_t *element_qname = NULL;
149
axiom_node_t *first_node = NULL;
150
axis2_bool_t is_early_node_valid = AXIS2_TRUE;
151
axiom_node_t *current_node = NULL;
152
axiom_element_t *current_element = NULL;
154
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
155
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, AXIS2_FAILURE);
159
while(parent && axiom_node_get_node_type(parent, env) != AXIOM_ELEMENT)
161
parent = axiom_node_get_next_sibling(parent, env);
165
/* This should be checked before everything */
166
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
167
"Failed in building adb object for startNetworkResponseType : "
168
"NULL elemenet can not be passed to deserialize");
169
return AXIS2_FAILURE;
173
first_node = axiom_node_get_first_child(parent, env);
179
* building correlationId element
184
current_node = first_node;
185
is_early_node_valid = AXIS2_FALSE;
188
while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
190
current_node = axiom_node_get_next_sibling(current_node, env);
192
if(current_node != NULL)
194
current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
195
qname = axiom_element_get_qname(current_element, env, current_node);
198
element_qname = axutil_qname_create(env, "correlationId", "http://eucalyptus.ucsb.edu/", NULL);
202
(current_node && current_element && (axutil_qname_equals(element_qname, env, qname))))
204
if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))
206
is_early_node_valid = AXIS2_TRUE;
210
text_value = axiom_element_get_text(current_element, env, current_node);
211
if(text_value != NULL)
213
status = adb_startNetworkResponseType_set_correlationId(_startNetworkResponseType, env,
220
* axis2_qname_t *qname = NULL;
221
* axiom_attribute_t *the_attri = NULL;
223
* qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
224
* the_attri = axiom_element_get_attribute(current_element, env, qname);
226
/* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
228
axiom_attribute_t *the_attri = NULL;
229
axis2_char_t *attrib_text = NULL;
230
axutil_hash_t *attribute_hash = NULL;
232
attribute_hash = axiom_element_get_all_attributes(current_element, env);
237
axutil_hash_index_t *hi;
241
for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
243
axutil_hash_this(hi, &key, NULL, &val);
245
if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
247
the_attri = (axiom_attribute_t*)val;
255
attrib_text = axiom_attribute_get_value(the_attri, env);
259
/* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
260
attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
263
if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
265
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element correlationId");
266
status = AXIS2_FAILURE;
270
/* after all, we found this is a empty string */
271
status = adb_startNetworkResponseType_set_correlationId(_startNetworkResponseType, env,
276
if(AXIS2_FAILURE == status)
278
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for correlationId ");
281
axutil_qname_free(element_qname, env);
283
return AXIS2_FAILURE;
289
axutil_qname_free(element_qname, env);
290
element_qname = NULL;
296
* building userId element
302
* because elements are ordered this works fine
306
if(current_node != NULL && is_early_node_valid)
308
current_node = axiom_node_get_next_sibling(current_node, env);
311
while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
313
current_node = axiom_node_get_next_sibling(current_node, env);
315
if(current_node != NULL)
317
current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
318
qname = axiom_element_get_qname(current_element, env, current_node);
322
is_early_node_valid = AXIS2_FALSE;
324
element_qname = axutil_qname_create(env, "userId", "http://eucalyptus.ucsb.edu/", NULL);
328
(current_node && current_element && (axutil_qname_equals(element_qname, env, qname))))
330
if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))
332
is_early_node_valid = AXIS2_TRUE;
336
text_value = axiom_element_get_text(current_element, env, current_node);
337
if(text_value != NULL)
339
status = adb_startNetworkResponseType_set_userId(_startNetworkResponseType, env,
346
* axis2_qname_t *qname = NULL;
347
* axiom_attribute_t *the_attri = NULL;
349
* qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
350
* the_attri = axiom_element_get_attribute(current_element, env, qname);
352
/* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
354
axiom_attribute_t *the_attri = NULL;
355
axis2_char_t *attrib_text = NULL;
356
axutil_hash_t *attribute_hash = NULL;
358
attribute_hash = axiom_element_get_all_attributes(current_element, env);
363
axutil_hash_index_t *hi;
367
for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
369
axutil_hash_this(hi, &key, NULL, &val);
371
if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
373
the_attri = (axiom_attribute_t*)val;
381
attrib_text = axiom_attribute_get_value(the_attri, env);
385
/* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
386
attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
389
if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
391
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element userId");
392
status = AXIS2_FAILURE;
396
/* after all, we found this is a empty string */
397
status = adb_startNetworkResponseType_set_userId(_startNetworkResponseType, env,
402
if(AXIS2_FAILURE == status)
404
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for userId ");
407
axutil_qname_free(element_qname, env);
409
return AXIS2_FAILURE;
415
axutil_qname_free(element_qname, env);
416
element_qname = NULL;
422
* building statusMessage element
428
* because elements are ordered this works fine
432
if(current_node != NULL && is_early_node_valid)
434
current_node = axiom_node_get_next_sibling(current_node, env);
437
while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
439
current_node = axiom_node_get_next_sibling(current_node, env);
441
if(current_node != NULL)
443
current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
444
qname = axiom_element_get_qname(current_element, env, current_node);
448
is_early_node_valid = AXIS2_FALSE;
450
element_qname = axutil_qname_create(env, "statusMessage", "http://eucalyptus.ucsb.edu/", NULL);
454
(current_node && current_element && (axutil_qname_equals(element_qname, env, qname))))
456
if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))
458
is_early_node_valid = AXIS2_TRUE;
462
text_value = axiom_element_get_text(current_element, env, current_node);
463
if(text_value != NULL)
465
status = adb_startNetworkResponseType_set_statusMessage(_startNetworkResponseType, env,
469
if(AXIS2_FAILURE == status)
471
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for statusMessage ");
474
axutil_qname_free(element_qname, env);
476
return AXIS2_FAILURE;
482
axutil_qname_free(element_qname, env);
483
element_qname = NULL;
489
* building return element
495
* because elements are ordered this works fine
499
if(current_node != NULL && is_early_node_valid)
501
current_node = axiom_node_get_next_sibling(current_node, env);
504
while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
506
current_node = axiom_node_get_next_sibling(current_node, env);
508
if(current_node != NULL)
510
current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
511
qname = axiom_element_get_qname(current_element, env, current_node);
515
is_early_node_valid = AXIS2_FALSE;
517
element_qname = axutil_qname_create(env, "return", "http://eucalyptus.ucsb.edu/", NULL);
521
(current_node && current_element && (axutil_qname_equals(element_qname, env, qname))))
523
if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))
525
is_early_node_valid = AXIS2_TRUE;
529
text_value = axiom_element_get_text(current_element, env, current_node);
530
if(text_value != NULL)
532
if (!axutil_strcasecmp(text_value , "true"))
534
status = adb_startNetworkResponseType_set_return(_startNetworkResponseType, env,
539
status = adb_startNetworkResponseType_set_return(_startNetworkResponseType, env,
546
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element return");
547
status = AXIS2_FAILURE;
550
if(AXIS2_FAILURE == status)
552
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for return ");
555
axutil_qname_free(element_qname, env);
557
return AXIS2_FAILURE;
563
axutil_qname_free(element_qname, env);
564
element_qname = NULL;
570
axis2_bool_t AXIS2_CALL
571
adb_startNetworkResponseType_is_particle()
580
adb_startNetworkResponseType_declare_parent_namespaces(
581
adb_startNetworkResponseType_t* _startNetworkResponseType,
582
const axutil_env_t *env, axiom_element_t *parent_element,
583
axutil_hash_t *namespaces, int *next_ns_index)
586
/* Here this is an empty function, Nothing to declare */
592
axiom_node_t* AXIS2_CALL
593
adb_startNetworkResponseType_serialize(
594
adb_startNetworkResponseType_t* _startNetworkResponseType,
595
const axutil_env_t *env, axiom_node_t *parent, axiom_element_t *parent_element, int parent_tag_closed, axutil_hash_t *namespaces, int *next_ns_index)
599
axis2_char_t *string_to_stream;
602
axiom_node_t *current_node = NULL;
607
axiom_namespace_t *ns1 = NULL;
609
axis2_char_t *qname_uri = NULL;
610
axis2_char_t *qname_prefix = NULL;
611
axis2_char_t *p_prefix = NULL;
612
axis2_bool_t ns_already_defined;
614
axis2_char_t *text_value_1;
615
axis2_char_t *text_value_1_temp;
617
axis2_char_t *text_value_2;
618
axis2_char_t *text_value_2_temp;
620
axis2_char_t *text_value_3;
621
axis2_char_t *text_value_3_temp;
623
axis2_char_t text_value_4[64];
625
axis2_char_t *start_input_str = NULL;
626
axis2_char_t *end_input_str = NULL;
627
unsigned int start_input_str_len = 0;
628
unsigned int end_input_str_len = 0;
631
axiom_data_source_t *data_source = NULL;
632
axutil_stream_t *stream = NULL;
636
AXIS2_ENV_CHECK(env, NULL);
637
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, NULL);
640
current_node = parent;
641
data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, env);
644
stream = axiom_data_source_get_stream(data_source, env); /* assume parent is of type data source */
648
if(!parent_tag_closed)
651
string_to_stream = ">";
652
axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
657
if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
659
p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
660
sprintf(p_prefix, "n%d", (*next_ns_index)++);
661
axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
663
axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
664
"http://eucalyptus.ucsb.edu/",
669
if (!_startNetworkResponseType->is_valid_correlationId)
672
/* no need to complain for minoccurs=0 element */
678
start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
679
(4 + axutil_strlen(p_prefix) +
680
axutil_strlen("correlationId")));
682
/* axutil_strlen("<:>") + 1 = 4 */
683
end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
684
(5 + axutil_strlen(p_prefix) + axutil_strlen("correlationId")));
685
/* axutil_strlen("</:>") + 1 = 5 */
693
* parsing correlationId element
698
sprintf(start_input_str, "<%s%scorrelationId>",
699
p_prefix?p_prefix:"",
700
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
702
start_input_str_len = axutil_strlen(start_input_str);
703
sprintf(end_input_str, "</%s%scorrelationId>",
704
p_prefix?p_prefix:"",
705
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
706
end_input_str_len = axutil_strlen(end_input_str);
708
text_value_1 = _startNetworkResponseType->property_correlationId;
710
axutil_stream_write(stream, env, start_input_str, start_input_str_len);
713
text_value_1_temp = axutil_xml_quote_string(env, text_value_1, AXIS2_TRUE);
714
if (text_value_1_temp)
716
axutil_stream_write(stream, env, text_value_1_temp, axutil_strlen(text_value_1_temp));
717
AXIS2_FREE(env->allocator, text_value_1_temp);
721
axutil_stream_write(stream, env, text_value_1, axutil_strlen(text_value_1));
724
axutil_stream_write(stream, env, end_input_str, end_input_str_len);
727
AXIS2_FREE(env->allocator,start_input_str);
728
AXIS2_FREE(env->allocator,end_input_str);
732
if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
734
p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
735
sprintf(p_prefix, "n%d", (*next_ns_index)++);
736
axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
738
axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
739
"http://eucalyptus.ucsb.edu/",
744
if (!_startNetworkResponseType->is_valid_userId)
747
/* no need to complain for minoccurs=0 element */
753
start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
754
(4 + axutil_strlen(p_prefix) +
755
axutil_strlen("userId")));
757
/* axutil_strlen("<:>") + 1 = 4 */
758
end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
759
(5 + axutil_strlen(p_prefix) + axutil_strlen("userId")));
760
/* axutil_strlen("</:>") + 1 = 5 */
768
* parsing userId element
773
sprintf(start_input_str, "<%s%suserId>",
774
p_prefix?p_prefix:"",
775
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
777
start_input_str_len = axutil_strlen(start_input_str);
778
sprintf(end_input_str, "</%s%suserId>",
779
p_prefix?p_prefix:"",
780
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
781
end_input_str_len = axutil_strlen(end_input_str);
783
text_value_2 = _startNetworkResponseType->property_userId;
785
axutil_stream_write(stream, env, start_input_str, start_input_str_len);
788
text_value_2_temp = axutil_xml_quote_string(env, text_value_2, AXIS2_TRUE);
789
if (text_value_2_temp)
791
axutil_stream_write(stream, env, text_value_2_temp, axutil_strlen(text_value_2_temp));
792
AXIS2_FREE(env->allocator, text_value_2_temp);
796
axutil_stream_write(stream, env, text_value_2, axutil_strlen(text_value_2));
799
axutil_stream_write(stream, env, end_input_str, end_input_str_len);
802
AXIS2_FREE(env->allocator,start_input_str);
803
AXIS2_FREE(env->allocator,end_input_str);
807
if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
809
p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
810
sprintf(p_prefix, "n%d", (*next_ns_index)++);
811
axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
813
axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
814
"http://eucalyptus.ucsb.edu/",
819
if (!_startNetworkResponseType->is_valid_statusMessage)
822
/* no need to complain for minoccurs=0 element */
828
start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
829
(4 + axutil_strlen(p_prefix) +
830
axutil_strlen("statusMessage")));
832
/* axutil_strlen("<:>") + 1 = 4 */
833
end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
834
(5 + axutil_strlen(p_prefix) + axutil_strlen("statusMessage")));
835
/* axutil_strlen("</:>") + 1 = 5 */
843
* parsing statusMessage element
848
sprintf(start_input_str, "<%s%sstatusMessage>",
849
p_prefix?p_prefix:"",
850
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
852
start_input_str_len = axutil_strlen(start_input_str);
853
sprintf(end_input_str, "</%s%sstatusMessage>",
854
p_prefix?p_prefix:"",
855
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
856
end_input_str_len = axutil_strlen(end_input_str);
858
text_value_3 = _startNetworkResponseType->property_statusMessage;
860
axutil_stream_write(stream, env, start_input_str, start_input_str_len);
863
text_value_3_temp = axutil_xml_quote_string(env, text_value_3, AXIS2_TRUE);
864
if (text_value_3_temp)
866
axutil_stream_write(stream, env, text_value_3_temp, axutil_strlen(text_value_3_temp));
867
AXIS2_FREE(env->allocator, text_value_3_temp);
871
axutil_stream_write(stream, env, text_value_3, axutil_strlen(text_value_3));
874
axutil_stream_write(stream, env, end_input_str, end_input_str_len);
877
AXIS2_FREE(env->allocator,start_input_str);
878
AXIS2_FREE(env->allocator,end_input_str);
882
if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
884
p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
885
sprintf(p_prefix, "n%d", (*next_ns_index)++);
886
axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
888
axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
889
"http://eucalyptus.ucsb.edu/",
894
if (!_startNetworkResponseType->is_valid_return)
897
/* no need to complain for minoccurs=0 element */
903
start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
904
(4 + axutil_strlen(p_prefix) +
905
axutil_strlen("return")));
907
/* axutil_strlen("<:>") + 1 = 4 */
908
end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
909
(5 + axutil_strlen(p_prefix) + axutil_strlen("return")));
910
/* axutil_strlen("</:>") + 1 = 5 */
918
* parsing return element
923
sprintf(start_input_str, "<%s%sreturn>",
924
p_prefix?p_prefix:"",
925
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
927
start_input_str_len = axutil_strlen(start_input_str);
928
sprintf(end_input_str, "</%s%sreturn>",
929
p_prefix?p_prefix:"",
930
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
931
end_input_str_len = axutil_strlen(end_input_str);
933
strcpy(text_value_4, (_startNetworkResponseType->property_return)?"true":"false");
935
axutil_stream_write(stream, env, start_input_str, start_input_str_len);
937
axutil_stream_write(stream, env, text_value_4, axutil_strlen(text_value_4));
939
axutil_stream_write(stream, env, end_input_str, end_input_str_len);
942
AXIS2_FREE(env->allocator,start_input_str);
943
AXIS2_FREE(env->allocator,end_input_str);
955
* getter for correlationId.
957
axis2_char_t* AXIS2_CALL
958
adb_startNetworkResponseType_get_correlationId(
959
adb_startNetworkResponseType_t* _startNetworkResponseType,
960
const axutil_env_t *env)
963
AXIS2_ENV_CHECK(env, NULL);
964
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, NULL);
967
return _startNetworkResponseType->property_correlationId;
971
* setter for correlationId
973
axis2_status_t AXIS2_CALL
974
adb_startNetworkResponseType_set_correlationId(
975
adb_startNetworkResponseType_t* _startNetworkResponseType,
976
const axutil_env_t *env,
977
const axis2_char_t* arg_correlationId)
981
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
982
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, AXIS2_FAILURE);
984
if(_startNetworkResponseType->is_valid_correlationId &&
985
arg_correlationId == _startNetworkResponseType->property_correlationId)
988
return AXIS2_SUCCESS;
991
adb_startNetworkResponseType_reset_correlationId(_startNetworkResponseType, env);
994
if(NULL == arg_correlationId)
996
/* We are already done */
997
return AXIS2_SUCCESS;
999
_startNetworkResponseType->property_correlationId = (axis2_char_t *)axutil_strdup(env, arg_correlationId);
1000
if(NULL == _startNetworkResponseType->property_correlationId)
1002
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for correlationId");
1003
return AXIS2_FAILURE;
1005
_startNetworkResponseType->is_valid_correlationId = AXIS2_TRUE;
1007
return AXIS2_SUCCESS;
1013
* resetter for correlationId
1015
axis2_status_t AXIS2_CALL
1016
adb_startNetworkResponseType_reset_correlationId(
1017
adb_startNetworkResponseType_t* _startNetworkResponseType,
1018
const axutil_env_t *env)
1022
void *element = NULL;
1024
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1025
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, AXIS2_FAILURE);
1031
if(_startNetworkResponseType->property_correlationId != NULL)
1035
AXIS2_FREE(env-> allocator, _startNetworkResponseType->property_correlationId);
1036
_startNetworkResponseType->property_correlationId = NULL;
1041
_startNetworkResponseType->is_valid_correlationId = AXIS2_FALSE;
1042
return AXIS2_SUCCESS;
1046
* Check whether correlationId is nill
1048
axis2_bool_t AXIS2_CALL
1049
adb_startNetworkResponseType_is_correlationId_nil(
1050
adb_startNetworkResponseType_t* _startNetworkResponseType,
1051
const axutil_env_t *env)
1053
AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1054
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, AXIS2_TRUE);
1056
return !_startNetworkResponseType->is_valid_correlationId;
1060
* Set correlationId to nill (currently the same as reset)
1062
axis2_status_t AXIS2_CALL
1063
adb_startNetworkResponseType_set_correlationId_nil(
1064
adb_startNetworkResponseType_t* _startNetworkResponseType,
1065
const axutil_env_t *env)
1067
return adb_startNetworkResponseType_reset_correlationId(_startNetworkResponseType, env);
1073
* getter for userId.
1075
axis2_char_t* AXIS2_CALL
1076
adb_startNetworkResponseType_get_userId(
1077
adb_startNetworkResponseType_t* _startNetworkResponseType,
1078
const axutil_env_t *env)
1081
AXIS2_ENV_CHECK(env, NULL);
1082
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, NULL);
1085
return _startNetworkResponseType->property_userId;
1091
axis2_status_t AXIS2_CALL
1092
adb_startNetworkResponseType_set_userId(
1093
adb_startNetworkResponseType_t* _startNetworkResponseType,
1094
const axutil_env_t *env,
1095
const axis2_char_t* arg_userId)
1099
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1100
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, AXIS2_FAILURE);
1102
if(_startNetworkResponseType->is_valid_userId &&
1103
arg_userId == _startNetworkResponseType->property_userId)
1106
return AXIS2_SUCCESS;
1109
adb_startNetworkResponseType_reset_userId(_startNetworkResponseType, env);
1112
if(NULL == arg_userId)
1114
/* We are already done */
1115
return AXIS2_SUCCESS;
1117
_startNetworkResponseType->property_userId = (axis2_char_t *)axutil_strdup(env, arg_userId);
1118
if(NULL == _startNetworkResponseType->property_userId)
1120
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for userId");
1121
return AXIS2_FAILURE;
1123
_startNetworkResponseType->is_valid_userId = AXIS2_TRUE;
1125
return AXIS2_SUCCESS;
1131
* resetter for userId
1133
axis2_status_t AXIS2_CALL
1134
adb_startNetworkResponseType_reset_userId(
1135
adb_startNetworkResponseType_t* _startNetworkResponseType,
1136
const axutil_env_t *env)
1140
void *element = NULL;
1142
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1143
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, AXIS2_FAILURE);
1149
if(_startNetworkResponseType->property_userId != NULL)
1153
AXIS2_FREE(env-> allocator, _startNetworkResponseType->property_userId);
1154
_startNetworkResponseType->property_userId = NULL;
1159
_startNetworkResponseType->is_valid_userId = AXIS2_FALSE;
1160
return AXIS2_SUCCESS;
1164
* Check whether userId is nill
1166
axis2_bool_t AXIS2_CALL
1167
adb_startNetworkResponseType_is_userId_nil(
1168
adb_startNetworkResponseType_t* _startNetworkResponseType,
1169
const axutil_env_t *env)
1171
AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1172
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, AXIS2_TRUE);
1174
return !_startNetworkResponseType->is_valid_userId;
1178
* Set userId to nill (currently the same as reset)
1180
axis2_status_t AXIS2_CALL
1181
adb_startNetworkResponseType_set_userId_nil(
1182
adb_startNetworkResponseType_t* _startNetworkResponseType,
1183
const axutil_env_t *env)
1185
return adb_startNetworkResponseType_reset_userId(_startNetworkResponseType, env);
1191
* getter for statusMessage.
1193
axis2_char_t* AXIS2_CALL
1194
adb_startNetworkResponseType_get_statusMessage(
1195
adb_startNetworkResponseType_t* _startNetworkResponseType,
1196
const axutil_env_t *env)
1199
AXIS2_ENV_CHECK(env, NULL);
1200
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, NULL);
1203
return _startNetworkResponseType->property_statusMessage;
1207
* setter for statusMessage
1209
axis2_status_t AXIS2_CALL
1210
adb_startNetworkResponseType_set_statusMessage(
1211
adb_startNetworkResponseType_t* _startNetworkResponseType,
1212
const axutil_env_t *env,
1213
const axis2_char_t* arg_statusMessage)
1217
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1218
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, AXIS2_FAILURE);
1220
if(_startNetworkResponseType->is_valid_statusMessage &&
1221
arg_statusMessage == _startNetworkResponseType->property_statusMessage)
1224
return AXIS2_SUCCESS;
1227
adb_startNetworkResponseType_reset_statusMessage(_startNetworkResponseType, env);
1230
if(NULL == arg_statusMessage)
1232
/* We are already done */
1233
return AXIS2_SUCCESS;
1235
_startNetworkResponseType->property_statusMessage = (axis2_char_t *)axutil_strdup(env, arg_statusMessage);
1236
if(NULL == _startNetworkResponseType->property_statusMessage)
1238
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for statusMessage");
1239
return AXIS2_FAILURE;
1241
_startNetworkResponseType->is_valid_statusMessage = AXIS2_TRUE;
1243
return AXIS2_SUCCESS;
1249
* resetter for statusMessage
1251
axis2_status_t AXIS2_CALL
1252
adb_startNetworkResponseType_reset_statusMessage(
1253
adb_startNetworkResponseType_t* _startNetworkResponseType,
1254
const axutil_env_t *env)
1258
void *element = NULL;
1260
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1261
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, AXIS2_FAILURE);
1267
if(_startNetworkResponseType->property_statusMessage != NULL)
1271
AXIS2_FREE(env-> allocator, _startNetworkResponseType->property_statusMessage);
1272
_startNetworkResponseType->property_statusMessage = NULL;
1277
_startNetworkResponseType->is_valid_statusMessage = AXIS2_FALSE;
1278
return AXIS2_SUCCESS;
1282
* Check whether statusMessage is nill
1284
axis2_bool_t AXIS2_CALL
1285
adb_startNetworkResponseType_is_statusMessage_nil(
1286
adb_startNetworkResponseType_t* _startNetworkResponseType,
1287
const axutil_env_t *env)
1289
AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1290
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, AXIS2_TRUE);
1292
return !_startNetworkResponseType->is_valid_statusMessage;
1296
* Set statusMessage to nill (currently the same as reset)
1298
axis2_status_t AXIS2_CALL
1299
adb_startNetworkResponseType_set_statusMessage_nil(
1300
adb_startNetworkResponseType_t* _startNetworkResponseType,
1301
const axutil_env_t *env)
1303
return adb_startNetworkResponseType_reset_statusMessage(_startNetworkResponseType, env);
1309
* getter for return.
1311
axis2_bool_t AXIS2_CALL
1312
adb_startNetworkResponseType_get_return(
1313
adb_startNetworkResponseType_t* _startNetworkResponseType,
1314
const axutil_env_t *env)
1317
AXIS2_ENV_CHECK(env, (axis2_bool_t)0);
1318
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, (axis2_bool_t)0);
1321
return _startNetworkResponseType->property_return;
1327
axis2_status_t AXIS2_CALL
1328
adb_startNetworkResponseType_set_return(
1329
adb_startNetworkResponseType_t* _startNetworkResponseType,
1330
const axutil_env_t *env,
1331
axis2_bool_t arg_return)
1335
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1336
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, AXIS2_FAILURE);
1338
if(_startNetworkResponseType->is_valid_return &&
1339
arg_return == _startNetworkResponseType->property_return)
1342
return AXIS2_SUCCESS;
1345
adb_startNetworkResponseType_reset_return(_startNetworkResponseType, env);
1347
_startNetworkResponseType->property_return = arg_return;
1348
_startNetworkResponseType->is_valid_return = AXIS2_TRUE;
1350
return AXIS2_SUCCESS;
1356
* resetter for return
1358
axis2_status_t AXIS2_CALL
1359
adb_startNetworkResponseType_reset_return(
1360
adb_startNetworkResponseType_t* _startNetworkResponseType,
1361
const axutil_env_t *env)
1365
void *element = NULL;
1367
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1368
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, AXIS2_FAILURE);
1371
_startNetworkResponseType->is_valid_return = AXIS2_FALSE;
1372
return AXIS2_SUCCESS;
1376
* Check whether return is nill
1378
axis2_bool_t AXIS2_CALL
1379
adb_startNetworkResponseType_is_return_nil(
1380
adb_startNetworkResponseType_t* _startNetworkResponseType,
1381
const axutil_env_t *env)
1383
AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1384
AXIS2_PARAM_CHECK(env->error, _startNetworkResponseType, AXIS2_TRUE);
1386
return !_startNetworkResponseType->is_valid_return;
1390
* Set return to nill (currently the same as reset)
1392
axis2_status_t AXIS2_CALL
1393
adb_startNetworkResponseType_set_return_nil(
1394
adb_startNetworkResponseType_t* _startNetworkResponseType,
1395
const axutil_env_t *env)
1397
return adb_startNetworkResponseType_reset_return(_startNetworkResponseType, env);