~ubuntu-core-dev/ubuntu/maverick/eucalyptus/devel

« back to all changes in this revision

Viewing changes to node/generated/adb_volumeType.c

  • Committer: Dustin Kirkland
  • Date: 2010-07-22 08:41:57 UTC
  • mfrom: (1050.1.19 ubuntu)
  • Revision ID: kirkland@x200-20100722084157-zh2p8dkawznvxxpn
Approving Dave Walker's merge of new upstream Eucalyptus 2.0 release.

Dustin Kirkland <kirkland@canonical.com>

* New major upstream version merge, 2.0 (r1211).
  - 01-wsdl-stubs.patch, debian/wsdl.md5sums: wsdl stubs updated.
  - 11-state-cleanup-memleakfix.patch: Removed, fixed upstream.
  - 21-eucalyptus-1.7-with-gwt-1.6.4.patch: New patch, allows 
    eucalyptus-1.7 to be built against gwt 1.6.4. Based on patch courtesy 
    of Dmitrii Zagorodnov, upstream. (LP: #597330)
* debian/eucalyptus-java-common.links: 
  - Changed symlink for groovy, point to groovy.all.jar, making compatiable 
    with groovy versions >1.7. (LP: #595421)
  - Added ant.jar & jetty-rewrite-handler.jar as they are now required.
* debian/control
  - & debian/build-jars: Added libjavassist-java and libjetty-extra-java as 
    build dependencies.
  - Added libjetty-extra-java as a dependency of eucalyptus-java-common
* The binary resulting jar's have been renamed from eucalyptus-*-1.6.2.jar
  to eucalyptus-*-main.jar:    
  - debian/eucalyptus-cc.upstart
  - debian/eucalyptus-cloud.install
  - debian/eucalyptus-common.eucalyptus.upstart
  - debian/eucalyptus-java-common.install
  - debian/eucalyptus-network.upstart
  - debian/eucalyptus-sc.install
  - debian/eucalyptus-walrus.install
* debian/eucalyptus-java-common.install: New upstream jars that have been
  installed:
  - eucalyptus-db-hsqldb-ext-main.jar
  - eucalyptus-component-main.jar
* debian/control:
  - Updated Standards Version to 3.8.4 (no change)
  - Updated the upstream Homepage to: http://open.eucalyptus.com/
  - Changed Vcs-Bzr to reflect new location of Ubuntu hosted development branch.
  - Made the Build Dependency of groovy and the binary eucalyptus-java-common
    package depend on version >=1.7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
 
3
 
        /**
4
 
         * adb_volumeType.c
5
 
         *
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)
8
 
         */
9
 
 
10
 
        #include "adb_volumeType.h"
11
 
 
12
 
                /*
13
 
                 * This type was generated from the piece of schema that had
14
 
                 * name = volumeType
15
 
                 * Namespace URI = http://eucalyptus.ucsb.edu/
16
 
                 * Namespace Prefix = ns1
17
 
                 */
18
 
 
19
 
 
20
 
 
21
 
        struct adb_volumeType
22
 
        {
23
 
            axis2_char_t* property_volumeId;
24
 
 
25
 
 
26
 
                axis2_bool_t is_valid_volumeId;
27
 
 
28
 
 
29
 
            axis2_char_t* property_remoteDev;
30
 
 
31
 
 
32
 
                axis2_bool_t is_valid_remoteDev;
33
 
 
34
 
 
35
 
            axis2_char_t* property_localDev;
36
 
 
37
 
 
38
 
                axis2_bool_t is_valid_localDev;
39
 
 
40
 
 
41
 
            axis2_char_t* property_state;
42
 
 
43
 
 
44
 
                axis2_bool_t is_valid_state;
45
 
 
46
 
 
47
 
 
48
 
        };
49
 
 
50
 
 
51
 
       /************************* Private Function prototypes ********************************/
52
 
 
53
 
 
54
 
                axis2_status_t AXIS2_CALL
55
 
                adb_volumeType_set_volumeId_nil(
56
 
                        adb_volumeType_t* _volumeType,
57
 
                        const axutil_env_t *env);
58
 
 
59
 
 
60
 
                axis2_status_t AXIS2_CALL
61
 
                adb_volumeType_set_remoteDev_nil(
62
 
                        adb_volumeType_t* _volumeType,
63
 
                        const axutil_env_t *env);
64
 
 
65
 
 
66
 
                axis2_status_t AXIS2_CALL
67
 
                adb_volumeType_set_localDev_nil(
68
 
                        adb_volumeType_t* _volumeType,
69
 
                        const axutil_env_t *env);
70
 
 
71
 
 
72
 
                axis2_status_t AXIS2_CALL
73
 
                adb_volumeType_set_state_nil(
74
 
                        adb_volumeType_t* _volumeType,
75
 
                        const axutil_env_t *env);
76
 
 
77
 
 
78
 
 
79
 
       /************************* Function Implmentations ********************************/
80
 
        adb_volumeType_t* AXIS2_CALL
81
 
        adb_volumeType_create(
82
 
            const axutil_env_t *env)
83
 
        {
84
 
            adb_volumeType_t *_volumeType = NULL;
85
 
 
86
 
            AXIS2_ENV_CHECK(env, NULL);
87
 
 
88
 
            _volumeType = (adb_volumeType_t *) AXIS2_MALLOC(env->
89
 
                allocator, sizeof(adb_volumeType_t));
90
 
 
91
 
            if(NULL == _volumeType)
92
 
            {
93
 
                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
94
 
                return NULL;
95
 
            }
96
 
 
97
 
            memset(_volumeType, 0, sizeof(adb_volumeType_t));
98
 
 
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;
107
 
 
108
 
 
109
 
            return _volumeType;
110
 
        }
111
 
 
112
 
        axis2_status_t AXIS2_CALL
113
 
        adb_volumeType_free (
114
 
                adb_volumeType_t* _volumeType,
115
 
                const axutil_env_t *env)
116
 
        {
117
 
 
118
 
 
119
 
            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
120
 
            AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
121
 
 
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);
126
 
 
127
 
 
128
 
            if(_volumeType)
129
 
            {
130
 
                AXIS2_FREE(env->allocator, _volumeType);
131
 
                _volumeType = NULL;
132
 
            }
133
 
            return AXIS2_SUCCESS;
134
 
        }
135
 
 
136
 
 
137
 
 
138
 
 
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)
146
 
        {
147
 
          axiom_node_t *parent = *dp_parent;
148
 
 
149
 
          axis2_status_t status = AXIS2_SUCCESS;
150
 
 
151
 
             axis2_char_t* text_value = NULL;
152
 
             axutil_qname_t *qname = NULL;
153
 
 
154
 
            axutil_qname_t *element_qname = NULL;
155
 
 
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;
160
 
 
161
 
            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
162
 
            AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
163
 
 
164
 
 
165
 
 
166
 
              while(parent && axiom_node_get_node_type(parent, env) != AXIOM_ELEMENT)
167
 
              {
168
 
                  parent = axiom_node_get_next_sibling(parent, env);
169
 
              }
170
 
              if (NULL == parent)
171
 
              {
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;
177
 
              }
178
 
 
179
 
 
180
 
                      first_node = axiom_node_get_first_child(parent, env);
181
 
 
182
 
 
183
 
 
184
 
 
185
 
                     /*
186
 
                      * building volumeId element
187
 
                      */
188
 
 
189
 
 
190
 
 
191
 
                                   current_node = first_node;
192
 
                                   is_early_node_valid = AXIS2_FALSE;
193
 
 
194
 
 
195
 
                                    while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
196
 
                                    {
197
 
                                        current_node = axiom_node_get_next_sibling(current_node, env);
198
 
                                    }
199
 
                                    if(current_node != NULL)
200
 
                                    {
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);
203
 
                                    }
204
 
 
205
 
                                 element_qname = axutil_qname_create(env, "volumeId", "http://eucalyptus.ucsb.edu/", NULL);
206
 
 
207
 
 
208
 
                           if (
209
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
210
 
                           {
211
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
212
 
                              {
213
 
                                is_early_node_valid = AXIS2_TRUE;
214
 
                              }
215
 
 
216
 
 
217
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
218
 
                                      if(text_value != NULL)
219
 
                                      {
220
 
                                            status = adb_volumeType_set_volumeId(_volumeType, env,
221
 
                                                               text_value);
222
 
                                      }
223
 
 
224
 
                                      else
225
 
                                      {
226
 
                                            /*
227
 
                                             * axis2_qname_t *qname = NULL;
228
 
                                             * axiom_attribute_t *the_attri = NULL;
229
 
                                             *
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);
232
 
                                             */
233
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
234
 
 
235
 
                                            axiom_attribute_t *the_attri = NULL;
236
 
                                            axis2_char_t *attrib_text = NULL;
237
 
                                            axutil_hash_t *attribute_hash = NULL;
238
 
 
239
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
240
 
 
241
 
                                            attrib_text = NULL;
242
 
                                            if(attribute_hash)
243
 
                                            {
244
 
                                                 axutil_hash_index_t *hi;
245
 
                                                 void *val;
246
 
                                                 const void *key;
247
 
 
248
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
249
 
                                                 {
250
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
251
 
 
252
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
253
 
                                                     {
254
 
                                                         the_attri = (axiom_attribute_t*)val;
255
 
                                                         break;
256
 
                                                     }
257
 
                                                 }
258
 
                                            }
259
 
 
260
 
                                            if(the_attri)
261
 
                                            {
262
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
263
 
                                            }
264
 
                                            else
265
 
                                            {
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");
268
 
                                            }
269
 
 
270
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
271
 
                                            {
272
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element volumeId");
273
 
                                                status = AXIS2_FAILURE;
274
 
                                            }
275
 
                                            else
276
 
                                            {
277
 
                                                /* after all, we found this is a empty string */
278
 
                                                status = adb_volumeType_set_volumeId(_volumeType, env,
279
 
                                                                   "");
280
 
                                            }
281
 
                                      }
282
 
 
283
 
                                 if(AXIS2_FAILURE ==  status)
284
 
                                 {
285
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for volumeId ");
286
 
                                     if(element_qname)
287
 
                                     {
288
 
                                         axutil_qname_free(element_qname, env);
289
 
                                     }
290
 
                                     return AXIS2_FAILURE;
291
 
                                 }
292
 
                              }
293
 
 
294
 
                  if(element_qname)
295
 
                  {
296
 
                     axutil_qname_free(element_qname, env);
297
 
                     element_qname = NULL;
298
 
                  }
299
 
 
300
 
 
301
 
 
302
 
                     /*
303
 
                      * building remoteDev element
304
 
                      */
305
 
 
306
 
 
307
 
 
308
 
                                    /*
309
 
                                     * because elements are ordered this works fine
310
 
                                     */
311
 
 
312
 
 
313
 
                                   if(current_node != NULL && is_early_node_valid)
314
 
                                   {
315
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
316
 
 
317
 
 
318
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
319
 
                                        {
320
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
321
 
                                        }
322
 
                                        if(current_node != NULL)
323
 
                                        {
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);
326
 
                                        }
327
 
 
328
 
                                   }
329
 
                                   is_early_node_valid = AXIS2_FALSE;
330
 
 
331
 
                                 element_qname = axutil_qname_create(env, "remoteDev", "http://eucalyptus.ucsb.edu/", NULL);
332
 
 
333
 
 
334
 
                           if (
335
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
336
 
                           {
337
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
338
 
                              {
339
 
                                is_early_node_valid = AXIS2_TRUE;
340
 
                              }
341
 
 
342
 
 
343
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
344
 
                                      if(text_value != NULL)
345
 
                                      {
346
 
                                            status = adb_volumeType_set_remoteDev(_volumeType, env,
347
 
                                                               text_value);
348
 
                                      }
349
 
 
350
 
                                      else
351
 
                                      {
352
 
                                            /*
353
 
                                             * axis2_qname_t *qname = NULL;
354
 
                                             * axiom_attribute_t *the_attri = NULL;
355
 
                                             *
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);
358
 
                                             */
359
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
360
 
 
361
 
                                            axiom_attribute_t *the_attri = NULL;
362
 
                                            axis2_char_t *attrib_text = NULL;
363
 
                                            axutil_hash_t *attribute_hash = NULL;
364
 
 
365
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
366
 
 
367
 
                                            attrib_text = NULL;
368
 
                                            if(attribute_hash)
369
 
                                            {
370
 
                                                 axutil_hash_index_t *hi;
371
 
                                                 void *val;
372
 
                                                 const void *key;
373
 
 
374
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
375
 
                                                 {
376
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
377
 
 
378
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
379
 
                                                     {
380
 
                                                         the_attri = (axiom_attribute_t*)val;
381
 
                                                         break;
382
 
                                                     }
383
 
                                                 }
384
 
                                            }
385
 
 
386
 
                                            if(the_attri)
387
 
                                            {
388
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
389
 
                                            }
390
 
                                            else
391
 
                                            {
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");
394
 
                                            }
395
 
 
396
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
397
 
                                            {
398
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element remoteDev");
399
 
                                                status = AXIS2_FAILURE;
400
 
                                            }
401
 
                                            else
402
 
                                            {
403
 
                                                /* after all, we found this is a empty string */
404
 
                                                status = adb_volumeType_set_remoteDev(_volumeType, env,
405
 
                                                                   "");
406
 
                                            }
407
 
                                      }
408
 
 
409
 
                                 if(AXIS2_FAILURE ==  status)
410
 
                                 {
411
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for remoteDev ");
412
 
                                     if(element_qname)
413
 
                                     {
414
 
                                         axutil_qname_free(element_qname, env);
415
 
                                     }
416
 
                                     return AXIS2_FAILURE;
417
 
                                 }
418
 
                              }
419
 
 
420
 
                  if(element_qname)
421
 
                  {
422
 
                     axutil_qname_free(element_qname, env);
423
 
                     element_qname = NULL;
424
 
                  }
425
 
 
426
 
 
427
 
 
428
 
                     /*
429
 
                      * building localDev element
430
 
                      */
431
 
 
432
 
 
433
 
 
434
 
                                    /*
435
 
                                     * because elements are ordered this works fine
436
 
                                     */
437
 
 
438
 
 
439
 
                                   if(current_node != NULL && is_early_node_valid)
440
 
                                   {
441
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
442
 
 
443
 
 
444
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
445
 
                                        {
446
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
447
 
                                        }
448
 
                                        if(current_node != NULL)
449
 
                                        {
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);
452
 
                                        }
453
 
 
454
 
                                   }
455
 
                                   is_early_node_valid = AXIS2_FALSE;
456
 
 
457
 
                                 element_qname = axutil_qname_create(env, "localDev", "http://eucalyptus.ucsb.edu/", NULL);
458
 
 
459
 
 
460
 
                           if (
461
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
462
 
                           {
463
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
464
 
                              {
465
 
                                is_early_node_valid = AXIS2_TRUE;
466
 
                              }
467
 
 
468
 
 
469
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
470
 
                                      if(text_value != NULL)
471
 
                                      {
472
 
                                            status = adb_volumeType_set_localDev(_volumeType, env,
473
 
                                                               text_value);
474
 
                                      }
475
 
 
476
 
                                      else
477
 
                                      {
478
 
                                            /*
479
 
                                             * axis2_qname_t *qname = NULL;
480
 
                                             * axiom_attribute_t *the_attri = NULL;
481
 
                                             *
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);
484
 
                                             */
485
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
486
 
 
487
 
                                            axiom_attribute_t *the_attri = NULL;
488
 
                                            axis2_char_t *attrib_text = NULL;
489
 
                                            axutil_hash_t *attribute_hash = NULL;
490
 
 
491
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
492
 
 
493
 
                                            attrib_text = NULL;
494
 
                                            if(attribute_hash)
495
 
                                            {
496
 
                                                 axutil_hash_index_t *hi;
497
 
                                                 void *val;
498
 
                                                 const void *key;
499
 
 
500
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
501
 
                                                 {
502
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
503
 
 
504
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
505
 
                                                     {
506
 
                                                         the_attri = (axiom_attribute_t*)val;
507
 
                                                         break;
508
 
                                                     }
509
 
                                                 }
510
 
                                            }
511
 
 
512
 
                                            if(the_attri)
513
 
                                            {
514
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
515
 
                                            }
516
 
                                            else
517
 
                                            {
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");
520
 
                                            }
521
 
 
522
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
523
 
                                            {
524
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element localDev");
525
 
                                                status = AXIS2_FAILURE;
526
 
                                            }
527
 
                                            else
528
 
                                            {
529
 
                                                /* after all, we found this is a empty string */
530
 
                                                status = adb_volumeType_set_localDev(_volumeType, env,
531
 
                                                                   "");
532
 
                                            }
533
 
                                      }
534
 
 
535
 
                                 if(AXIS2_FAILURE ==  status)
536
 
                                 {
537
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for localDev ");
538
 
                                     if(element_qname)
539
 
                                     {
540
 
                                         axutil_qname_free(element_qname, env);
541
 
                                     }
542
 
                                     return AXIS2_FAILURE;
543
 
                                 }
544
 
                              }
545
 
 
546
 
                  if(element_qname)
547
 
                  {
548
 
                     axutil_qname_free(element_qname, env);
549
 
                     element_qname = NULL;
550
 
                  }
551
 
 
552
 
 
553
 
 
554
 
                     /*
555
 
                      * building state element
556
 
                      */
557
 
 
558
 
 
559
 
 
560
 
                                    /*
561
 
                                     * because elements are ordered this works fine
562
 
                                     */
563
 
 
564
 
 
565
 
                                   if(current_node != NULL && is_early_node_valid)
566
 
                                   {
567
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
568
 
 
569
 
 
570
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
571
 
                                        {
572
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
573
 
                                        }
574
 
                                        if(current_node != NULL)
575
 
                                        {
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);
578
 
                                        }
579
 
 
580
 
                                   }
581
 
                                   is_early_node_valid = AXIS2_FALSE;
582
 
 
583
 
                                 element_qname = axutil_qname_create(env, "state", "http://eucalyptus.ucsb.edu/", NULL);
584
 
 
585
 
 
586
 
                           if (
587
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
588
 
                           {
589
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
590
 
                              {
591
 
                                is_early_node_valid = AXIS2_TRUE;
592
 
                              }
593
 
 
594
 
 
595
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
596
 
                                      if(text_value != NULL)
597
 
                                      {
598
 
                                            status = adb_volumeType_set_state(_volumeType, env,
599
 
                                                               text_value);
600
 
                                      }
601
 
 
602
 
                                      else
603
 
                                      {
604
 
                                            /*
605
 
                                             * axis2_qname_t *qname = NULL;
606
 
                                             * axiom_attribute_t *the_attri = NULL;
607
 
                                             *
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);
610
 
                                             */
611
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
612
 
 
613
 
                                            axiom_attribute_t *the_attri = NULL;
614
 
                                            axis2_char_t *attrib_text = NULL;
615
 
                                            axutil_hash_t *attribute_hash = NULL;
616
 
 
617
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
618
 
 
619
 
                                            attrib_text = NULL;
620
 
                                            if(attribute_hash)
621
 
                                            {
622
 
                                                 axutil_hash_index_t *hi;
623
 
                                                 void *val;
624
 
                                                 const void *key;
625
 
 
626
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
627
 
                                                 {
628
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
629
 
 
630
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
631
 
                                                     {
632
 
                                                         the_attri = (axiom_attribute_t*)val;
633
 
                                                         break;
634
 
                                                     }
635
 
                                                 }
636
 
                                            }
637
 
 
638
 
                                            if(the_attri)
639
 
                                            {
640
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
641
 
                                            }
642
 
                                            else
643
 
                                            {
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");
646
 
                                            }
647
 
 
648
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
649
 
                                            {
650
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element state");
651
 
                                                status = AXIS2_FAILURE;
652
 
                                            }
653
 
                                            else
654
 
                                            {
655
 
                                                /* after all, we found this is a empty string */
656
 
                                                status = adb_volumeType_set_state(_volumeType, env,
657
 
                                                                   "");
658
 
                                            }
659
 
                                      }
660
 
 
661
 
                                 if(AXIS2_FAILURE ==  status)
662
 
                                 {
663
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for state ");
664
 
                                     if(element_qname)
665
 
                                     {
666
 
                                         axutil_qname_free(element_qname, env);
667
 
                                     }
668
 
                                     return AXIS2_FAILURE;
669
 
                                 }
670
 
                              }
671
 
 
672
 
                  if(element_qname)
673
 
                  {
674
 
                     axutil_qname_free(element_qname, env);
675
 
                     element_qname = NULL;
676
 
                  }
677
 
 
678
 
          return status;
679
 
       }
680
 
 
681
 
          axis2_bool_t AXIS2_CALL
682
 
          adb_volumeType_is_particle()
683
 
          {
684
 
 
685
 
                 return AXIS2_FALSE;
686
 
 
687
 
          }
688
 
 
689
 
 
690
 
          void AXIS2_CALL
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)
695
 
          {
696
 
 
697
 
                  /* Here this is an empty function, Nothing to declare */
698
 
 
699
 
          }
700
 
 
701
 
 
702
 
 
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)
707
 
        {
708
 
 
709
 
 
710
 
             axis2_char_t *string_to_stream;
711
 
 
712
 
 
713
 
         axiom_node_t *current_node = NULL;
714
 
         int tag_closed = 0;
715
 
 
716
 
 
717
 
 
718
 
                axiom_namespace_t *ns1 = NULL;
719
 
 
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;
724
 
 
725
 
                    axis2_char_t *text_value_1;
726
 
                    axis2_char_t *text_value_1_temp;
727
 
 
728
 
                    axis2_char_t *text_value_2;
729
 
                    axis2_char_t *text_value_2_temp;
730
 
 
731
 
                    axis2_char_t *text_value_3;
732
 
                    axis2_char_t *text_value_3_temp;
733
 
 
734
 
                    axis2_char_t *text_value_4;
735
 
                    axis2_char_t *text_value_4_temp;
736
 
 
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;
741
 
 
742
 
 
743
 
               axiom_data_source_t *data_source = NULL;
744
 
               axutil_stream_t *stream = NULL;
745
 
 
746
 
 
747
 
 
748
 
            AXIS2_ENV_CHECK(env, NULL);
749
 
            AXIS2_PARAM_CHECK(env->error, _volumeType, NULL);
750
 
 
751
 
 
752
 
                    current_node = parent;
753
 
                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, env);
754
 
                    if (!data_source)
755
 
                        return NULL;
756
 
                    stream = axiom_data_source_get_stream(data_source, env); /* assume parent is of type data source */
757
 
                    if (!stream)
758
 
                        return NULL;
759
 
 
760
 
            if(!parent_tag_closed)
761
 
            {
762
 
 
763
 
              string_to_stream = ">";
764
 
              axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
765
 
              tag_closed = 1;
766
 
 
767
 
            }
768
 
 
769
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
770
 
                       {
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);
774
 
 
775
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
776
 
                                            "http://eucalyptus.ucsb.edu/",
777
 
                                            p_prefix));
778
 
                       }
779
 
 
780
 
 
781
 
                   if (!_volumeType->is_valid_volumeId)
782
 
                   {
783
 
 
784
 
                           /* no need to complain for minoccurs=0 element */
785
 
 
786
 
 
787
 
                   }
788
 
                   else
789
 
                   {
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")));
793
 
 
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 */
798
 
 
799
 
 
800
 
 
801
 
 
802
 
 
803
 
 
804
 
                     /*
805
 
                      * parsing volumeId element
806
 
                      */
807
 
 
808
 
 
809
 
 
810
 
                            sprintf(start_input_str, "<%s%svolumeId>",
811
 
                                 p_prefix?p_prefix:"",
812
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
813
 
 
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);
819
 
 
820
 
                           text_value_1 = _volumeType->property_volumeId;
821
 
 
822
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
823
 
 
824
 
 
825
 
                           text_value_1_temp = axutil_xml_quote_string(env, text_value_1, AXIS2_TRUE);
826
 
                           if (text_value_1_temp)
827
 
                           {
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);
830
 
                           }
831
 
                           else
832
 
                           {
833
 
                               axutil_stream_write(stream, env, text_value_1, axutil_strlen(text_value_1));
834
 
                           }
835
 
 
836
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
837
 
 
838
 
 
839
 
                     AXIS2_FREE(env->allocator,start_input_str);
840
 
                     AXIS2_FREE(env->allocator,end_input_str);
841
 
                 }
842
 
 
843
 
 
844
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
845
 
                       {
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);
849
 
 
850
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
851
 
                                            "http://eucalyptus.ucsb.edu/",
852
 
                                            p_prefix));
853
 
                       }
854
 
 
855
 
 
856
 
                   if (!_volumeType->is_valid_remoteDev)
857
 
                   {
858
 
 
859
 
                           /* no need to complain for minoccurs=0 element */
860
 
 
861
 
 
862
 
                   }
863
 
                   else
864
 
                   {
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")));
868
 
 
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 */
873
 
 
874
 
 
875
 
 
876
 
 
877
 
 
878
 
 
879
 
                     /*
880
 
                      * parsing remoteDev element
881
 
                      */
882
 
 
883
 
 
884
 
 
885
 
                            sprintf(start_input_str, "<%s%sremoteDev>",
886
 
                                 p_prefix?p_prefix:"",
887
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
888
 
 
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);
894
 
 
895
 
                           text_value_2 = _volumeType->property_remoteDev;
896
 
 
897
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
898
 
 
899
 
 
900
 
                           text_value_2_temp = axutil_xml_quote_string(env, text_value_2, AXIS2_TRUE);
901
 
                           if (text_value_2_temp)
902
 
                           {
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);
905
 
                           }
906
 
                           else
907
 
                           {
908
 
                               axutil_stream_write(stream, env, text_value_2, axutil_strlen(text_value_2));
909
 
                           }
910
 
 
911
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
912
 
 
913
 
 
914
 
                     AXIS2_FREE(env->allocator,start_input_str);
915
 
                     AXIS2_FREE(env->allocator,end_input_str);
916
 
                 }
917
 
 
918
 
 
919
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
920
 
                       {
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);
924
 
 
925
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
926
 
                                            "http://eucalyptus.ucsb.edu/",
927
 
                                            p_prefix));
928
 
                       }
929
 
 
930
 
 
931
 
                   if (!_volumeType->is_valid_localDev)
932
 
                   {
933
 
 
934
 
                           /* no need to complain for minoccurs=0 element */
935
 
 
936
 
 
937
 
                   }
938
 
                   else
939
 
                   {
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")));
943
 
 
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 */
948
 
 
949
 
 
950
 
 
951
 
 
952
 
 
953
 
 
954
 
                     /*
955
 
                      * parsing localDev element
956
 
                      */
957
 
 
958
 
 
959
 
 
960
 
                            sprintf(start_input_str, "<%s%slocalDev>",
961
 
                                 p_prefix?p_prefix:"",
962
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
963
 
 
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);
969
 
 
970
 
                           text_value_3 = _volumeType->property_localDev;
971
 
 
972
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
973
 
 
974
 
 
975
 
                           text_value_3_temp = axutil_xml_quote_string(env, text_value_3, AXIS2_TRUE);
976
 
                           if (text_value_3_temp)
977
 
                           {
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);
980
 
                           }
981
 
                           else
982
 
                           {
983
 
                               axutil_stream_write(stream, env, text_value_3, axutil_strlen(text_value_3));
984
 
                           }
985
 
 
986
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
987
 
 
988
 
 
989
 
                     AXIS2_FREE(env->allocator,start_input_str);
990
 
                     AXIS2_FREE(env->allocator,end_input_str);
991
 
                 }
992
 
 
993
 
 
994
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
995
 
                       {
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);
999
 
 
1000
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
1001
 
                                            "http://eucalyptus.ucsb.edu/",
1002
 
                                            p_prefix));
1003
 
                       }
1004
 
 
1005
 
 
1006
 
                   if (!_volumeType->is_valid_state)
1007
 
                   {
1008
 
 
1009
 
                           /* no need to complain for minoccurs=0 element */
1010
 
 
1011
 
 
1012
 
                   }
1013
 
                   else
1014
 
                   {
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")));
1018
 
 
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 */
1023
 
 
1024
 
 
1025
 
 
1026
 
 
1027
 
 
1028
 
 
1029
 
                     /*
1030
 
                      * parsing state element
1031
 
                      */
1032
 
 
1033
 
 
1034
 
 
1035
 
                            sprintf(start_input_str, "<%s%sstate>",
1036
 
                                 p_prefix?p_prefix:"",
1037
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
1038
 
 
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);
1044
 
 
1045
 
                           text_value_4 = _volumeType->property_state;
1046
 
 
1047
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
1048
 
 
1049
 
 
1050
 
                           text_value_4_temp = axutil_xml_quote_string(env, text_value_4, AXIS2_TRUE);
1051
 
                           if (text_value_4_temp)
1052
 
                           {
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);
1055
 
                           }
1056
 
                           else
1057
 
                           {
1058
 
                               axutil_stream_write(stream, env, text_value_4, axutil_strlen(text_value_4));
1059
 
                           }
1060
 
 
1061
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
1062
 
 
1063
 
 
1064
 
                     AXIS2_FREE(env->allocator,start_input_str);
1065
 
                     AXIS2_FREE(env->allocator,end_input_str);
1066
 
                 }
1067
 
 
1068
 
 
1069
 
 
1070
 
            return parent;
1071
 
        }
1072
 
 
1073
 
 
1074
 
 
1075
 
 
1076
 
            /**
1077
 
             * getter for volumeId.
1078
 
             */
1079
 
            axis2_char_t* AXIS2_CALL
1080
 
            adb_volumeType_get_volumeId(
1081
 
                    adb_volumeType_t* _volumeType,
1082
 
                    const axutil_env_t *env)
1083
 
             {
1084
 
 
1085
 
                    AXIS2_ENV_CHECK(env, NULL);
1086
 
                    AXIS2_PARAM_CHECK(env->error, _volumeType, NULL);
1087
 
 
1088
 
 
1089
 
                return _volumeType->property_volumeId;
1090
 
             }
1091
 
 
1092
 
            /**
1093
 
             * setter for volumeId
1094
 
             */
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)
1100
 
             {
1101
 
 
1102
 
 
1103
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1104
 
                AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1105
 
 
1106
 
                if(_volumeType->is_valid_volumeId &&
1107
 
                        arg_volumeId == _volumeType->property_volumeId)
1108
 
                {
1109
 
 
1110
 
                    return AXIS2_SUCCESS;
1111
 
                }
1112
 
 
1113
 
                adb_volumeType_reset_volumeId(_volumeType, env);
1114
 
 
1115
 
 
1116
 
                if(NULL == arg_volumeId)
1117
 
                {
1118
 
                    /* We are already done */
1119
 
                    return AXIS2_SUCCESS;
1120
 
                }
1121
 
                _volumeType->property_volumeId = (axis2_char_t *)axutil_strdup(env, arg_volumeId);
1122
 
                        if(NULL == _volumeType->property_volumeId)
1123
 
                        {
1124
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for volumeId");
1125
 
                            return AXIS2_FAILURE;
1126
 
                        }
1127
 
                        _volumeType->is_valid_volumeId = AXIS2_TRUE;
1128
 
 
1129
 
                return AXIS2_SUCCESS;
1130
 
             }
1131
 
 
1132
 
 
1133
 
 
1134
 
           /**
1135
 
            * resetter for volumeId
1136
 
            */
1137
 
           axis2_status_t AXIS2_CALL
1138
 
           adb_volumeType_reset_volumeId(
1139
 
                   adb_volumeType_t* _volumeType,
1140
 
                   const axutil_env_t *env)
1141
 
           {
1142
 
               int i = 0;
1143
 
               int count = 0;
1144
 
               void *element = NULL;
1145
 
 
1146
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1147
 
               AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1148
 
 
1149
 
 
1150
 
 
1151
 
 
1152
 
 
1153
 
                if(_volumeType->property_volumeId != NULL)
1154
 
                {
1155
 
 
1156
 
 
1157
 
                        AXIS2_FREE(env-> allocator, _volumeType->property_volumeId);
1158
 
                     _volumeType->property_volumeId = NULL;
1159
 
                }
1160
 
 
1161
 
 
1162
 
 
1163
 
                _volumeType->is_valid_volumeId = AXIS2_FALSE;
1164
 
               return AXIS2_SUCCESS;
1165
 
           }
1166
 
 
1167
 
           /**
1168
 
            * Check whether volumeId is nill
1169
 
            */
1170
 
           axis2_bool_t AXIS2_CALL
1171
 
           adb_volumeType_is_volumeId_nil(
1172
 
                   adb_volumeType_t* _volumeType,
1173
 
                   const axutil_env_t *env)
1174
 
           {
1175
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1176
 
               AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_TRUE);
1177
 
 
1178
 
               return !_volumeType->is_valid_volumeId;
1179
 
           }
1180
 
 
1181
 
           /**
1182
 
            * Set volumeId to nill (currently the same as reset)
1183
 
            */
1184
 
           axis2_status_t AXIS2_CALL
1185
 
           adb_volumeType_set_volumeId_nil(
1186
 
                   adb_volumeType_t* _volumeType,
1187
 
                   const axutil_env_t *env)
1188
 
           {
1189
 
               return adb_volumeType_reset_volumeId(_volumeType, env);
1190
 
           }
1191
 
 
1192
 
 
1193
 
 
1194
 
            /**
1195
 
             * getter for remoteDev.
1196
 
             */
1197
 
            axis2_char_t* AXIS2_CALL
1198
 
            adb_volumeType_get_remoteDev(
1199
 
                    adb_volumeType_t* _volumeType,
1200
 
                    const axutil_env_t *env)
1201
 
             {
1202
 
 
1203
 
                    AXIS2_ENV_CHECK(env, NULL);
1204
 
                    AXIS2_PARAM_CHECK(env->error, _volumeType, NULL);
1205
 
 
1206
 
 
1207
 
                return _volumeType->property_remoteDev;
1208
 
             }
1209
 
 
1210
 
            /**
1211
 
             * setter for remoteDev
1212
 
             */
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)
1218
 
             {
1219
 
 
1220
 
 
1221
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1222
 
                AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1223
 
 
1224
 
                if(_volumeType->is_valid_remoteDev &&
1225
 
                        arg_remoteDev == _volumeType->property_remoteDev)
1226
 
                {
1227
 
 
1228
 
                    return AXIS2_SUCCESS;
1229
 
                }
1230
 
 
1231
 
                adb_volumeType_reset_remoteDev(_volumeType, env);
1232
 
 
1233
 
 
1234
 
                if(NULL == arg_remoteDev)
1235
 
                {
1236
 
                    /* We are already done */
1237
 
                    return AXIS2_SUCCESS;
1238
 
                }
1239
 
                _volumeType->property_remoteDev = (axis2_char_t *)axutil_strdup(env, arg_remoteDev);
1240
 
                        if(NULL == _volumeType->property_remoteDev)
1241
 
                        {
1242
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for remoteDev");
1243
 
                            return AXIS2_FAILURE;
1244
 
                        }
1245
 
                        _volumeType->is_valid_remoteDev = AXIS2_TRUE;
1246
 
 
1247
 
                return AXIS2_SUCCESS;
1248
 
             }
1249
 
 
1250
 
 
1251
 
 
1252
 
           /**
1253
 
            * resetter for remoteDev
1254
 
            */
1255
 
           axis2_status_t AXIS2_CALL
1256
 
           adb_volumeType_reset_remoteDev(
1257
 
                   adb_volumeType_t* _volumeType,
1258
 
                   const axutil_env_t *env)
1259
 
           {
1260
 
               int i = 0;
1261
 
               int count = 0;
1262
 
               void *element = NULL;
1263
 
 
1264
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1265
 
               AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1266
 
 
1267
 
 
1268
 
 
1269
 
 
1270
 
 
1271
 
                if(_volumeType->property_remoteDev != NULL)
1272
 
                {
1273
 
 
1274
 
 
1275
 
                        AXIS2_FREE(env-> allocator, _volumeType->property_remoteDev);
1276
 
                     _volumeType->property_remoteDev = NULL;
1277
 
                }
1278
 
 
1279
 
 
1280
 
 
1281
 
                _volumeType->is_valid_remoteDev = AXIS2_FALSE;
1282
 
               return AXIS2_SUCCESS;
1283
 
           }
1284
 
 
1285
 
           /**
1286
 
            * Check whether remoteDev is nill
1287
 
            */
1288
 
           axis2_bool_t AXIS2_CALL
1289
 
           adb_volumeType_is_remoteDev_nil(
1290
 
                   adb_volumeType_t* _volumeType,
1291
 
                   const axutil_env_t *env)
1292
 
           {
1293
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1294
 
               AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_TRUE);
1295
 
 
1296
 
               return !_volumeType->is_valid_remoteDev;
1297
 
           }
1298
 
 
1299
 
           /**
1300
 
            * Set remoteDev to nill (currently the same as reset)
1301
 
            */
1302
 
           axis2_status_t AXIS2_CALL
1303
 
           adb_volumeType_set_remoteDev_nil(
1304
 
                   adb_volumeType_t* _volumeType,
1305
 
                   const axutil_env_t *env)
1306
 
           {
1307
 
               return adb_volumeType_reset_remoteDev(_volumeType, env);
1308
 
           }
1309
 
 
1310
 
 
1311
 
 
1312
 
            /**
1313
 
             * getter for localDev.
1314
 
             */
1315
 
            axis2_char_t* AXIS2_CALL
1316
 
            adb_volumeType_get_localDev(
1317
 
                    adb_volumeType_t* _volumeType,
1318
 
                    const axutil_env_t *env)
1319
 
             {
1320
 
 
1321
 
                    AXIS2_ENV_CHECK(env, NULL);
1322
 
                    AXIS2_PARAM_CHECK(env->error, _volumeType, NULL);
1323
 
 
1324
 
 
1325
 
                return _volumeType->property_localDev;
1326
 
             }
1327
 
 
1328
 
            /**
1329
 
             * setter for localDev
1330
 
             */
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)
1336
 
             {
1337
 
 
1338
 
 
1339
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1340
 
                AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1341
 
 
1342
 
                if(_volumeType->is_valid_localDev &&
1343
 
                        arg_localDev == _volumeType->property_localDev)
1344
 
                {
1345
 
 
1346
 
                    return AXIS2_SUCCESS;
1347
 
                }
1348
 
 
1349
 
                adb_volumeType_reset_localDev(_volumeType, env);
1350
 
 
1351
 
 
1352
 
                if(NULL == arg_localDev)
1353
 
                {
1354
 
                    /* We are already done */
1355
 
                    return AXIS2_SUCCESS;
1356
 
                }
1357
 
                _volumeType->property_localDev = (axis2_char_t *)axutil_strdup(env, arg_localDev);
1358
 
                        if(NULL == _volumeType->property_localDev)
1359
 
                        {
1360
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for localDev");
1361
 
                            return AXIS2_FAILURE;
1362
 
                        }
1363
 
                        _volumeType->is_valid_localDev = AXIS2_TRUE;
1364
 
 
1365
 
                return AXIS2_SUCCESS;
1366
 
             }
1367
 
 
1368
 
 
1369
 
 
1370
 
           /**
1371
 
            * resetter for localDev
1372
 
            */
1373
 
           axis2_status_t AXIS2_CALL
1374
 
           adb_volumeType_reset_localDev(
1375
 
                   adb_volumeType_t* _volumeType,
1376
 
                   const axutil_env_t *env)
1377
 
           {
1378
 
               int i = 0;
1379
 
               int count = 0;
1380
 
               void *element = NULL;
1381
 
 
1382
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1383
 
               AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1384
 
 
1385
 
 
1386
 
 
1387
 
 
1388
 
 
1389
 
                if(_volumeType->property_localDev != NULL)
1390
 
                {
1391
 
 
1392
 
 
1393
 
                        AXIS2_FREE(env-> allocator, _volumeType->property_localDev);
1394
 
                     _volumeType->property_localDev = NULL;
1395
 
                }
1396
 
 
1397
 
 
1398
 
 
1399
 
                _volumeType->is_valid_localDev = AXIS2_FALSE;
1400
 
               return AXIS2_SUCCESS;
1401
 
           }
1402
 
 
1403
 
           /**
1404
 
            * Check whether localDev is nill
1405
 
            */
1406
 
           axis2_bool_t AXIS2_CALL
1407
 
           adb_volumeType_is_localDev_nil(
1408
 
                   adb_volumeType_t* _volumeType,
1409
 
                   const axutil_env_t *env)
1410
 
           {
1411
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1412
 
               AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_TRUE);
1413
 
 
1414
 
               return !_volumeType->is_valid_localDev;
1415
 
           }
1416
 
 
1417
 
           /**
1418
 
            * Set localDev to nill (currently the same as reset)
1419
 
            */
1420
 
           axis2_status_t AXIS2_CALL
1421
 
           adb_volumeType_set_localDev_nil(
1422
 
                   adb_volumeType_t* _volumeType,
1423
 
                   const axutil_env_t *env)
1424
 
           {
1425
 
               return adb_volumeType_reset_localDev(_volumeType, env);
1426
 
           }
1427
 
 
1428
 
 
1429
 
 
1430
 
            /**
1431
 
             * getter for state.
1432
 
             */
1433
 
            axis2_char_t* AXIS2_CALL
1434
 
            adb_volumeType_get_state(
1435
 
                    adb_volumeType_t* _volumeType,
1436
 
                    const axutil_env_t *env)
1437
 
             {
1438
 
 
1439
 
                    AXIS2_ENV_CHECK(env, NULL);
1440
 
                    AXIS2_PARAM_CHECK(env->error, _volumeType, NULL);
1441
 
 
1442
 
 
1443
 
                return _volumeType->property_state;
1444
 
             }
1445
 
 
1446
 
            /**
1447
 
             * setter for state
1448
 
             */
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)
1454
 
             {
1455
 
 
1456
 
 
1457
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1458
 
                AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1459
 
 
1460
 
                if(_volumeType->is_valid_state &&
1461
 
                        arg_state == _volumeType->property_state)
1462
 
                {
1463
 
 
1464
 
                    return AXIS2_SUCCESS;
1465
 
                }
1466
 
 
1467
 
                adb_volumeType_reset_state(_volumeType, env);
1468
 
 
1469
 
 
1470
 
                if(NULL == arg_state)
1471
 
                {
1472
 
                    /* We are already done */
1473
 
                    return AXIS2_SUCCESS;
1474
 
                }
1475
 
                _volumeType->property_state = (axis2_char_t *)axutil_strdup(env, arg_state);
1476
 
                        if(NULL == _volumeType->property_state)
1477
 
                        {
1478
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for state");
1479
 
                            return AXIS2_FAILURE;
1480
 
                        }
1481
 
                        _volumeType->is_valid_state = AXIS2_TRUE;
1482
 
 
1483
 
                return AXIS2_SUCCESS;
1484
 
             }
1485
 
 
1486
 
 
1487
 
 
1488
 
           /**
1489
 
            * resetter for state
1490
 
            */
1491
 
           axis2_status_t AXIS2_CALL
1492
 
           adb_volumeType_reset_state(
1493
 
                   adb_volumeType_t* _volumeType,
1494
 
                   const axutil_env_t *env)
1495
 
           {
1496
 
               int i = 0;
1497
 
               int count = 0;
1498
 
               void *element = NULL;
1499
 
 
1500
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1501
 
               AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_FAILURE);
1502
 
 
1503
 
 
1504
 
 
1505
 
 
1506
 
 
1507
 
                if(_volumeType->property_state != NULL)
1508
 
                {
1509
 
 
1510
 
 
1511
 
                        AXIS2_FREE(env-> allocator, _volumeType->property_state);
1512
 
                     _volumeType->property_state = NULL;
1513
 
                }
1514
 
 
1515
 
 
1516
 
 
1517
 
                _volumeType->is_valid_state = AXIS2_FALSE;
1518
 
               return AXIS2_SUCCESS;
1519
 
           }
1520
 
 
1521
 
           /**
1522
 
            * Check whether state is nill
1523
 
            */
1524
 
           axis2_bool_t AXIS2_CALL
1525
 
           adb_volumeType_is_state_nil(
1526
 
                   adb_volumeType_t* _volumeType,
1527
 
                   const axutil_env_t *env)
1528
 
           {
1529
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1530
 
               AXIS2_PARAM_CHECK(env->error, _volumeType, AXIS2_TRUE);
1531
 
 
1532
 
               return !_volumeType->is_valid_state;
1533
 
           }
1534
 
 
1535
 
           /**
1536
 
            * Set state to nill (currently the same as reset)
1537
 
            */
1538
 
           axis2_status_t AXIS2_CALL
1539
 
           adb_volumeType_set_state_nil(
1540
 
                   adb_volumeType_t* _volumeType,
1541
 
                   const axutil_env_t *env)
1542
 
           {
1543
 
               return adb_volumeType_reset_state(_volumeType, env);
1544
 
           }
1545
 
 
1546
 
 
1547