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

« back to all changes in this revision

Viewing changes to cluster/generated/adb_rebootInstancesType.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_rebootInstancesType.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_rebootInstancesType.h"
 
11
        
 
12
                /*
 
13
                 * This type was generated from the piece of schema that had
 
14
                 * name = rebootInstancesType
 
15
                 * Namespace URI = http://eucalyptus.ucsb.edu/
 
16
                 * Namespace Prefix = ns1
 
17
                 */
 
18
           
 
19
 
 
20
 
 
21
        struct adb_rebootInstancesType
 
22
        {
 
23
            axis2_char_t* property_correlationId;
 
24
 
 
25
                
 
26
                axis2_bool_t is_valid_correlationId;
 
27
 
 
28
 
 
29
            axis2_char_t* property_userId;
 
30
 
 
31
                
 
32
                axis2_bool_t is_valid_userId;
 
33
 
 
34
 
 
35
            axis2_char_t* property_statusMessage;
 
36
 
 
37
                
 
38
                axis2_bool_t is_valid_statusMessage;
 
39
 
 
40
 
 
41
            axis2_bool_t property_return;
 
42
 
 
43
                
 
44
                axis2_bool_t is_valid_return;
 
45
 
 
46
 
 
47
            axutil_array_list_t* property_instanceIds;
 
48
 
 
49
                
 
50
                axis2_bool_t is_valid_instanceIds;
 
51
 
 
52
 
 
53
            
 
54
        };
 
55
 
 
56
 
 
57
       /************************* Private Function prototypes ********************************/
 
58
        
 
59
 
 
60
                axis2_status_t AXIS2_CALL
 
61
                adb_rebootInstancesType_set_correlationId_nil(
 
62
                        adb_rebootInstancesType_t* _rebootInstancesType,
 
63
                        const axutil_env_t *env);
 
64
            
 
65
 
 
66
                axis2_status_t AXIS2_CALL
 
67
                adb_rebootInstancesType_set_userId_nil(
 
68
                        adb_rebootInstancesType_t* _rebootInstancesType,
 
69
                        const axutil_env_t *env);
 
70
            
 
71
 
 
72
                axis2_status_t AXIS2_CALL
 
73
                adb_rebootInstancesType_set_return_nil(
 
74
                        adb_rebootInstancesType_t* _rebootInstancesType,
 
75
                        const axutil_env_t *env);
 
76
            
 
77
                 axis2_status_t AXIS2_CALL
 
78
                 adb_rebootInstancesType_set_instanceIds_nil_at(
 
79
                        adb_rebootInstancesType_t* _rebootInstancesType, 
 
80
                        const axutil_env_t *env, int i);
 
81
                
 
82
 
 
83
                axis2_status_t AXIS2_CALL
 
84
                adb_rebootInstancesType_set_instanceIds_nil(
 
85
                        adb_rebootInstancesType_t* _rebootInstancesType,
 
86
                        const axutil_env_t *env);
 
87
            
 
88
 
 
89
 
 
90
       /************************* Function Implmentations ********************************/
 
91
        adb_rebootInstancesType_t* AXIS2_CALL
 
92
        adb_rebootInstancesType_create(
 
93
            const axutil_env_t *env)
 
94
        {
 
95
            adb_rebootInstancesType_t *_rebootInstancesType = NULL;
 
96
            
 
97
            AXIS2_ENV_CHECK(env, NULL);
 
98
 
 
99
            _rebootInstancesType = (adb_rebootInstancesType_t *) AXIS2_MALLOC(env->
 
100
                allocator, sizeof(adb_rebootInstancesType_t));
 
101
 
 
102
            if(NULL == _rebootInstancesType)
 
103
            {
 
104
                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
 
105
                return NULL;
 
106
            }
 
107
 
 
108
            memset(_rebootInstancesType, 0, sizeof(adb_rebootInstancesType_t));
 
109
 
 
110
            _rebootInstancesType->property_correlationId  = NULL;
 
111
                  _rebootInstancesType->is_valid_correlationId  = AXIS2_FALSE;
 
112
            _rebootInstancesType->property_userId  = NULL;
 
113
                  _rebootInstancesType->is_valid_userId  = AXIS2_FALSE;
 
114
            _rebootInstancesType->property_statusMessage  = NULL;
 
115
                  _rebootInstancesType->is_valid_statusMessage  = AXIS2_FALSE;
 
116
            _rebootInstancesType->is_valid_return  = AXIS2_FALSE;
 
117
            _rebootInstancesType->property_instanceIds  = NULL;
 
118
                  _rebootInstancesType->is_valid_instanceIds  = AXIS2_FALSE;
 
119
            
 
120
 
 
121
            return _rebootInstancesType;
 
122
        }
 
123
 
 
124
        axis2_status_t AXIS2_CALL
 
125
        adb_rebootInstancesType_free (
 
126
                adb_rebootInstancesType_t* _rebootInstancesType,
 
127
                const axutil_env_t *env)
 
128
        {
 
129
            
 
130
                int i = 0;
 
131
                int count = 0;
 
132
                void *element = NULL;
 
133
            
 
134
 
 
135
            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
136
            AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
137
 
 
138
            adb_rebootInstancesType_reset_correlationId(_rebootInstancesType, env);
 
139
            adb_rebootInstancesType_reset_userId(_rebootInstancesType, env);
 
140
            adb_rebootInstancesType_reset_statusMessage(_rebootInstancesType, env);
 
141
            adb_rebootInstancesType_reset_return(_rebootInstancesType, env);
 
142
            adb_rebootInstancesType_reset_instanceIds(_rebootInstancesType, env);
 
143
            
 
144
 
 
145
            if(_rebootInstancesType)
 
146
            {
 
147
                AXIS2_FREE(env->allocator, _rebootInstancesType);
 
148
                _rebootInstancesType = NULL;
 
149
            }
 
150
            return AXIS2_SUCCESS;
 
151
        }
 
152
 
 
153
 
 
154
        
 
155
 
 
156
        axis2_status_t AXIS2_CALL
 
157
        adb_rebootInstancesType_deserialize(
 
158
                adb_rebootInstancesType_t* _rebootInstancesType,
 
159
                const axutil_env_t *env,
 
160
                axiom_node_t **dp_parent,
 
161
                axis2_bool_t *dp_is_early_node_valid,
 
162
                axis2_bool_t dont_care_minoccurs)
 
163
        {
 
164
          axiom_node_t *parent = *dp_parent;
 
165
          
 
166
          axis2_status_t status = AXIS2_SUCCESS;
 
167
          
 
168
              void *element = NULL;
 
169
           
 
170
             axis2_char_t* text_value = NULL;
 
171
             axutil_qname_t *qname = NULL;
 
172
          
 
173
               int i = 0;
 
174
               axutil_array_list_t *arr_list = NULL;
 
175
            
 
176
               int sequence_broken = 0;
 
177
               axiom_node_t *tmp_node = NULL;
 
178
            
 
179
            axutil_qname_t *element_qname = NULL; 
 
180
            
 
181
               axiom_node_t *first_node = NULL;
 
182
               axis2_bool_t is_early_node_valid = AXIS2_TRUE;
 
183
               axiom_node_t *current_node = NULL;
 
184
               axiom_element_t *current_element = NULL;
 
185
            
 
186
            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
187
            AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
188
 
 
189
            
 
190
              
 
191
              while(parent && axiom_node_get_node_type(parent, env) != AXIOM_ELEMENT)
 
192
              {
 
193
                  parent = axiom_node_get_next_sibling(parent, env);
 
194
              }
 
195
              if (NULL == parent)
 
196
              {
 
197
                /* This should be checked before everything */
 
198
                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
 
199
                            "Failed in building adb object for rebootInstancesType : "
 
200
                            "NULL elemenet can not be passed to deserialize");
 
201
                return AXIS2_FAILURE;
 
202
              }
 
203
              
 
204
                      
 
205
                      first_node = axiom_node_get_first_child(parent, env);
 
206
                      
 
207
                    
 
208
 
 
209
                     
 
210
                     /*
 
211
                      * building correlationId element
 
212
                      */
 
213
                     
 
214
                     
 
215
                     
 
216
                                   current_node = first_node;
 
217
                                   is_early_node_valid = AXIS2_FALSE;
 
218
                                   
 
219
                                   
 
220
                                    while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
 
221
                                    {
 
222
                                        current_node = axiom_node_get_next_sibling(current_node, env);
 
223
                                    }
 
224
                                    if(current_node != NULL)
 
225
                                    {
 
226
                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
 
227
                                        qname = axiom_element_get_qname(current_element, env, current_node);
 
228
                                    }
 
229
                                   
 
230
                                 element_qname = axutil_qname_create(env, "correlationId", "http://eucalyptus.ucsb.edu/", NULL);
 
231
                                 
 
232
 
 
233
                           if ( 
 
234
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
 
235
                           {
 
236
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
 
237
                              {
 
238
                                is_early_node_valid = AXIS2_TRUE;
 
239
                              }
 
240
                              
 
241
                                 
 
242
                                      text_value = axiom_element_get_text(current_element, env, current_node);
 
243
                                      if(text_value != NULL)
 
244
                                      {
 
245
                                            status = adb_rebootInstancesType_set_correlationId(_rebootInstancesType, env,
 
246
                                                               text_value);
 
247
                                      }
 
248
                                      
 
249
                                      else
 
250
                                      {
 
251
                                            /*
 
252
                                             * axis2_qname_t *qname = NULL;
 
253
                                             * axiom_attribute_t *the_attri = NULL;
 
254
                                             * 
 
255
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
 
256
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
 
257
                                             */
 
258
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
 
259
 
 
260
                                            axiom_attribute_t *the_attri = NULL;
 
261
                                            axis2_char_t *attrib_text = NULL;
 
262
                                            axutil_hash_t *attribute_hash = NULL;
 
263
 
 
264
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
 
265
 
 
266
                                            attrib_text = NULL;
 
267
                                            if(attribute_hash)
 
268
                                            {
 
269
                                                 axutil_hash_index_t *hi;
 
270
                                                 void *val;
 
271
                                                 const void *key;
 
272
                                        
 
273
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi)) 
 
274
                                                 {
 
275
                                                     axutil_hash_this(hi, &key, NULL, &val);
 
276
                                                     
 
277
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
 
278
                                                     {
 
279
                                                         the_attri = (axiom_attribute_t*)val;
 
280
                                                         break;
 
281
                                                     }
 
282
                                                 }
 
283
                                            }
 
284
 
 
285
                                            if(the_attri)
 
286
                                            {
 
287
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
 
288
                                            }
 
289
                                            else
 
290
                                            {
 
291
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
 
292
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
 
293
                                            }
 
294
 
 
295
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
 
296
                                            {
 
297
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element correlationId");
 
298
                                                status = AXIS2_FAILURE;
 
299
                                            }
 
300
                                            else
 
301
                                            {
 
302
                                                /* after all, we found this is a empty string */
 
303
                                                status = adb_rebootInstancesType_set_correlationId(_rebootInstancesType, env,
 
304
                                                                   "");
 
305
                                            }
 
306
                                      }
 
307
                                      
 
308
                                 if(AXIS2_FAILURE ==  status)
 
309
                                 {
 
310
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for correlationId ");
 
311
                                     if(element_qname)
 
312
                                     {
 
313
                                         axutil_qname_free(element_qname, env);
 
314
                                     }
 
315
                                     return AXIS2_FAILURE;
 
316
                                 }
 
317
                              }
 
318
                           
 
319
                  if(element_qname)
 
320
                  {
 
321
                     axutil_qname_free(element_qname, env);
 
322
                     element_qname = NULL;
 
323
                  }
 
324
                 
 
325
 
 
326
                     
 
327
                     /*
 
328
                      * building userId element
 
329
                      */
 
330
                     
 
331
                     
 
332
                     
 
333
                                    /*
 
334
                                     * because elements are ordered this works fine
 
335
                                     */
 
336
                                  
 
337
                                   
 
338
                                   if(current_node != NULL && is_early_node_valid)
 
339
                                   {
 
340
                                       current_node = axiom_node_get_next_sibling(current_node, env);
 
341
                                       
 
342
                                       
 
343
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
 
344
                                        {
 
345
                                            current_node = axiom_node_get_next_sibling(current_node, env);
 
346
                                        }
 
347
                                        if(current_node != NULL)
 
348
                                        {
 
349
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
 
350
                                            qname = axiom_element_get_qname(current_element, env, current_node);
 
351
                                        }
 
352
                                       
 
353
                                   }
 
354
                                   is_early_node_valid = AXIS2_FALSE;
 
355
                                 
 
356
                                 element_qname = axutil_qname_create(env, "userId", "http://eucalyptus.ucsb.edu/", NULL);
 
357
                                 
 
358
 
 
359
                           if ( 
 
360
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
 
361
                           {
 
362
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
 
363
                              {
 
364
                                is_early_node_valid = AXIS2_TRUE;
 
365
                              }
 
366
                              
 
367
                                 
 
368
                                      text_value = axiom_element_get_text(current_element, env, current_node);
 
369
                                      if(text_value != NULL)
 
370
                                      {
 
371
                                            status = adb_rebootInstancesType_set_userId(_rebootInstancesType, env,
 
372
                                                               text_value);
 
373
                                      }
 
374
                                      
 
375
                                      else
 
376
                                      {
 
377
                                            /*
 
378
                                             * axis2_qname_t *qname = NULL;
 
379
                                             * axiom_attribute_t *the_attri = NULL;
 
380
                                             * 
 
381
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
 
382
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
 
383
                                             */
 
384
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
 
385
 
 
386
                                            axiom_attribute_t *the_attri = NULL;
 
387
                                            axis2_char_t *attrib_text = NULL;
 
388
                                            axutil_hash_t *attribute_hash = NULL;
 
389
 
 
390
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
 
391
 
 
392
                                            attrib_text = NULL;
 
393
                                            if(attribute_hash)
 
394
                                            {
 
395
                                                 axutil_hash_index_t *hi;
 
396
                                                 void *val;
 
397
                                                 const void *key;
 
398
                                        
 
399
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi)) 
 
400
                                                 {
 
401
                                                     axutil_hash_this(hi, &key, NULL, &val);
 
402
                                                     
 
403
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
 
404
                                                     {
 
405
                                                         the_attri = (axiom_attribute_t*)val;
 
406
                                                         break;
 
407
                                                     }
 
408
                                                 }
 
409
                                            }
 
410
 
 
411
                                            if(the_attri)
 
412
                                            {
 
413
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
 
414
                                            }
 
415
                                            else
 
416
                                            {
 
417
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
 
418
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
 
419
                                            }
 
420
 
 
421
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
 
422
                                            {
 
423
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element userId");
 
424
                                                status = AXIS2_FAILURE;
 
425
                                            }
 
426
                                            else
 
427
                                            {
 
428
                                                /* after all, we found this is a empty string */
 
429
                                                status = adb_rebootInstancesType_set_userId(_rebootInstancesType, env,
 
430
                                                                   "");
 
431
                                            }
 
432
                                      }
 
433
                                      
 
434
                                 if(AXIS2_FAILURE ==  status)
 
435
                                 {
 
436
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for userId ");
 
437
                                     if(element_qname)
 
438
                                     {
 
439
                                         axutil_qname_free(element_qname, env);
 
440
                                     }
 
441
                                     return AXIS2_FAILURE;
 
442
                                 }
 
443
                              }
 
444
                           
 
445
                  if(element_qname)
 
446
                  {
 
447
                     axutil_qname_free(element_qname, env);
 
448
                     element_qname = NULL;
 
449
                  }
 
450
                 
 
451
 
 
452
                     
 
453
                     /*
 
454
                      * building statusMessage element
 
455
                      */
 
456
                     
 
457
                     
 
458
                     
 
459
                                    /*
 
460
                                     * because elements are ordered this works fine
 
461
                                     */
 
462
                                  
 
463
                                   
 
464
                                   if(current_node != NULL && is_early_node_valid)
 
465
                                   {
 
466
                                       current_node = axiom_node_get_next_sibling(current_node, env);
 
467
                                       
 
468
                                       
 
469
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
 
470
                                        {
 
471
                                            current_node = axiom_node_get_next_sibling(current_node, env);
 
472
                                        }
 
473
                                        if(current_node != NULL)
 
474
                                        {
 
475
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
 
476
                                            qname = axiom_element_get_qname(current_element, env, current_node);
 
477
                                        }
 
478
                                       
 
479
                                   }
 
480
                                   is_early_node_valid = AXIS2_FALSE;
 
481
                                 
 
482
                                 element_qname = axutil_qname_create(env, "statusMessage", "http://eucalyptus.ucsb.edu/", NULL);
 
483
                                 
 
484
 
 
485
                           if ( 
 
486
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
 
487
                           {
 
488
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
 
489
                              {
 
490
                                is_early_node_valid = AXIS2_TRUE;
 
491
                              }
 
492
                              
 
493
                                 
 
494
                                      text_value = axiom_element_get_text(current_element, env, current_node);
 
495
                                      if(text_value != NULL)
 
496
                                      {
 
497
                                            status = adb_rebootInstancesType_set_statusMessage(_rebootInstancesType, env,
 
498
                                                               text_value);
 
499
                                      }
 
500
                                      
 
501
                                 if(AXIS2_FAILURE ==  status)
 
502
                                 {
 
503
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for statusMessage ");
 
504
                                     if(element_qname)
 
505
                                     {
 
506
                                         axutil_qname_free(element_qname, env);
 
507
                                     }
 
508
                                     return AXIS2_FAILURE;
 
509
                                 }
 
510
                              }
 
511
                           
 
512
                  if(element_qname)
 
513
                  {
 
514
                     axutil_qname_free(element_qname, env);
 
515
                     element_qname = NULL;
 
516
                  }
 
517
                 
 
518
 
 
519
                     
 
520
                     /*
 
521
                      * building return element
 
522
                      */
 
523
                     
 
524
                     
 
525
                     
 
526
                                    /*
 
527
                                     * because elements are ordered this works fine
 
528
                                     */
 
529
                                  
 
530
                                   
 
531
                                   if(current_node != NULL && is_early_node_valid)
 
532
                                   {
 
533
                                       current_node = axiom_node_get_next_sibling(current_node, env);
 
534
                                       
 
535
                                       
 
536
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
 
537
                                        {
 
538
                                            current_node = axiom_node_get_next_sibling(current_node, env);
 
539
                                        }
 
540
                                        if(current_node != NULL)
 
541
                                        {
 
542
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
 
543
                                            qname = axiom_element_get_qname(current_element, env, current_node);
 
544
                                        }
 
545
                                       
 
546
                                   }
 
547
                                   is_early_node_valid = AXIS2_FALSE;
 
548
                                 
 
549
                                 element_qname = axutil_qname_create(env, "return", "http://eucalyptus.ucsb.edu/", NULL);
 
550
                                 
 
551
 
 
552
                           if ( 
 
553
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
 
554
                           {
 
555
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
 
556
                              {
 
557
                                is_early_node_valid = AXIS2_TRUE;
 
558
                              }
 
559
                              
 
560
                                 
 
561
                                      text_value = axiom_element_get_text(current_element, env, current_node);
 
562
                                      if(text_value != NULL)
 
563
                                      {
 
564
                                            if (!axutil_strcasecmp(text_value , "true"))
 
565
                                            {
 
566
                                                status = adb_rebootInstancesType_set_return(_rebootInstancesType, env,
 
567
                                                                 AXIS2_TRUE);
 
568
                                            }
 
569
                                            else
 
570
                                            {
 
571
                                                status = adb_rebootInstancesType_set_return(_rebootInstancesType, env,
 
572
                                                                      AXIS2_FALSE);
 
573
                                            }
 
574
                                      }
 
575
                                      
 
576
                                      else
 
577
                                      {
 
578
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element return");
 
579
                                          status = AXIS2_FAILURE;
 
580
                                      }
 
581
                                      
 
582
                                 if(AXIS2_FAILURE ==  status)
 
583
                                 {
 
584
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for return ");
 
585
                                     if(element_qname)
 
586
                                     {
 
587
                                         axutil_qname_free(element_qname, env);
 
588
                                     }
 
589
                                     return AXIS2_FAILURE;
 
590
                                 }
 
591
                              }
 
592
                           
 
593
                  if(element_qname)
 
594
                  {
 
595
                     axutil_qname_free(element_qname, env);
 
596
                     element_qname = NULL;
 
597
                  }
 
598
                 
 
599
                    /*
 
600
                     * building instanceIds array
 
601
                     */
 
602
                       arr_list = axutil_array_list_create(env, 10);
 
603
                   
 
604
 
 
605
                     
 
606
                     /*
 
607
                      * building instanceIds element
 
608
                      */
 
609
                     
 
610
                     
 
611
                     
 
612
                                    element_qname = axutil_qname_create(env, "instanceIds", "http://eucalyptus.ucsb.edu/", NULL);
 
613
                                  
 
614
                               
 
615
                               for (i = 0, sequence_broken = 0, current_node = (is_early_node_valid?axiom_node_get_next_sibling(current_node, env):current_node); !sequence_broken && current_node != NULL;) 
 
616
                                             
 
617
                               {
 
618
                                  if(axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
 
619
                                  {
 
620
                                     current_node =axiom_node_get_next_sibling(current_node, env);
 
621
                                     is_early_node_valid = AXIS2_FALSE;
 
622
                                     continue;
 
623
                                  }
 
624
                                  
 
625
                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
 
626
                                  qname = axiom_element_get_qname(current_element, env, current_node);
 
627
 
 
628
                                  if (axutil_qname_equals(element_qname, env, qname))
 
629
                                  {
 
630
                                  
 
631
                                      is_early_node_valid = AXIS2_TRUE;
 
632
                                      
 
633
                                     
 
634
                                          text_value = axiom_element_get_text(current_element, env, current_node);
 
635
                                          if(text_value != NULL)
 
636
                                          {
 
637
                                              axutil_array_list_add_at(arr_list, env, i, axutil_strdup(env, text_value));
 
638
                                          }
 
639
                                          
 
640
                                          else
 
641
                                          {
 
642
                                              /*
 
643
                                               * axis2_qname_t *qname = NULL;
 
644
                                               * axiom_attribute_t *the_attri = NULL;
 
645
                                               * 
 
646
                                               * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
 
647
                                               * the_attri = axiom_element_get_attribute(current_element, env, qname);
 
648
                                               */
 
649
                                           
 
650
                                              /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
 
651
                                             
 
652
                                              axiom_attribute_t *the_attri = NULL;
 
653
                                              axis2_char_t *attrib_text = NULL;
 
654
                                              axutil_hash_t *attribute_hash = NULL;
 
655
                                             
 
656
                                              attribute_hash = axiom_element_get_all_attributes(current_element, env);
 
657
                                             
 
658
                                              attrib_text = NULL;
 
659
                                              if(attribute_hash)
 
660
                                              {
 
661
                                                   axutil_hash_index_t *hi;
 
662
                                                   void *val;
 
663
                                                   const void *key;
 
664
                                             
 
665
                                                   for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi)) 
 
666
                                                   {
 
667
                                                       axutil_hash_this(hi, &key, NULL, &val);
 
668
                                                       
 
669
                                                       if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
 
670
                                                       {
 
671
                                                           the_attri = (axiom_attribute_t*)val;
 
672
                                                           break;
 
673
                                                       }
 
674
                                                   }
 
675
                                              }
 
676
                                             
 
677
                                              if(the_attri)
 
678
                                              {
 
679
                                                  attrib_text = axiom_attribute_get_value(the_attri, env);
 
680
                                              }
 
681
                                              else
 
682
                                              {
 
683
                                                  /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
 
684
                                                  attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
 
685
                                              }
 
686
                                             
 
687
                                              if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
 
688
                                              {
 
689
                                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element instanceIds");
 
690
                                                  status = AXIS2_FAILURE;
 
691
                                              }
 
692
                                              else
 
693
                                              {
 
694
                                                  /* after all, we found this is a empty string */
 
695
                                                  axutil_array_list_add_at(arr_list, env, i, axutil_strdup(env, ""));
 
696
                                              }
 
697
                                          }
 
698
                                          
 
699
                                     if(AXIS2_FAILURE ==  status)
 
700
                                     {
 
701
                                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for instanceIds ");
 
702
                                         if(element_qname)
 
703
                                         {
 
704
                                            axutil_qname_free(element_qname, env);
 
705
                                         }
 
706
                                         if(arr_list)
 
707
                                         {
 
708
                                            axutil_array_list_free(arr_list, env);
 
709
                                         }
 
710
                                         return AXIS2_FAILURE;
 
711
                                     }
 
712
 
 
713
                                     i ++;
 
714
                                    current_node = axiom_node_get_next_sibling(current_node, env);
 
715
                                  }
 
716
                                  else
 
717
                                  {
 
718
                                      is_early_node_valid = AXIS2_FALSE;
 
719
                                      sequence_broken = 1;
 
720
                                  }
 
721
                                  
 
722
                               }
 
723
 
 
724
                               
 
725
                                   if (i < 0)
 
726
                                   {
 
727
                                     /* found element out of order */
 
728
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "instanceIds (@minOccurs = '0') only have %d elements", i);
 
729
                                     if(element_qname)
 
730
                                     {
 
731
                                        axutil_qname_free(element_qname, env);
 
732
                                     }
 
733
                                     if(arr_list)
 
734
                                     {
 
735
                                        axutil_array_list_free(arr_list, env);
 
736
                                     }
 
737
                                     return AXIS2_FAILURE;
 
738
                                   }
 
739
                               
 
740
 
 
741
                               if(0 == axutil_array_list_size(arr_list,env))
 
742
                               {
 
743
                                    axutil_array_list_free(arr_list, env);
 
744
                               }
 
745
                               else
 
746
                               {
 
747
                                    status = adb_rebootInstancesType_set_instanceIds(_rebootInstancesType, env,
 
748
                                                                   arr_list);
 
749
                               }
 
750
 
 
751
                             
 
752
                  if(element_qname)
 
753
                  {
 
754
                     axutil_qname_free(element_qname, env);
 
755
                     element_qname = NULL;
 
756
                  }
 
757
                 
 
758
          return status;
 
759
       }
 
760
 
 
761
          axis2_bool_t AXIS2_CALL
 
762
          adb_rebootInstancesType_is_particle()
 
763
          {
 
764
            
 
765
                 return AXIS2_FALSE;
 
766
              
 
767
          }
 
768
 
 
769
 
 
770
          void AXIS2_CALL
 
771
          adb_rebootInstancesType_declare_parent_namespaces(
 
772
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
773
                    const axutil_env_t *env, axiom_element_t *parent_element,
 
774
                    axutil_hash_t *namespaces, int *next_ns_index)
 
775
          {
 
776
            
 
777
                  /* Here this is an empty function, Nothing to declare */
 
778
                 
 
779
          }
 
780
 
 
781
        
 
782
        
 
783
        axiom_node_t* AXIS2_CALL
 
784
        adb_rebootInstancesType_serialize(
 
785
                adb_rebootInstancesType_t* _rebootInstancesType,
 
786
                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)
 
787
        {
 
788
            
 
789
            
 
790
             axis2_char_t *string_to_stream;
 
791
            
 
792
         
 
793
         axiom_node_t *current_node = NULL;
 
794
         int tag_closed = 0;
 
795
 
 
796
         
 
797
         
 
798
                axiom_namespace_t *ns1 = NULL;
 
799
 
 
800
                axis2_char_t *qname_uri = NULL;
 
801
                axis2_char_t *qname_prefix = NULL;
 
802
                axis2_char_t *p_prefix = NULL;
 
803
                axis2_bool_t ns_already_defined;
 
804
            
 
805
               int i = 0;
 
806
               int count = 0;
 
807
               void *element = NULL;
 
808
             
 
809
                    axis2_char_t *text_value_1;
 
810
                    axis2_char_t *text_value_1_temp;
 
811
                    
 
812
                    axis2_char_t *text_value_2;
 
813
                    axis2_char_t *text_value_2_temp;
 
814
                    
 
815
                    axis2_char_t *text_value_3;
 
816
                    axis2_char_t *text_value_3_temp;
 
817
                    
 
818
                    axis2_char_t text_value_4[64];
 
819
                    
 
820
                    axis2_char_t *text_value_5;
 
821
                    axis2_char_t *text_value_5_temp;
 
822
                    
 
823
               axis2_char_t *start_input_str = NULL;
 
824
               axis2_char_t *end_input_str = NULL;
 
825
               unsigned int start_input_str_len = 0;
 
826
               unsigned int end_input_str_len = 0;
 
827
            
 
828
            
 
829
               axiom_data_source_t *data_source = NULL;
 
830
               axutil_stream_t *stream = NULL;
 
831
 
 
832
            
 
833
 
 
834
            AXIS2_ENV_CHECK(env, NULL);
 
835
            AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, NULL);
 
836
            
 
837
            
 
838
                    current_node = parent;
 
839
                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, env);
 
840
                    if (!data_source)
 
841
                        return NULL;
 
842
                    stream = axiom_data_source_get_stream(data_source, env); /* assume parent is of type data source */
 
843
                    if (!stream)
 
844
                        return NULL;
 
845
                  
 
846
            if(!parent_tag_closed)
 
847
            {
 
848
            
 
849
              string_to_stream = ">"; 
 
850
              axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
 
851
              tag_closed = 1;
 
852
            
 
853
            }
 
854
            
 
855
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
 
856
                       {
 
857
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
 
858
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
 
859
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
 
860
                           
 
861
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
 
862
                                            "http://eucalyptus.ucsb.edu/",
 
863
                                            p_prefix));
 
864
                       }
 
865
                      
 
866
 
 
867
                   if (!_rebootInstancesType->is_valid_correlationId)
 
868
                   {
 
869
                      
 
870
                           /* no need to complain for minoccurs=0 element */
 
871
                            
 
872
                          
 
873
                   }
 
874
                   else
 
875
                   {
 
876
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
 
877
                                 (4 + axutil_strlen(p_prefix) + 
 
878
                                  axutil_strlen("correlationId"))); 
 
879
                                 
 
880
                                 /* axutil_strlen("<:>") + 1 = 4 */
 
881
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
 
882
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("correlationId")));
 
883
                                  /* axutil_strlen("</:>") + 1 = 5 */
 
884
                                  
 
885
                     
 
886
 
 
887
                   
 
888
                   
 
889
                     
 
890
                     /*
 
891
                      * parsing correlationId element
 
892
                      */
 
893
 
 
894
                    
 
895
                    
 
896
                            sprintf(start_input_str, "<%s%scorrelationId>",
 
897
                                 p_prefix?p_prefix:"",
 
898
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
 
899
                            
 
900
                        start_input_str_len = axutil_strlen(start_input_str);
 
901
                        sprintf(end_input_str, "</%s%scorrelationId>",
 
902
                                 p_prefix?p_prefix:"",
 
903
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
 
904
                        end_input_str_len = axutil_strlen(end_input_str);
 
905
                    
 
906
                           text_value_1 = _rebootInstancesType->property_correlationId;
 
907
                           
 
908
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
 
909
                           
 
910
                            
 
911
                           text_value_1_temp = axutil_xml_quote_string(env, text_value_1, AXIS2_TRUE);
 
912
                           if (text_value_1_temp)
 
913
                           {
 
914
                               axutil_stream_write(stream, env, text_value_1_temp, axutil_strlen(text_value_1_temp));
 
915
                               AXIS2_FREE(env->allocator, text_value_1_temp);
 
916
                           }
 
917
                           else
 
918
                           {
 
919
                               axutil_stream_write(stream, env, text_value_1, axutil_strlen(text_value_1));
 
920
                           }
 
921
                           
 
922
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
 
923
                           
 
924
                     
 
925
                     AXIS2_FREE(env->allocator,start_input_str);
 
926
                     AXIS2_FREE(env->allocator,end_input_str);
 
927
                 } 
 
928
 
 
929
                 
 
930
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
 
931
                       {
 
932
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
 
933
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
 
934
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
 
935
                           
 
936
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
 
937
                                            "http://eucalyptus.ucsb.edu/",
 
938
                                            p_prefix));
 
939
                       }
 
940
                      
 
941
 
 
942
                   if (!_rebootInstancesType->is_valid_userId)
 
943
                   {
 
944
                      
 
945
                           /* no need to complain for minoccurs=0 element */
 
946
                            
 
947
                          
 
948
                   }
 
949
                   else
 
950
                   {
 
951
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
 
952
                                 (4 + axutil_strlen(p_prefix) + 
 
953
                                  axutil_strlen("userId"))); 
 
954
                                 
 
955
                                 /* axutil_strlen("<:>") + 1 = 4 */
 
956
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
 
957
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("userId")));
 
958
                                  /* axutil_strlen("</:>") + 1 = 5 */
 
959
                                  
 
960
                     
 
961
 
 
962
                   
 
963
                   
 
964
                     
 
965
                     /*
 
966
                      * parsing userId element
 
967
                      */
 
968
 
 
969
                    
 
970
                    
 
971
                            sprintf(start_input_str, "<%s%suserId>",
 
972
                                 p_prefix?p_prefix:"",
 
973
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
 
974
                            
 
975
                        start_input_str_len = axutil_strlen(start_input_str);
 
976
                        sprintf(end_input_str, "</%s%suserId>",
 
977
                                 p_prefix?p_prefix:"",
 
978
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
 
979
                        end_input_str_len = axutil_strlen(end_input_str);
 
980
                    
 
981
                           text_value_2 = _rebootInstancesType->property_userId;
 
982
                           
 
983
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
 
984
                           
 
985
                            
 
986
                           text_value_2_temp = axutil_xml_quote_string(env, text_value_2, AXIS2_TRUE);
 
987
                           if (text_value_2_temp)
 
988
                           {
 
989
                               axutil_stream_write(stream, env, text_value_2_temp, axutil_strlen(text_value_2_temp));
 
990
                               AXIS2_FREE(env->allocator, text_value_2_temp);
 
991
                           }
 
992
                           else
 
993
                           {
 
994
                               axutil_stream_write(stream, env, text_value_2, axutil_strlen(text_value_2));
 
995
                           }
 
996
                           
 
997
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
 
998
                           
 
999
                     
 
1000
                     AXIS2_FREE(env->allocator,start_input_str);
 
1001
                     AXIS2_FREE(env->allocator,end_input_str);
 
1002
                 } 
 
1003
 
 
1004
                 
 
1005
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
 
1006
                       {
 
1007
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
 
1008
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
 
1009
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
 
1010
                           
 
1011
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
 
1012
                                            "http://eucalyptus.ucsb.edu/",
 
1013
                                            p_prefix));
 
1014
                       }
 
1015
                      
 
1016
 
 
1017
                   if (!_rebootInstancesType->is_valid_statusMessage)
 
1018
                   {
 
1019
                      
 
1020
                           /* no need to complain for minoccurs=0 element */
 
1021
                            
 
1022
                          
 
1023
                   }
 
1024
                   else
 
1025
                   {
 
1026
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
 
1027
                                 (4 + axutil_strlen(p_prefix) + 
 
1028
                                  axutil_strlen("statusMessage"))); 
 
1029
                                 
 
1030
                                 /* axutil_strlen("<:>") + 1 = 4 */
 
1031
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
 
1032
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("statusMessage")));
 
1033
                                  /* axutil_strlen("</:>") + 1 = 5 */
 
1034
                                  
 
1035
                     
 
1036
 
 
1037
                   
 
1038
                   
 
1039
                     
 
1040
                     /*
 
1041
                      * parsing statusMessage element
 
1042
                      */
 
1043
 
 
1044
                    
 
1045
                    
 
1046
                            sprintf(start_input_str, "<%s%sstatusMessage>",
 
1047
                                 p_prefix?p_prefix:"",
 
1048
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
 
1049
                            
 
1050
                        start_input_str_len = axutil_strlen(start_input_str);
 
1051
                        sprintf(end_input_str, "</%s%sstatusMessage>",
 
1052
                                 p_prefix?p_prefix:"",
 
1053
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
 
1054
                        end_input_str_len = axutil_strlen(end_input_str);
 
1055
                    
 
1056
                           text_value_3 = _rebootInstancesType->property_statusMessage;
 
1057
                           
 
1058
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
 
1059
                           
 
1060
                            
 
1061
                           text_value_3_temp = axutil_xml_quote_string(env, text_value_3, AXIS2_TRUE);
 
1062
                           if (text_value_3_temp)
 
1063
                           {
 
1064
                               axutil_stream_write(stream, env, text_value_3_temp, axutil_strlen(text_value_3_temp));
 
1065
                               AXIS2_FREE(env->allocator, text_value_3_temp);
 
1066
                           }
 
1067
                           else
 
1068
                           {
 
1069
                               axutil_stream_write(stream, env, text_value_3, axutil_strlen(text_value_3));
 
1070
                           }
 
1071
                           
 
1072
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
 
1073
                           
 
1074
                     
 
1075
                     AXIS2_FREE(env->allocator,start_input_str);
 
1076
                     AXIS2_FREE(env->allocator,end_input_str);
 
1077
                 } 
 
1078
 
 
1079
                 
 
1080
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
 
1081
                       {
 
1082
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
 
1083
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
 
1084
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
 
1085
                           
 
1086
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
 
1087
                                            "http://eucalyptus.ucsb.edu/",
 
1088
                                            p_prefix));
 
1089
                       }
 
1090
                      
 
1091
 
 
1092
                   if (!_rebootInstancesType->is_valid_return)
 
1093
                   {
 
1094
                      
 
1095
                           /* no need to complain for minoccurs=0 element */
 
1096
                            
 
1097
                          
 
1098
                   }
 
1099
                   else
 
1100
                   {
 
1101
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
 
1102
                                 (4 + axutil_strlen(p_prefix) + 
 
1103
                                  axutil_strlen("return"))); 
 
1104
                                 
 
1105
                                 /* axutil_strlen("<:>") + 1 = 4 */
 
1106
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
 
1107
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("return")));
 
1108
                                  /* axutil_strlen("</:>") + 1 = 5 */
 
1109
                                  
 
1110
                     
 
1111
 
 
1112
                   
 
1113
                   
 
1114
                     
 
1115
                     /*
 
1116
                      * parsing return element
 
1117
                      */
 
1118
 
 
1119
                    
 
1120
                    
 
1121
                            sprintf(start_input_str, "<%s%sreturn>",
 
1122
                                 p_prefix?p_prefix:"",
 
1123
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
 
1124
                            
 
1125
                        start_input_str_len = axutil_strlen(start_input_str);
 
1126
                        sprintf(end_input_str, "</%s%sreturn>",
 
1127
                                 p_prefix?p_prefix:"",
 
1128
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
 
1129
                        end_input_str_len = axutil_strlen(end_input_str);
 
1130
                    
 
1131
                           strcpy(text_value_4, (_rebootInstancesType->property_return)?"true":"false");
 
1132
                           
 
1133
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
 
1134
                           
 
1135
                           axutil_stream_write(stream, env, text_value_4, axutil_strlen(text_value_4));
 
1136
                           
 
1137
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
 
1138
                           
 
1139
                     
 
1140
                     AXIS2_FREE(env->allocator,start_input_str);
 
1141
                     AXIS2_FREE(env->allocator,end_input_str);
 
1142
                 } 
 
1143
 
 
1144
                 
 
1145
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
 
1146
                       {
 
1147
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
 
1148
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
 
1149
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
 
1150
                           
 
1151
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
 
1152
                                            "http://eucalyptus.ucsb.edu/",
 
1153
                                            p_prefix));
 
1154
                       }
 
1155
                      
 
1156
 
 
1157
                   if (!_rebootInstancesType->is_valid_instanceIds)
 
1158
                   {
 
1159
                      
 
1160
                           /* no need to complain for minoccurs=0 element */
 
1161
                            
 
1162
                          
 
1163
                   }
 
1164
                   else
 
1165
                   {
 
1166
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
 
1167
                                 (4 + axutil_strlen(p_prefix) + 
 
1168
                                  axutil_strlen("instanceIds"))); 
 
1169
                                 
 
1170
                                 /* axutil_strlen("<:>") + 1 = 4 */
 
1171
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
 
1172
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("instanceIds")));
 
1173
                                  /* axutil_strlen("</:>") + 1 = 5 */
 
1174
                                  
 
1175
                     
 
1176
 
 
1177
                   
 
1178
                   
 
1179
                     /*
 
1180
                      * Parsing instanceIds array
 
1181
                      */
 
1182
                     if (_rebootInstancesType->property_instanceIds != NULL)
 
1183
                     {
 
1184
                        
 
1185
                            sprintf(start_input_str, "<%s%sinstanceIds>",
 
1186
                                 p_prefix?p_prefix:"",
 
1187
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
 
1188
                            
 
1189
                         start_input_str_len = axutil_strlen(start_input_str);
 
1190
 
 
1191
                         sprintf(end_input_str, "</%s%sinstanceIds>",
 
1192
                                 p_prefix?p_prefix:"",
 
1193
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
 
1194
                         end_input_str_len = axutil_strlen(end_input_str);
 
1195
 
 
1196
                         count = axutil_array_list_size(_rebootInstancesType->property_instanceIds, env);
 
1197
                         for(i = 0; i < count; i ++)
 
1198
                         {
 
1199
                            element = axutil_array_list_get(_rebootInstancesType->property_instanceIds, env, i);
 
1200
 
 
1201
                            if(NULL == element) 
 
1202
                            {
 
1203
                                continue;
 
1204
                            }
 
1205
                    
 
1206
                     
 
1207
                     /*
 
1208
                      * parsing instanceIds element
 
1209
                      */
 
1210
 
 
1211
                    
 
1212
                    
 
1213
                           text_value_5 = (axis2_char_t*)element;
 
1214
                           
 
1215
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
 
1216
                           
 
1217
                            
 
1218
                           text_value_5_temp = axutil_xml_quote_string(env, text_value_5, AXIS2_TRUE);
 
1219
                           if (text_value_5_temp)
 
1220
                           {
 
1221
                               axutil_stream_write(stream, env, text_value_5_temp, axutil_strlen(text_value_5_temp));
 
1222
                               AXIS2_FREE(env->allocator, text_value_5_temp);
 
1223
                           }
 
1224
                           else
 
1225
                           {
 
1226
                               axutil_stream_write(stream, env, text_value_5, axutil_strlen(text_value_5));
 
1227
                           }
 
1228
                           
 
1229
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
 
1230
                           
 
1231
                         }
 
1232
                     }
 
1233
                   
 
1234
                     
 
1235
                     AXIS2_FREE(env->allocator,start_input_str);
 
1236
                     AXIS2_FREE(env->allocator,end_input_str);
 
1237
                 } 
 
1238
 
 
1239
                 
 
1240
 
 
1241
            return parent;
 
1242
        }
 
1243
 
 
1244
 
 
1245
        
 
1246
 
 
1247
            /**
 
1248
             * getter for correlationId.
 
1249
             */
 
1250
            axis2_char_t* AXIS2_CALL
 
1251
            adb_rebootInstancesType_get_correlationId(
 
1252
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1253
                    const axutil_env_t *env)
 
1254
             {
 
1255
                
 
1256
                    AXIS2_ENV_CHECK(env, NULL);
 
1257
                    AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, NULL);
 
1258
                  
 
1259
 
 
1260
                return _rebootInstancesType->property_correlationId;
 
1261
             }
 
1262
 
 
1263
            /**
 
1264
             * setter for correlationId
 
1265
             */
 
1266
            axis2_status_t AXIS2_CALL
 
1267
            adb_rebootInstancesType_set_correlationId(
 
1268
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1269
                    const axutil_env_t *env,
 
1270
                    const axis2_char_t*  arg_correlationId)
 
1271
             {
 
1272
                
 
1273
 
 
1274
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
1275
                AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
1276
                
 
1277
                if(_rebootInstancesType->is_valid_correlationId &&
 
1278
                        arg_correlationId == _rebootInstancesType->property_correlationId)
 
1279
                {
 
1280
                    
 
1281
                    return AXIS2_SUCCESS; 
 
1282
                }
 
1283
 
 
1284
                adb_rebootInstancesType_reset_correlationId(_rebootInstancesType, env);
 
1285
 
 
1286
                
 
1287
                if(NULL == arg_correlationId)
 
1288
                {
 
1289
                    /* We are already done */
 
1290
                    return AXIS2_SUCCESS;
 
1291
                }
 
1292
                _rebootInstancesType->property_correlationId = (axis2_char_t *)axutil_strdup(env, arg_correlationId);
 
1293
                        if(NULL == _rebootInstancesType->property_correlationId)
 
1294
                        {
 
1295
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for correlationId");
 
1296
                            return AXIS2_FAILURE;
 
1297
                        }
 
1298
                        _rebootInstancesType->is_valid_correlationId = AXIS2_TRUE;
 
1299
                    
 
1300
                return AXIS2_SUCCESS;
 
1301
             }
 
1302
 
 
1303
             
 
1304
 
 
1305
           /**
 
1306
            * resetter for correlationId
 
1307
            */
 
1308
           axis2_status_t AXIS2_CALL
 
1309
           adb_rebootInstancesType_reset_correlationId(
 
1310
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
1311
                   const axutil_env_t *env)
 
1312
           {
 
1313
               int i = 0;
 
1314
               int count = 0;
 
1315
               void *element = NULL;
 
1316
 
 
1317
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
1318
               AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
1319
               
 
1320
 
 
1321
               
 
1322
            
 
1323
                
 
1324
                if(_rebootInstancesType->property_correlationId != NULL)
 
1325
                {
 
1326
                   
 
1327
                   
 
1328
                        AXIS2_FREE(env-> allocator, _rebootInstancesType->property_correlationId);
 
1329
                     _rebootInstancesType->property_correlationId = NULL;
 
1330
                }
 
1331
            
 
1332
                
 
1333
                
 
1334
                _rebootInstancesType->is_valid_correlationId = AXIS2_FALSE; 
 
1335
               return AXIS2_SUCCESS;
 
1336
           }
 
1337
 
 
1338
           /**
 
1339
            * Check whether correlationId is nill
 
1340
            */
 
1341
           axis2_bool_t AXIS2_CALL
 
1342
           adb_rebootInstancesType_is_correlationId_nil(
 
1343
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
1344
                   const axutil_env_t *env)
 
1345
           {
 
1346
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
 
1347
               AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_TRUE);
 
1348
               
 
1349
               return !_rebootInstancesType->is_valid_correlationId;
 
1350
           }
 
1351
 
 
1352
           /**
 
1353
            * Set correlationId to nill (currently the same as reset)
 
1354
            */
 
1355
           axis2_status_t AXIS2_CALL
 
1356
           adb_rebootInstancesType_set_correlationId_nil(
 
1357
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
1358
                   const axutil_env_t *env)
 
1359
           {
 
1360
               return adb_rebootInstancesType_reset_correlationId(_rebootInstancesType, env);
 
1361
           }
 
1362
 
 
1363
           
 
1364
 
 
1365
            /**
 
1366
             * getter for userId.
 
1367
             */
 
1368
            axis2_char_t* AXIS2_CALL
 
1369
            adb_rebootInstancesType_get_userId(
 
1370
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1371
                    const axutil_env_t *env)
 
1372
             {
 
1373
                
 
1374
                    AXIS2_ENV_CHECK(env, NULL);
 
1375
                    AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, NULL);
 
1376
                  
 
1377
 
 
1378
                return _rebootInstancesType->property_userId;
 
1379
             }
 
1380
 
 
1381
            /**
 
1382
             * setter for userId
 
1383
             */
 
1384
            axis2_status_t AXIS2_CALL
 
1385
            adb_rebootInstancesType_set_userId(
 
1386
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1387
                    const axutil_env_t *env,
 
1388
                    const axis2_char_t*  arg_userId)
 
1389
             {
 
1390
                
 
1391
 
 
1392
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
1393
                AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
1394
                
 
1395
                if(_rebootInstancesType->is_valid_userId &&
 
1396
                        arg_userId == _rebootInstancesType->property_userId)
 
1397
                {
 
1398
                    
 
1399
                    return AXIS2_SUCCESS; 
 
1400
                }
 
1401
 
 
1402
                adb_rebootInstancesType_reset_userId(_rebootInstancesType, env);
 
1403
 
 
1404
                
 
1405
                if(NULL == arg_userId)
 
1406
                {
 
1407
                    /* We are already done */
 
1408
                    return AXIS2_SUCCESS;
 
1409
                }
 
1410
                _rebootInstancesType->property_userId = (axis2_char_t *)axutil_strdup(env, arg_userId);
 
1411
                        if(NULL == _rebootInstancesType->property_userId)
 
1412
                        {
 
1413
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for userId");
 
1414
                            return AXIS2_FAILURE;
 
1415
                        }
 
1416
                        _rebootInstancesType->is_valid_userId = AXIS2_TRUE;
 
1417
                    
 
1418
                return AXIS2_SUCCESS;
 
1419
             }
 
1420
 
 
1421
             
 
1422
 
 
1423
           /**
 
1424
            * resetter for userId
 
1425
            */
 
1426
           axis2_status_t AXIS2_CALL
 
1427
           adb_rebootInstancesType_reset_userId(
 
1428
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
1429
                   const axutil_env_t *env)
 
1430
           {
 
1431
               int i = 0;
 
1432
               int count = 0;
 
1433
               void *element = NULL;
 
1434
 
 
1435
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
1436
               AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
1437
               
 
1438
 
 
1439
               
 
1440
            
 
1441
                
 
1442
                if(_rebootInstancesType->property_userId != NULL)
 
1443
                {
 
1444
                   
 
1445
                   
 
1446
                        AXIS2_FREE(env-> allocator, _rebootInstancesType->property_userId);
 
1447
                     _rebootInstancesType->property_userId = NULL;
 
1448
                }
 
1449
            
 
1450
                
 
1451
                
 
1452
                _rebootInstancesType->is_valid_userId = AXIS2_FALSE; 
 
1453
               return AXIS2_SUCCESS;
 
1454
           }
 
1455
 
 
1456
           /**
 
1457
            * Check whether userId is nill
 
1458
            */
 
1459
           axis2_bool_t AXIS2_CALL
 
1460
           adb_rebootInstancesType_is_userId_nil(
 
1461
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
1462
                   const axutil_env_t *env)
 
1463
           {
 
1464
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
 
1465
               AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_TRUE);
 
1466
               
 
1467
               return !_rebootInstancesType->is_valid_userId;
 
1468
           }
 
1469
 
 
1470
           /**
 
1471
            * Set userId to nill (currently the same as reset)
 
1472
            */
 
1473
           axis2_status_t AXIS2_CALL
 
1474
           adb_rebootInstancesType_set_userId_nil(
 
1475
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
1476
                   const axutil_env_t *env)
 
1477
           {
 
1478
               return adb_rebootInstancesType_reset_userId(_rebootInstancesType, env);
 
1479
           }
 
1480
 
 
1481
           
 
1482
 
 
1483
            /**
 
1484
             * getter for statusMessage.
 
1485
             */
 
1486
            axis2_char_t* AXIS2_CALL
 
1487
            adb_rebootInstancesType_get_statusMessage(
 
1488
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1489
                    const axutil_env_t *env)
 
1490
             {
 
1491
                
 
1492
                    AXIS2_ENV_CHECK(env, NULL);
 
1493
                    AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, NULL);
 
1494
                  
 
1495
 
 
1496
                return _rebootInstancesType->property_statusMessage;
 
1497
             }
 
1498
 
 
1499
            /**
 
1500
             * setter for statusMessage
 
1501
             */
 
1502
            axis2_status_t AXIS2_CALL
 
1503
            adb_rebootInstancesType_set_statusMessage(
 
1504
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1505
                    const axutil_env_t *env,
 
1506
                    const axis2_char_t*  arg_statusMessage)
 
1507
             {
 
1508
                
 
1509
 
 
1510
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
1511
                AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
1512
                
 
1513
                if(_rebootInstancesType->is_valid_statusMessage &&
 
1514
                        arg_statusMessage == _rebootInstancesType->property_statusMessage)
 
1515
                {
 
1516
                    
 
1517
                    return AXIS2_SUCCESS; 
 
1518
                }
 
1519
 
 
1520
                adb_rebootInstancesType_reset_statusMessage(_rebootInstancesType, env);
 
1521
 
 
1522
                
 
1523
                if(NULL == arg_statusMessage)
 
1524
                {
 
1525
                    /* We are already done */
 
1526
                    return AXIS2_SUCCESS;
 
1527
                }
 
1528
                _rebootInstancesType->property_statusMessage = (axis2_char_t *)axutil_strdup(env, arg_statusMessage);
 
1529
                        if(NULL == _rebootInstancesType->property_statusMessage)
 
1530
                        {
 
1531
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for statusMessage");
 
1532
                            return AXIS2_FAILURE;
 
1533
                        }
 
1534
                        _rebootInstancesType->is_valid_statusMessage = AXIS2_TRUE;
 
1535
                    
 
1536
                return AXIS2_SUCCESS;
 
1537
             }
 
1538
 
 
1539
             
 
1540
 
 
1541
           /**
 
1542
            * resetter for statusMessage
 
1543
            */
 
1544
           axis2_status_t AXIS2_CALL
 
1545
           adb_rebootInstancesType_reset_statusMessage(
 
1546
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
1547
                   const axutil_env_t *env)
 
1548
           {
 
1549
               int i = 0;
 
1550
               int count = 0;
 
1551
               void *element = NULL;
 
1552
 
 
1553
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
1554
               AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
1555
               
 
1556
 
 
1557
               
 
1558
            
 
1559
                
 
1560
                if(_rebootInstancesType->property_statusMessage != NULL)
 
1561
                {
 
1562
                   
 
1563
                   
 
1564
                        AXIS2_FREE(env-> allocator, _rebootInstancesType->property_statusMessage);
 
1565
                     _rebootInstancesType->property_statusMessage = NULL;
 
1566
                }
 
1567
            
 
1568
                
 
1569
                
 
1570
                _rebootInstancesType->is_valid_statusMessage = AXIS2_FALSE; 
 
1571
               return AXIS2_SUCCESS;
 
1572
           }
 
1573
 
 
1574
           /**
 
1575
            * Check whether statusMessage is nill
 
1576
            */
 
1577
           axis2_bool_t AXIS2_CALL
 
1578
           adb_rebootInstancesType_is_statusMessage_nil(
 
1579
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
1580
                   const axutil_env_t *env)
 
1581
           {
 
1582
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
 
1583
               AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_TRUE);
 
1584
               
 
1585
               return !_rebootInstancesType->is_valid_statusMessage;
 
1586
           }
 
1587
 
 
1588
           /**
 
1589
            * Set statusMessage to nill (currently the same as reset)
 
1590
            */
 
1591
           axis2_status_t AXIS2_CALL
 
1592
           adb_rebootInstancesType_set_statusMessage_nil(
 
1593
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
1594
                   const axutil_env_t *env)
 
1595
           {
 
1596
               return adb_rebootInstancesType_reset_statusMessage(_rebootInstancesType, env);
 
1597
           }
 
1598
 
 
1599
           
 
1600
 
 
1601
            /**
 
1602
             * getter for return.
 
1603
             */
 
1604
            axis2_bool_t AXIS2_CALL
 
1605
            adb_rebootInstancesType_get_return(
 
1606
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1607
                    const axutil_env_t *env)
 
1608
             {
 
1609
                
 
1610
                    AXIS2_ENV_CHECK(env, (axis2_bool_t)0);
 
1611
                    AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, (axis2_bool_t)0);
 
1612
                  
 
1613
 
 
1614
                return _rebootInstancesType->property_return;
 
1615
             }
 
1616
 
 
1617
            /**
 
1618
             * setter for return
 
1619
             */
 
1620
            axis2_status_t AXIS2_CALL
 
1621
            adb_rebootInstancesType_set_return(
 
1622
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1623
                    const axutil_env_t *env,
 
1624
                    axis2_bool_t  arg_return)
 
1625
             {
 
1626
                
 
1627
 
 
1628
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
1629
                AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
1630
                
 
1631
                if(_rebootInstancesType->is_valid_return &&
 
1632
                        arg_return == _rebootInstancesType->property_return)
 
1633
                {
 
1634
                    
 
1635
                    return AXIS2_SUCCESS; 
 
1636
                }
 
1637
 
 
1638
                adb_rebootInstancesType_reset_return(_rebootInstancesType, env);
 
1639
 
 
1640
                _rebootInstancesType->property_return = arg_return;
 
1641
                        _rebootInstancesType->is_valid_return = AXIS2_TRUE;
 
1642
                    
 
1643
                return AXIS2_SUCCESS;
 
1644
             }
 
1645
 
 
1646
             
 
1647
 
 
1648
           /**
 
1649
            * resetter for return
 
1650
            */
 
1651
           axis2_status_t AXIS2_CALL
 
1652
           adb_rebootInstancesType_reset_return(
 
1653
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
1654
                   const axutil_env_t *env)
 
1655
           {
 
1656
               int i = 0;
 
1657
               int count = 0;
 
1658
               void *element = NULL;
 
1659
 
 
1660
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
1661
               AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
1662
               
 
1663
 
 
1664
               _rebootInstancesType->is_valid_return = AXIS2_FALSE; 
 
1665
               return AXIS2_SUCCESS;
 
1666
           }
 
1667
 
 
1668
           /**
 
1669
            * Check whether return is nill
 
1670
            */
 
1671
           axis2_bool_t AXIS2_CALL
 
1672
           adb_rebootInstancesType_is_return_nil(
 
1673
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
1674
                   const axutil_env_t *env)
 
1675
           {
 
1676
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
 
1677
               AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_TRUE);
 
1678
               
 
1679
               return !_rebootInstancesType->is_valid_return;
 
1680
           }
 
1681
 
 
1682
           /**
 
1683
            * Set return to nill (currently the same as reset)
 
1684
            */
 
1685
           axis2_status_t AXIS2_CALL
 
1686
           adb_rebootInstancesType_set_return_nil(
 
1687
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
1688
                   const axutil_env_t *env)
 
1689
           {
 
1690
               return adb_rebootInstancesType_reset_return(_rebootInstancesType, env);
 
1691
           }
 
1692
 
 
1693
           
 
1694
 
 
1695
            /**
 
1696
             * getter for instanceIds.
 
1697
             */
 
1698
            axutil_array_list_t* AXIS2_CALL
 
1699
            adb_rebootInstancesType_get_instanceIds(
 
1700
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1701
                    const axutil_env_t *env)
 
1702
             {
 
1703
                
 
1704
                    AXIS2_ENV_CHECK(env, NULL);
 
1705
                    AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, NULL);
 
1706
                  
 
1707
 
 
1708
                return _rebootInstancesType->property_instanceIds;
 
1709
             }
 
1710
 
 
1711
            /**
 
1712
             * setter for instanceIds
 
1713
             */
 
1714
            axis2_status_t AXIS2_CALL
 
1715
            adb_rebootInstancesType_set_instanceIds(
 
1716
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1717
                    const axutil_env_t *env,
 
1718
                    axutil_array_list_t*  arg_instanceIds)
 
1719
             {
 
1720
                
 
1721
                 int size = 0;
 
1722
                 int i = 0;
 
1723
                 axis2_bool_t non_nil_exists = AXIS2_FALSE;
 
1724
                
 
1725
 
 
1726
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
1727
                AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
1728
                
 
1729
                if(_rebootInstancesType->is_valid_instanceIds &&
 
1730
                        arg_instanceIds == _rebootInstancesType->property_instanceIds)
 
1731
                {
 
1732
                    
 
1733
                    return AXIS2_SUCCESS; 
 
1734
                }
 
1735
 
 
1736
                
 
1737
                 size = axutil_array_list_size(arg_instanceIds, env);
 
1738
                 
 
1739
                 if (size < 0)
 
1740
                 {
 
1741
                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "instanceIds has less than minOccurs(0)");
 
1742
                     return AXIS2_FAILURE;
 
1743
                 }
 
1744
                 for(i = 0; i < size; i ++ )
 
1745
                 {
 
1746
                     if(NULL != axutil_array_list_get(arg_instanceIds, env, i))
 
1747
                     {
 
1748
                         non_nil_exists = AXIS2_TRUE;
 
1749
                         break;
 
1750
                     }
 
1751
                 }
 
1752
 
 
1753
                 adb_rebootInstancesType_reset_instanceIds(_rebootInstancesType, env);
 
1754
 
 
1755
                
 
1756
                if(NULL == arg_instanceIds)
 
1757
                {
 
1758
                    /* We are already done */
 
1759
                    return AXIS2_SUCCESS;
 
1760
                }
 
1761
                _rebootInstancesType->property_instanceIds = arg_instanceIds;
 
1762
                        if(non_nil_exists)
 
1763
                        {
 
1764
                            _rebootInstancesType->is_valid_instanceIds = AXIS2_TRUE;
 
1765
                        }
 
1766
                        
 
1767
                    
 
1768
                return AXIS2_SUCCESS;
 
1769
             }
 
1770
 
 
1771
            
 
1772
            /**
 
1773
             * Get ith element of instanceIds.
 
1774
             */
 
1775
            axis2_char_t* AXIS2_CALL
 
1776
            adb_rebootInstancesType_get_instanceIds_at(
 
1777
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1778
                    const axutil_env_t *env, int i)
 
1779
            {
 
1780
                axis2_char_t* ret_val;
 
1781
 
 
1782
                
 
1783
                    AXIS2_ENV_CHECK(env, NULL);
 
1784
                    AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, NULL);
 
1785
                  
 
1786
 
 
1787
                if(_rebootInstancesType->property_instanceIds == NULL)
 
1788
                {
 
1789
                    return (axis2_char_t*)0;
 
1790
                }
 
1791
                ret_val = (axis2_char_t*)axutil_array_list_get(_rebootInstancesType->property_instanceIds, env, i);
 
1792
                
 
1793
                    return ret_val;
 
1794
                  
 
1795
            }
 
1796
 
 
1797
            /**
 
1798
             * Set the ith element of instanceIds.
 
1799
             */
 
1800
            axis2_status_t AXIS2_CALL
 
1801
            adb_rebootInstancesType_set_instanceIds_at(
 
1802
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1803
                    const axutil_env_t *env, int i,
 
1804
                    const axis2_char_t* arg_instanceIds)
 
1805
            {
 
1806
                void *element = NULL;
 
1807
                int size = 0;
 
1808
                int j;
 
1809
                int k;
 
1810
                axis2_bool_t non_nil_exists = AXIS2_FALSE;
 
1811
 
 
1812
                
 
1813
 
 
1814
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
1815
                AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
1816
                
 
1817
                if( _rebootInstancesType->is_valid_instanceIds &&
 
1818
                    _rebootInstancesType->property_instanceIds &&
 
1819
                
 
1820
                    arg_instanceIds == (axis2_char_t*)axutil_array_list_get(_rebootInstancesType->property_instanceIds, env, i))
 
1821
                  
 
1822
                {
 
1823
                    
 
1824
                    return AXIS2_SUCCESS; 
 
1825
                }
 
1826
 
 
1827
                
 
1828
                    if(NULL == arg_instanceIds)
 
1829
                    {
 
1830
                        if(_rebootInstancesType->property_instanceIds != NULL)
 
1831
                        {
 
1832
                            size = axutil_array_list_size(_rebootInstancesType->property_instanceIds, env);
 
1833
                            for(j = 0, k = 0; j < size; j ++ )
 
1834
                            {
 
1835
                                if(i == j) continue; 
 
1836
                                if(NULL != axutil_array_list_get(_rebootInstancesType->property_instanceIds, env, i))
 
1837
                                {
 
1838
                                    k ++;
 
1839
                                    non_nil_exists = AXIS2_TRUE;
 
1840
                                    if(k >= 0)
 
1841
                                    {
 
1842
                                        break;
 
1843
                                    }
 
1844
                                }
 
1845
                            }
 
1846
                        }
 
1847
                    }
 
1848
                    else
 
1849
                    {
 
1850
                        non_nil_exists = AXIS2_TRUE;
 
1851
                    }
 
1852
                  
 
1853
                if( k < 0)
 
1854
                {
 
1855
                       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Size of the array of instanceIds is beinng set to be smaller than the specificed number of minOccurs(0)");
 
1856
                       return AXIS2_FAILURE;
 
1857
                }
 
1858
 
 
1859
                if(_rebootInstancesType->property_instanceIds == NULL)
 
1860
                {
 
1861
                    _rebootInstancesType->property_instanceIds = axutil_array_list_create(env, 10);
 
1862
                }
 
1863
                
 
1864
                /* check whether there already exist an element */
 
1865
                element = axutil_array_list_get(_rebootInstancesType->property_instanceIds, env, i);
 
1866
                if(NULL != element)
 
1867
                {
 
1868
                  
 
1869
                  
 
1870
                  
 
1871
                       /* This is an unknown type or a primitive. Please free this manually*/
 
1872
                     
 
1873
                }
 
1874
 
 
1875
                
 
1876
                    if(!non_nil_exists)
 
1877
                    {
 
1878
                        
 
1879
                        _rebootInstancesType->is_valid_instanceIds = AXIS2_FALSE;
 
1880
                        axutil_array_list_set(_rebootInstancesType->property_instanceIds , env, i, NULL);
 
1881
                        
 
1882
                        return AXIS2_SUCCESS;
 
1883
                    }
 
1884
                
 
1885
                   axutil_array_list_set(_rebootInstancesType->property_instanceIds , env, i, axutil_strdup(env, arg_instanceIds));
 
1886
                  _rebootInstancesType->is_valid_instanceIds = AXIS2_TRUE;
 
1887
                
 
1888
                return AXIS2_SUCCESS;
 
1889
            }
 
1890
 
 
1891
            /**
 
1892
             * Add to instanceIds.
 
1893
             */
 
1894
            axis2_status_t AXIS2_CALL
 
1895
            adb_rebootInstancesType_add_instanceIds(
 
1896
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1897
                    const axutil_env_t *env,
 
1898
                    const axis2_char_t* arg_instanceIds)
 
1899
             {
 
1900
                
 
1901
 
 
1902
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
1903
                AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
1904
 
 
1905
                
 
1906
                    if(NULL == arg_instanceIds)
 
1907
                    {
 
1908
                      
 
1909
                           return AXIS2_SUCCESS; 
 
1910
                        
 
1911
                    }
 
1912
                  
 
1913
 
 
1914
                if(_rebootInstancesType->property_instanceIds == NULL)
 
1915
                {
 
1916
                    _rebootInstancesType->property_instanceIds = axutil_array_list_create(env, 10);
 
1917
                }
 
1918
                if(_rebootInstancesType->property_instanceIds == NULL)
 
1919
                {
 
1920
                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in allocatting memory for instanceIds");
 
1921
                    return AXIS2_FAILURE;
 
1922
                    
 
1923
                }
 
1924
                
 
1925
                   axutil_array_list_add(_rebootInstancesType->property_instanceIds , env, axutil_strdup(env, arg_instanceIds));
 
1926
                  _rebootInstancesType->is_valid_instanceIds = AXIS2_TRUE;
 
1927
                return AXIS2_SUCCESS;
 
1928
             }
 
1929
 
 
1930
            /**
 
1931
             * Get the size of the instanceIds array.
 
1932
             */
 
1933
            int AXIS2_CALL
 
1934
            adb_rebootInstancesType_sizeof_instanceIds(
 
1935
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1936
                    const axutil_env_t *env)
 
1937
            {
 
1938
                AXIS2_ENV_CHECK(env, -1);
 
1939
                AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, -1);
 
1940
                if(_rebootInstancesType->property_instanceIds == NULL)
 
1941
                {
 
1942
                    return 0;
 
1943
                }
 
1944
                return axutil_array_list_size(_rebootInstancesType->property_instanceIds, env);
 
1945
            }
 
1946
 
 
1947
            /**
 
1948
             * remove the ith element, same as set_nil_at.
 
1949
             */
 
1950
            axis2_status_t AXIS2_CALL
 
1951
            adb_rebootInstancesType_remove_instanceIds_at(
 
1952
                    adb_rebootInstancesType_t* _rebootInstancesType,
 
1953
                    const axutil_env_t *env, int i)
 
1954
            {
 
1955
                return adb_rebootInstancesType_set_instanceIds_nil_at(_rebootInstancesType, env, i);
 
1956
            }
 
1957
 
 
1958
            
 
1959
 
 
1960
           /**
 
1961
            * resetter for instanceIds
 
1962
            */
 
1963
           axis2_status_t AXIS2_CALL
 
1964
           adb_rebootInstancesType_reset_instanceIds(
 
1965
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
1966
                   const axutil_env_t *env)
 
1967
           {
 
1968
               int i = 0;
 
1969
               int count = 0;
 
1970
               void *element = NULL;
 
1971
 
 
1972
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
1973
               AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
1974
               
 
1975
 
 
1976
               
 
1977
                  if (_rebootInstancesType->property_instanceIds != NULL)
 
1978
                  {
 
1979
                      count = axutil_array_list_size(_rebootInstancesType->property_instanceIds, env);
 
1980
                      for(i = 0; i < count; i ++)
 
1981
                      {
 
1982
                         element = axutil_array_list_get(_rebootInstancesType->property_instanceIds, env, i);
 
1983
                
 
1984
            
 
1985
                
 
1986
                if(element != NULL)
 
1987
                {
 
1988
                   
 
1989
                   
 
1990
                        AXIS2_FREE(env-> allocator, (axis2_char_t*)element);
 
1991
                     element = NULL;
 
1992
                }
 
1993
            
 
1994
                
 
1995
                
 
1996
                
 
1997
                      }
 
1998
                      axutil_array_list_free(_rebootInstancesType->property_instanceIds, env);
 
1999
                  }
 
2000
                _rebootInstancesType->is_valid_instanceIds = AXIS2_FALSE; 
 
2001
               return AXIS2_SUCCESS;
 
2002
           }
 
2003
 
 
2004
           /**
 
2005
            * Check whether instanceIds is nill
 
2006
            */
 
2007
           axis2_bool_t AXIS2_CALL
 
2008
           adb_rebootInstancesType_is_instanceIds_nil(
 
2009
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
2010
                   const axutil_env_t *env)
 
2011
           {
 
2012
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
 
2013
               AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_TRUE);
 
2014
               
 
2015
               return !_rebootInstancesType->is_valid_instanceIds;
 
2016
           }
 
2017
 
 
2018
           /**
 
2019
            * Set instanceIds to nill (currently the same as reset)
 
2020
            */
 
2021
           axis2_status_t AXIS2_CALL
 
2022
           adb_rebootInstancesType_set_instanceIds_nil(
 
2023
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
2024
                   const axutil_env_t *env)
 
2025
           {
 
2026
               return adb_rebootInstancesType_reset_instanceIds(_rebootInstancesType, env);
 
2027
           }
 
2028
 
 
2029
           
 
2030
           /**
 
2031
            * Check whether instanceIds is nill at i
 
2032
            */
 
2033
           axis2_bool_t AXIS2_CALL
 
2034
           adb_rebootInstancesType_is_instanceIds_nil_at(
 
2035
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
2036
                   const axutil_env_t *env, int i)
 
2037
           {
 
2038
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
 
2039
               AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_TRUE);
 
2040
               
 
2041
               return (_rebootInstancesType->is_valid_instanceIds == AXIS2_FALSE ||
 
2042
                        NULL == _rebootInstancesType->property_instanceIds || 
 
2043
                        NULL == axutil_array_list_get(_rebootInstancesType->property_instanceIds, env, i));
 
2044
           }
 
2045
 
 
2046
           /**
 
2047
            * Set instanceIds to nill at i
 
2048
            */
 
2049
           axis2_status_t AXIS2_CALL
 
2050
           adb_rebootInstancesType_set_instanceIds_nil_at(
 
2051
                   adb_rebootInstancesType_t* _rebootInstancesType,
 
2052
                   const axutil_env_t *env, int i)
 
2053
           {
 
2054
                void *element = NULL;
 
2055
                int size = 0;
 
2056
                int j;
 
2057
                axis2_bool_t non_nil_exists = AXIS2_FALSE;
 
2058
 
 
2059
                int k = 0;
 
2060
 
 
2061
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
2062
                AXIS2_PARAM_CHECK(env->error, _rebootInstancesType, AXIS2_FAILURE);
 
2063
 
 
2064
                if(_rebootInstancesType->property_instanceIds == NULL ||
 
2065
                            _rebootInstancesType->is_valid_instanceIds == AXIS2_FALSE)
 
2066
                {
 
2067
                    
 
2068
                    non_nil_exists = AXIS2_FALSE;
 
2069
                }
 
2070
                else
 
2071
                {
 
2072
                    size = axutil_array_list_size(_rebootInstancesType->property_instanceIds, env);
 
2073
                    for(j = 0, k = 0; j < size; j ++ )
 
2074
                    {
 
2075
                        if(i == j) continue; 
 
2076
                        if(NULL != axutil_array_list_get(_rebootInstancesType->property_instanceIds, env, i))
 
2077
                        {
 
2078
                            k ++;
 
2079
                            non_nil_exists = AXIS2_TRUE;
 
2080
                            if( k >= 0)
 
2081
                            {
 
2082
                                break;
 
2083
                            }
 
2084
                        }
 
2085
                    }
 
2086
                }
 
2087
                
 
2088
 
 
2089
                if( k < 0)
 
2090
                {
 
2091
                       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Size of the array of instanceIds is beinng set to be smaller than the specificed number of minOccurs(0)");
 
2092
                       return AXIS2_FAILURE;
 
2093
                }
 
2094
 
 
2095
                if(_rebootInstancesType->property_instanceIds == NULL)
 
2096
                {
 
2097
                    _rebootInstancesType->is_valid_instanceIds = AXIS2_FALSE;
 
2098
                    
 
2099
                    return AXIS2_SUCCESS;
 
2100
                }
 
2101
 
 
2102
                /* check whether there already exist an element */
 
2103
                element = axutil_array_list_get(_rebootInstancesType->property_instanceIds, env, i);
 
2104
                if(NULL != element)
 
2105
                {
 
2106
                  
 
2107
                  
 
2108
                  
 
2109
                       /* This is an unknown type or a primitive. Please free this manually*/
 
2110
                     
 
2111
                }
 
2112
 
 
2113
                
 
2114
                    if(!non_nil_exists)
 
2115
                    {
 
2116
                        
 
2117
                        _rebootInstancesType->is_valid_instanceIds = AXIS2_FALSE;
 
2118
                        axutil_array_list_set(_rebootInstancesType->property_instanceIds , env, i, NULL);
 
2119
                        return AXIS2_SUCCESS;
 
2120
                    }
 
2121
                
 
2122
 
 
2123
                
 
2124
                axutil_array_list_set(_rebootInstancesType->property_instanceIds , env, i, NULL);
 
2125
                
 
2126
                return AXIS2_SUCCESS;
 
2127
 
 
2128
           }
 
2129
 
 
2130
           
 
2131