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_volumeType.h"
13
* This type was generated from the piece of schema that had
15
* Namespace URI = http://eucalyptus.ucsb.edu/
16
* Namespace Prefix = ns1
23
axis2_char_t* property_volumeId;
26
axis2_bool_t is_valid_volumeId;
29
axis2_char_t* property_remoteDev;
32
axis2_bool_t is_valid_remoteDev;
35
axis2_char_t* property_localDev;
38
axis2_bool_t is_valid_localDev;
41
axis2_char_t* property_state;
44
axis2_bool_t is_valid_state;
51
/************************* Private Function prototypes ********************************/
54
axis2_status_t AXIS2_CALL
55
adb_volumeType_set_volumeId_nil(
56
adb_volumeType_t* _volumeType,
57
const axutil_env_t *env);
60
axis2_status_t AXIS2_CALL
61
adb_volumeType_set_remoteDev_nil(
62
adb_volumeType_t* _volumeType,
63
const axutil_env_t *env);
66
axis2_status_t AXIS2_CALL
67
adb_volumeType_set_localDev_nil(
68
adb_volumeType_t* _volumeType,
69
const axutil_env_t *env);
72
axis2_status_t AXIS2_CALL
73
adb_volumeType_set_state_nil(
74
adb_volumeType_t* _volumeType,
75
const axutil_env_t *env);
79
/************************* Function Implmentations ********************************/
80
adb_volumeType_t* AXIS2_CALL
81
adb_volumeType_create(
82
const axutil_env_t *env)
84
adb_volumeType_t *_volumeType = NULL;
86
AXIS2_ENV_CHECK(env, NULL);
88
_volumeType = (adb_volumeType_t *) AXIS2_MALLOC(env->
89
allocator, sizeof(adb_volumeType_t));
91
if(NULL == _volumeType)
93
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
97
memset(_volumeType, 0, sizeof(adb_volumeType_t));
99
_volumeType->property_volumeId = NULL;
100
_volumeType->is_valid_volumeId = AXIS2_FALSE;
101
_volumeType->property_remoteDev = NULL;
102
_volumeType->is_valid_remoteDev = AXIS2_FALSE;
103
_volumeType->property_localDev = NULL;
104
_volumeType->is_valid_localDev = AXIS2_FALSE;
105
_volumeType->property_state = NULL;
106
_volumeType->is_valid_state = AXIS2_FALSE;
112
axis2_status_t AXIS2_CALL
113
adb_volumeType_free (
114
adb_volumeType_t* _volumeType,
115
const axutil_env_t *env)
119
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
120
AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
122
adb_volumeType_reset_volumeId(_volumeType, env);
123
adb_volumeType_reset_remoteDev(_volumeType, env);
124
adb_volumeType_reset_localDev(_volumeType, env);
125
adb_volumeType_reset_state(_volumeType, env);
130
AXIS2_FREE(env->allocator, _volumeType);
133
return AXIS2_SUCCESS;
139
axis2_status_t AXIS2_CALL
140
adb_volumeType_deserialize(
141
adb_volumeType_t* _volumeType,
142
const axutil_env_t *env,
143
axiom_node_t **dp_parent,
144
axis2_bool_t *dp_is_early_node_valid,
145
axis2_bool_t dont_care_minoccurs)
147
axiom_node_t *parent = *dp_parent;
149
axis2_status_t status = AXIS2_SUCCESS;
151
axis2_char_t* text_value = NULL;
152
axutil_qname_t *qname = NULL;
154
axutil_qname_t *element_qname = NULL;
156
axiom_node_t *first_node = NULL;
157
axis2_bool_t is_early_node_valid = AXIS2_TRUE;
158
axiom_node_t *current_node = NULL;
159
axiom_element_t *current_element = NULL;
161
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
162
AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
166
while(parent && axiom_node_get_node_type(parent, env) != AXIOM_ELEMENT)
168
parent = axiom_node_get_next_sibling(parent, env);
172
/* This should be checked before everything */
173
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
174
"Failed in building adb object for volumeType : "
175
"NULL elemenet can not be passed to deserialize");
176
return AXIS2_FAILURE;
180
first_node = axiom_node_get_first_child(parent, env);
186
* building volumeId element
191
current_node = first_node;
192
is_early_node_valid = AXIS2_FALSE;
195
while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
197
current_node = axiom_node_get_next_sibling(current_node, env);
199
if(current_node != NULL)
201
current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
202
qname = axiom_element_get_qname(current_element, env, current_node);
205
element_qname = axutil_qname_create(env, "volumeId", "http://eucalyptus.ucsb.edu/", NULL);
209
(current_node && current_element && (axutil_qname_equals(element_qname, env, qname))))
211
if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))
213
is_early_node_valid = AXIS2_TRUE;
217
text_value = axiom_element_get_text(current_element, env, current_node);
218
if(text_value != NULL)
220
status = adb_volumeType_set_volumeId(_volumeType, env,
227
* axis2_qname_t *qname = NULL;
228
* axiom_attribute_t *the_attri = NULL;
230
* qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
231
* the_attri = axiom_element_get_attribute(current_element, env, qname);
233
/* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
235
axiom_attribute_t *the_attri = NULL;
236
axis2_char_t *attrib_text = NULL;
237
axutil_hash_t *attribute_hash = NULL;
239
attribute_hash = axiom_element_get_all_attributes(current_element, env);
244
axutil_hash_index_t *hi;
248
for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
250
axutil_hash_this(hi, &key, NULL, &val);
252
if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
254
the_attri = (axiom_attribute_t*)val;
262
attrib_text = axiom_attribute_get_value(the_attri, env);
266
/* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
267
attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
270
if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
272
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element volumeId");
273
status = AXIS2_FAILURE;
277
/* after all, we found this is a empty string */
278
status = adb_volumeType_set_volumeId(_volumeType, env,
283
if(AXIS2_FAILURE == status)
285
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for volumeId ");
288
axutil_qname_free(element_qname, env);
290
return AXIS2_FAILURE;
296
axutil_qname_free(element_qname, env);
297
element_qname = NULL;
303
* building remoteDev element
309
* because elements are ordered this works fine
313
if(current_node != NULL && is_early_node_valid)
315
current_node = axiom_node_get_next_sibling(current_node, env);
318
while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
320
current_node = axiom_node_get_next_sibling(current_node, env);
322
if(current_node != NULL)
324
current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
325
qname = axiom_element_get_qname(current_element, env, current_node);
329
is_early_node_valid = AXIS2_FALSE;
331
element_qname = axutil_qname_create(env, "remoteDev", "http://eucalyptus.ucsb.edu/", NULL);
335
(current_node && current_element && (axutil_qname_equals(element_qname, env, qname))))
337
if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))
339
is_early_node_valid = AXIS2_TRUE;
343
text_value = axiom_element_get_text(current_element, env, current_node);
344
if(text_value != NULL)
346
status = adb_volumeType_set_remoteDev(_volumeType, env,
353
* axis2_qname_t *qname = NULL;
354
* axiom_attribute_t *the_attri = NULL;
356
* qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
357
* the_attri = axiom_element_get_attribute(current_element, env, qname);
359
/* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
361
axiom_attribute_t *the_attri = NULL;
362
axis2_char_t *attrib_text = NULL;
363
axutil_hash_t *attribute_hash = NULL;
365
attribute_hash = axiom_element_get_all_attributes(current_element, env);
370
axutil_hash_index_t *hi;
374
for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
376
axutil_hash_this(hi, &key, NULL, &val);
378
if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
380
the_attri = (axiom_attribute_t*)val;
388
attrib_text = axiom_attribute_get_value(the_attri, env);
392
/* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
393
attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
396
if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
398
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element remoteDev");
399
status = AXIS2_FAILURE;
403
/* after all, we found this is a empty string */
404
status = adb_volumeType_set_remoteDev(_volumeType, env,
409
if(AXIS2_FAILURE == status)
411
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for remoteDev ");
414
axutil_qname_free(element_qname, env);
416
return AXIS2_FAILURE;
422
axutil_qname_free(element_qname, env);
423
element_qname = NULL;
429
* building localDev element
435
* because elements are ordered this works fine
439
if(current_node != NULL && is_early_node_valid)
441
current_node = axiom_node_get_next_sibling(current_node, env);
444
while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
446
current_node = axiom_node_get_next_sibling(current_node, env);
448
if(current_node != NULL)
450
current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
451
qname = axiom_element_get_qname(current_element, env, current_node);
455
is_early_node_valid = AXIS2_FALSE;
457
element_qname = axutil_qname_create(env, "localDev", "http://eucalyptus.ucsb.edu/", NULL);
461
(current_node && current_element && (axutil_qname_equals(element_qname, env, qname))))
463
if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))
465
is_early_node_valid = AXIS2_TRUE;
469
text_value = axiom_element_get_text(current_element, env, current_node);
470
if(text_value != NULL)
472
status = adb_volumeType_set_localDev(_volumeType, env,
479
* axis2_qname_t *qname = NULL;
480
* axiom_attribute_t *the_attri = NULL;
482
* qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
483
* the_attri = axiom_element_get_attribute(current_element, env, qname);
485
/* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
487
axiom_attribute_t *the_attri = NULL;
488
axis2_char_t *attrib_text = NULL;
489
axutil_hash_t *attribute_hash = NULL;
491
attribute_hash = axiom_element_get_all_attributes(current_element, env);
496
axutil_hash_index_t *hi;
500
for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
502
axutil_hash_this(hi, &key, NULL, &val);
504
if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
506
the_attri = (axiom_attribute_t*)val;
514
attrib_text = axiom_attribute_get_value(the_attri, env);
518
/* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
519
attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
522
if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
524
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element localDev");
525
status = AXIS2_FAILURE;
529
/* after all, we found this is a empty string */
530
status = adb_volumeType_set_localDev(_volumeType, env,
535
if(AXIS2_FAILURE == status)
537
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for localDev ");
540
axutil_qname_free(element_qname, env);
542
return AXIS2_FAILURE;
548
axutil_qname_free(element_qname, env);
549
element_qname = NULL;
555
* building state element
561
* because elements are ordered this works fine
565
if(current_node != NULL && is_early_node_valid)
567
current_node = axiom_node_get_next_sibling(current_node, env);
570
while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
572
current_node = axiom_node_get_next_sibling(current_node, env);
574
if(current_node != NULL)
576
current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
577
qname = axiom_element_get_qname(current_element, env, current_node);
581
is_early_node_valid = AXIS2_FALSE;
583
element_qname = axutil_qname_create(env, "state", "http://eucalyptus.ucsb.edu/", NULL);
587
(current_node && current_element && (axutil_qname_equals(element_qname, env, qname))))
589
if( current_node && current_element && (axutil_qname_equals(element_qname, env, qname)))
591
is_early_node_valid = AXIS2_TRUE;
595
text_value = axiom_element_get_text(current_element, env, current_node);
596
if(text_value != NULL)
598
status = adb_volumeType_set_state(_volumeType, env,
605
* axis2_qname_t *qname = NULL;
606
* axiom_attribute_t *the_attri = NULL;
608
* qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
609
* the_attri = axiom_element_get_attribute(current_element, env, qname);
611
/* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
613
axiom_attribute_t *the_attri = NULL;
614
axis2_char_t *attrib_text = NULL;
615
axutil_hash_t *attribute_hash = NULL;
617
attribute_hash = axiom_element_get_all_attributes(current_element, env);
622
axutil_hash_index_t *hi;
626
for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
628
axutil_hash_this(hi, &key, NULL, &val);
630
if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
632
the_attri = (axiom_attribute_t*)val;
640
attrib_text = axiom_attribute_get_value(the_attri, env);
644
/* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
645
attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
648
if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
650
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element state");
651
status = AXIS2_FAILURE;
655
/* after all, we found this is a empty string */
656
status = adb_volumeType_set_state(_volumeType, env,
661
if(AXIS2_FAILURE == status)
663
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for state ");
666
axutil_qname_free(element_qname, env);
668
return AXIS2_FAILURE;
674
axutil_qname_free(element_qname, env);
675
element_qname = NULL;
681
axis2_bool_t AXIS2_CALL
682
adb_volumeType_is_particle()
691
adb_volumeType_declare_parent_namespaces(
692
adb_volumeType_t* _volumeType,
693
const axutil_env_t *env, axiom_element_t *parent_element,
694
axutil_hash_t *namespaces, int *next_ns_index)
697
/* Here this is an empty function, Nothing to declare */
703
axiom_node_t* AXIS2_CALL
704
adb_volumeType_serialize(
705
adb_volumeType_t* _volumeType,
706
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)
710
axis2_char_t *string_to_stream;
713
axiom_node_t *current_node = NULL;
718
axiom_namespace_t *ns1 = NULL;
720
axis2_char_t *qname_uri = NULL;
721
axis2_char_t *qname_prefix = NULL;
722
axis2_char_t *p_prefix = NULL;
723
axis2_bool_t ns_already_defined;
725
axis2_char_t *text_value_1;
726
axis2_char_t *text_value_1_temp;
728
axis2_char_t *text_value_2;
729
axis2_char_t *text_value_2_temp;
731
axis2_char_t *text_value_3;
732
axis2_char_t *text_value_3_temp;
734
axis2_char_t *text_value_4;
735
axis2_char_t *text_value_4_temp;
737
axis2_char_t *start_input_str = NULL;
738
axis2_char_t *end_input_str = NULL;
739
unsigned int start_input_str_len = 0;
740
unsigned int end_input_str_len = 0;
743
axiom_data_source_t *data_source = NULL;
744
axutil_stream_t *stream = NULL;
748
AXIS2_ENV_CHECK(env, NULL);
749
AXIS2_PARAM_CHECK(env->error, _volumeType, NULL);
752
current_node = parent;
753
data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, env);
756
stream = axiom_data_source_get_stream(data_source, env); /* assume parent is of type data source */
760
if(!parent_tag_closed)
763
string_to_stream = ">";
764
axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
769
if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
771
p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
772
sprintf(p_prefix, "n%d", (*next_ns_index)++);
773
axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
775
axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
776
"http://eucalyptus.ucsb.edu/",
781
if (!_volumeType->is_valid_volumeId)
784
/* no need to complain for minoccurs=0 element */
790
start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
791
(4 + axutil_strlen(p_prefix) +
792
axutil_strlen("volumeId")));
794
/* axutil_strlen("<:>") + 1 = 4 */
795
end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
796
(5 + axutil_strlen(p_prefix) + axutil_strlen("volumeId")));
797
/* axutil_strlen("</:>") + 1 = 5 */
805
* parsing volumeId element
810
sprintf(start_input_str, "<%s%svolumeId>",
811
p_prefix?p_prefix:"",
812
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
814
start_input_str_len = axutil_strlen(start_input_str);
815
sprintf(end_input_str, "</%s%svolumeId>",
816
p_prefix?p_prefix:"",
817
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
818
end_input_str_len = axutil_strlen(end_input_str);
820
text_value_1 = _volumeType->property_volumeId;
822
axutil_stream_write(stream, env, start_input_str, start_input_str_len);
825
text_value_1_temp = axutil_xml_quote_string(env, text_value_1, AXIS2_TRUE);
826
if (text_value_1_temp)
828
axutil_stream_write(stream, env, text_value_1_temp, axutil_strlen(text_value_1_temp));
829
AXIS2_FREE(env->allocator, text_value_1_temp);
833
axutil_stream_write(stream, env, text_value_1, axutil_strlen(text_value_1));
836
axutil_stream_write(stream, env, end_input_str, end_input_str_len);
839
AXIS2_FREE(env->allocator,start_input_str);
840
AXIS2_FREE(env->allocator,end_input_str);
844
if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
846
p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
847
sprintf(p_prefix, "n%d", (*next_ns_index)++);
848
axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
850
axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
851
"http://eucalyptus.ucsb.edu/",
856
if (!_volumeType->is_valid_remoteDev)
859
/* no need to complain for minoccurs=0 element */
865
start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
866
(4 + axutil_strlen(p_prefix) +
867
axutil_strlen("remoteDev")));
869
/* axutil_strlen("<:>") + 1 = 4 */
870
end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
871
(5 + axutil_strlen(p_prefix) + axutil_strlen("remoteDev")));
872
/* axutil_strlen("</:>") + 1 = 5 */
880
* parsing remoteDev element
885
sprintf(start_input_str, "<%s%sremoteDev>",
886
p_prefix?p_prefix:"",
887
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
889
start_input_str_len = axutil_strlen(start_input_str);
890
sprintf(end_input_str, "</%s%sremoteDev>",
891
p_prefix?p_prefix:"",
892
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
893
end_input_str_len = axutil_strlen(end_input_str);
895
text_value_2 = _volumeType->property_remoteDev;
897
axutil_stream_write(stream, env, start_input_str, start_input_str_len);
900
text_value_2_temp = axutil_xml_quote_string(env, text_value_2, AXIS2_TRUE);
901
if (text_value_2_temp)
903
axutil_stream_write(stream, env, text_value_2_temp, axutil_strlen(text_value_2_temp));
904
AXIS2_FREE(env->allocator, text_value_2_temp);
908
axutil_stream_write(stream, env, text_value_2, axutil_strlen(text_value_2));
911
axutil_stream_write(stream, env, end_input_str, end_input_str_len);
914
AXIS2_FREE(env->allocator,start_input_str);
915
AXIS2_FREE(env->allocator,end_input_str);
919
if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
921
p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
922
sprintf(p_prefix, "n%d", (*next_ns_index)++);
923
axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
925
axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
926
"http://eucalyptus.ucsb.edu/",
931
if (!_volumeType->is_valid_localDev)
934
/* no need to complain for minoccurs=0 element */
940
start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
941
(4 + axutil_strlen(p_prefix) +
942
axutil_strlen("localDev")));
944
/* axutil_strlen("<:>") + 1 = 4 */
945
end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
946
(5 + axutil_strlen(p_prefix) + axutil_strlen("localDev")));
947
/* axutil_strlen("</:>") + 1 = 5 */
955
* parsing localDev element
960
sprintf(start_input_str, "<%s%slocalDev>",
961
p_prefix?p_prefix:"",
962
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
964
start_input_str_len = axutil_strlen(start_input_str);
965
sprintf(end_input_str, "</%s%slocalDev>",
966
p_prefix?p_prefix:"",
967
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
968
end_input_str_len = axutil_strlen(end_input_str);
970
text_value_3 = _volumeType->property_localDev;
972
axutil_stream_write(stream, env, start_input_str, start_input_str_len);
975
text_value_3_temp = axutil_xml_quote_string(env, text_value_3, AXIS2_TRUE);
976
if (text_value_3_temp)
978
axutil_stream_write(stream, env, text_value_3_temp, axutil_strlen(text_value_3_temp));
979
AXIS2_FREE(env->allocator, text_value_3_temp);
983
axutil_stream_write(stream, env, text_value_3, axutil_strlen(text_value_3));
986
axutil_stream_write(stream, env, end_input_str, end_input_str_len);
989
AXIS2_FREE(env->allocator,start_input_str);
990
AXIS2_FREE(env->allocator,end_input_str);
994
if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
996
p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
997
sprintf(p_prefix, "n%d", (*next_ns_index)++);
998
axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
1000
axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
1001
"http://eucalyptus.ucsb.edu/",
1006
if (!_volumeType->is_valid_state)
1009
/* no need to complain for minoccurs=0 element */
1015
start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
1016
(4 + axutil_strlen(p_prefix) +
1017
axutil_strlen("state")));
1019
/* axutil_strlen("<:>") + 1 = 4 */
1020
end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
1021
(5 + axutil_strlen(p_prefix) + axutil_strlen("state")));
1022
/* axutil_strlen("</:>") + 1 = 5 */
1030
* parsing state element
1035
sprintf(start_input_str, "<%s%sstate>",
1036
p_prefix?p_prefix:"",
1037
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
1039
start_input_str_len = axutil_strlen(start_input_str);
1040
sprintf(end_input_str, "</%s%sstate>",
1041
p_prefix?p_prefix:"",
1042
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
1043
end_input_str_len = axutil_strlen(end_input_str);
1045
text_value_4 = _volumeType->property_state;
1047
axutil_stream_write(stream, env, start_input_str, start_input_str_len);
1050
text_value_4_temp = axutil_xml_quote_string(env, text_value_4, AXIS2_TRUE);
1051
if (text_value_4_temp)
1053
axutil_stream_write(stream, env, text_value_4_temp, axutil_strlen(text_value_4_temp));
1054
AXIS2_FREE(env->allocator, text_value_4_temp);
1058
axutil_stream_write(stream, env, text_value_4, axutil_strlen(text_value_4));
1061
axutil_stream_write(stream, env, end_input_str, end_input_str_len);
1064
AXIS2_FREE(env->allocator,start_input_str);
1065
AXIS2_FREE(env->allocator,end_input_str);
1077
* getter for volumeId.
1079
axis2_char_t* AXIS2_CALL
1080
adb_volumeType_get_volumeId(
1081
adb_volumeType_t* _volumeType,
1082
const axutil_env_t *env)
1085
AXIS2_ENV_CHECK(env, NULL);
1086
AXIS2_PARAM_CHECK(env->error, _volumeType, NULL);
1089
return _volumeType->property_volumeId;
1093
* setter for volumeId
1095
axis2_status_t AXIS2_CALL
1096
adb_volumeType_set_volumeId(
1097
adb_volumeType_t* _volumeType,
1098
const axutil_env_t *env,
1099
const axis2_char_t* arg_volumeId)
1103
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1104
AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1106
if(_volumeType->is_valid_volumeId &&
1107
arg_volumeId == _volumeType->property_volumeId)
1110
return AXIS2_SUCCESS;
1113
adb_volumeType_reset_volumeId(_volumeType, env);
1116
if(NULL == arg_volumeId)
1118
/* We are already done */
1119
return AXIS2_SUCCESS;
1121
_volumeType->property_volumeId = (axis2_char_t *)axutil_strdup(env, arg_volumeId);
1122
if(NULL == _volumeType->property_volumeId)
1124
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for volumeId");
1125
return AXIS2_FAILURE;
1127
_volumeType->is_valid_volumeId = AXIS2_TRUE;
1129
return AXIS2_SUCCESS;
1135
* resetter for volumeId
1137
axis2_status_t AXIS2_CALL
1138
adb_volumeType_reset_volumeId(
1139
adb_volumeType_t* _volumeType,
1140
const axutil_env_t *env)
1144
void *element = NULL;
1146
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1147
AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1153
if(_volumeType->property_volumeId != NULL)
1157
AXIS2_FREE(env-> allocator, _volumeType->property_volumeId);
1158
_volumeType->property_volumeId = NULL;
1163
_volumeType->is_valid_volumeId = AXIS2_FALSE;
1164
return AXIS2_SUCCESS;
1168
* Check whether volumeId is nill
1170
axis2_bool_t AXIS2_CALL
1171
adb_volumeType_is_volumeId_nil(
1172
adb_volumeType_t* _volumeType,
1173
const axutil_env_t *env)
1175
AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1176
AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_TRUE);
1178
return !_volumeType->is_valid_volumeId;
1182
* Set volumeId to nill (currently the same as reset)
1184
axis2_status_t AXIS2_CALL
1185
adb_volumeType_set_volumeId_nil(
1186
adb_volumeType_t* _volumeType,
1187
const axutil_env_t *env)
1189
return adb_volumeType_reset_volumeId(_volumeType, env);
1195
* getter for remoteDev.
1197
axis2_char_t* AXIS2_CALL
1198
adb_volumeType_get_remoteDev(
1199
adb_volumeType_t* _volumeType,
1200
const axutil_env_t *env)
1203
AXIS2_ENV_CHECK(env, NULL);
1204
AXIS2_PARAM_CHECK(env->error, _volumeType, NULL);
1207
return _volumeType->property_remoteDev;
1211
* setter for remoteDev
1213
axis2_status_t AXIS2_CALL
1214
adb_volumeType_set_remoteDev(
1215
adb_volumeType_t* _volumeType,
1216
const axutil_env_t *env,
1217
const axis2_char_t* arg_remoteDev)
1221
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1222
AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1224
if(_volumeType->is_valid_remoteDev &&
1225
arg_remoteDev == _volumeType->property_remoteDev)
1228
return AXIS2_SUCCESS;
1231
adb_volumeType_reset_remoteDev(_volumeType, env);
1234
if(NULL == arg_remoteDev)
1236
/* We are already done */
1237
return AXIS2_SUCCESS;
1239
_volumeType->property_remoteDev = (axis2_char_t *)axutil_strdup(env, arg_remoteDev);
1240
if(NULL == _volumeType->property_remoteDev)
1242
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for remoteDev");
1243
return AXIS2_FAILURE;
1245
_volumeType->is_valid_remoteDev = AXIS2_TRUE;
1247
return AXIS2_SUCCESS;
1253
* resetter for remoteDev
1255
axis2_status_t AXIS2_CALL
1256
adb_volumeType_reset_remoteDev(
1257
adb_volumeType_t* _volumeType,
1258
const axutil_env_t *env)
1262
void *element = NULL;
1264
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1265
AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1271
if(_volumeType->property_remoteDev != NULL)
1275
AXIS2_FREE(env-> allocator, _volumeType->property_remoteDev);
1276
_volumeType->property_remoteDev = NULL;
1281
_volumeType->is_valid_remoteDev = AXIS2_FALSE;
1282
return AXIS2_SUCCESS;
1286
* Check whether remoteDev is nill
1288
axis2_bool_t AXIS2_CALL
1289
adb_volumeType_is_remoteDev_nil(
1290
adb_volumeType_t* _volumeType,
1291
const axutil_env_t *env)
1293
AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1294
AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_TRUE);
1296
return !_volumeType->is_valid_remoteDev;
1300
* Set remoteDev to nill (currently the same as reset)
1302
axis2_status_t AXIS2_CALL
1303
adb_volumeType_set_remoteDev_nil(
1304
adb_volumeType_t* _volumeType,
1305
const axutil_env_t *env)
1307
return adb_volumeType_reset_remoteDev(_volumeType, env);
1313
* getter for localDev.
1315
axis2_char_t* AXIS2_CALL
1316
adb_volumeType_get_localDev(
1317
adb_volumeType_t* _volumeType,
1318
const axutil_env_t *env)
1321
AXIS2_ENV_CHECK(env, NULL);
1322
AXIS2_PARAM_CHECK(env->error, _volumeType, NULL);
1325
return _volumeType->property_localDev;
1329
* setter for localDev
1331
axis2_status_t AXIS2_CALL
1332
adb_volumeType_set_localDev(
1333
adb_volumeType_t* _volumeType,
1334
const axutil_env_t *env,
1335
const axis2_char_t* arg_localDev)
1339
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1340
AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1342
if(_volumeType->is_valid_localDev &&
1343
arg_localDev == _volumeType->property_localDev)
1346
return AXIS2_SUCCESS;
1349
adb_volumeType_reset_localDev(_volumeType, env);
1352
if(NULL == arg_localDev)
1354
/* We are already done */
1355
return AXIS2_SUCCESS;
1357
_volumeType->property_localDev = (axis2_char_t *)axutil_strdup(env, arg_localDev);
1358
if(NULL == _volumeType->property_localDev)
1360
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for localDev");
1361
return AXIS2_FAILURE;
1363
_volumeType->is_valid_localDev = AXIS2_TRUE;
1365
return AXIS2_SUCCESS;
1371
* resetter for localDev
1373
axis2_status_t AXIS2_CALL
1374
adb_volumeType_reset_localDev(
1375
adb_volumeType_t* _volumeType,
1376
const axutil_env_t *env)
1380
void *element = NULL;
1382
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1383
AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1389
if(_volumeType->property_localDev != NULL)
1393
AXIS2_FREE(env-> allocator, _volumeType->property_localDev);
1394
_volumeType->property_localDev = NULL;
1399
_volumeType->is_valid_localDev = AXIS2_FALSE;
1400
return AXIS2_SUCCESS;
1404
* Check whether localDev is nill
1406
axis2_bool_t AXIS2_CALL
1407
adb_volumeType_is_localDev_nil(
1408
adb_volumeType_t* _volumeType,
1409
const axutil_env_t *env)
1411
AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1412
AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_TRUE);
1414
return !_volumeType->is_valid_localDev;
1418
* Set localDev to nill (currently the same as reset)
1420
axis2_status_t AXIS2_CALL
1421
adb_volumeType_set_localDev_nil(
1422
adb_volumeType_t* _volumeType,
1423
const axutil_env_t *env)
1425
return adb_volumeType_reset_localDev(_volumeType, env);
1433
axis2_char_t* AXIS2_CALL
1434
adb_volumeType_get_state(
1435
adb_volumeType_t* _volumeType,
1436
const axutil_env_t *env)
1439
AXIS2_ENV_CHECK(env, NULL);
1440
AXIS2_PARAM_CHECK(env->error, _volumeType, NULL);
1443
return _volumeType->property_state;
1449
axis2_status_t AXIS2_CALL
1450
adb_volumeType_set_state(
1451
adb_volumeType_t* _volumeType,
1452
const axutil_env_t *env,
1453
const axis2_char_t* arg_state)
1457
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1458
AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1460
if(_volumeType->is_valid_state &&
1461
arg_state == _volumeType->property_state)
1464
return AXIS2_SUCCESS;
1467
adb_volumeType_reset_state(_volumeType, env);
1470
if(NULL == arg_state)
1472
/* We are already done */
1473
return AXIS2_SUCCESS;
1475
_volumeType->property_state = (axis2_char_t *)axutil_strdup(env, arg_state);
1476
if(NULL == _volumeType->property_state)
1478
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for state");
1479
return AXIS2_FAILURE;
1481
_volumeType->is_valid_state = AXIS2_TRUE;
1483
return AXIS2_SUCCESS;
1489
* resetter for state
1491
axis2_status_t AXIS2_CALL
1492
adb_volumeType_reset_state(
1493
adb_volumeType_t* _volumeType,
1494
const axutil_env_t *env)
1498
void *element = NULL;
1500
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1501
AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1507
if(_volumeType->property_state != NULL)
1511
AXIS2_FREE(env-> allocator, _volumeType->property_state);
1512
_volumeType->property_state = NULL;
1517
_volumeType->is_valid_state = AXIS2_FALSE;
1518
return AXIS2_SUCCESS;
1522
* Check whether state is nill
1524
axis2_bool_t AXIS2_CALL
1525
adb_volumeType_is_state_nil(
1526
adb_volumeType_t* _volumeType,
1527
const axutil_env_t *env)
1529
AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1530
AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_TRUE);
1532
return !_volumeType->is_valid_state;
1536
* Set state to nill (currently the same as reset)
1538
axis2_status_t AXIS2_CALL
1539
adb_volumeType_set_state_nil(
1540
adb_volumeType_t* _volumeType,
1541
const axutil_env_t *env)
1543
return adb_volumeType_reset_state(_volumeType, env);