~ubuntu-branches/ubuntu/maverick/eucalyptus/maverick

« back to all changes in this revision

Viewing changes to cluster/generated/adb_terminateInstancesType.c

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey)
  • Date: 2010-07-21 17:27:10 UTC
  • mfrom: (1.1.38 upstream)
  • Revision ID: james.westby@ubuntu.com-20100721172710-7xv07dmdqgivc3t9
Tags: 2.0~bzr1211-0ubuntu1
* New major upstream version merge, 2.0 (r1211).
* debian/patches/:
  - 01-wsdl-stubs.patch, debian/wsdl.md5sums: wsdl stubs updated.
  - 02-Makefile.patch: Updated to reflect new code layout.
  - 07-local_support_euca_conf-in.patch: Updated to reflect new code layout.
  - 08-ubuntu-default-networking.patch: Refreshed.
  - 09-small-128-192MB.patch: Updated to point to new location.
  - 10-disable-iscsi.patch: Refreshed.
  - 11-state-cleanup-memleakfix.patch: Removed, fixed upstream.
  - 15-fix-default-ramdisk.patch: Updated to point to new location.
  - 16-kvm_libvirt_xml_default_use_kvm.patch: Updated to reflect changes.
  - 17-fix_walrus_OOM_errors.patch: Removed, fixed upstream.
  - 18-priv_security.patch: Updated to reflect upstream changes.
  - 20-brute-force-webui.patch: Updated to reflect upstream changes. 
  - 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:
8
8
         */
9
9
 
10
10
        #include "adb_terminateInstancesType.h"
11
 
 
 
11
        
12
12
                /*
13
13
                 * This type was generated from the piece of schema that had
14
14
                 * name = terminateInstancesType
15
15
                 * Namespace URI = http://eucalyptus.ucsb.edu/
16
16
                 * Namespace Prefix = ns1
17
17
                 */
18
 
 
 
18
           
19
19
 
20
20
 
21
21
        struct adb_terminateInstancesType
22
22
        {
23
23
            axis2_char_t* property_correlationId;
24
24
 
25
 
 
 
25
                
26
26
                axis2_bool_t is_valid_correlationId;
27
27
 
28
28
 
29
29
            axis2_char_t* property_userId;
30
30
 
31
 
 
 
31
                
32
32
                axis2_bool_t is_valid_userId;
33
33
 
34
34
 
35
35
            axis2_char_t* property_statusMessage;
36
36
 
37
 
 
 
37
                
38
38
                axis2_bool_t is_valid_statusMessage;
39
39
 
40
40
 
41
41
            axis2_bool_t property_return;
42
42
 
43
 
 
 
43
                
44
44
                axis2_bool_t is_valid_return;
45
45
 
46
46
 
47
47
            axutil_array_list_t* property_instanceIds;
48
48
 
49
 
 
 
49
                
50
50
                axis2_bool_t is_valid_instanceIds;
51
51
 
52
52
 
53
 
 
 
53
            
54
54
        };
55
55
 
56
56
 
57
57
       /************************* Private Function prototypes ********************************/
58
 
 
 
58
        
59
59
 
60
60
                axis2_status_t AXIS2_CALL
61
61
                adb_terminateInstancesType_set_correlationId_nil(
62
62
                        adb_terminateInstancesType_t* _terminateInstancesType,
63
63
                        const axutil_env_t *env);
64
 
 
 
64
            
65
65
 
66
66
                axis2_status_t AXIS2_CALL
67
67
                adb_terminateInstancesType_set_userId_nil(
68
68
                        adb_terminateInstancesType_t* _terminateInstancesType,
69
69
                        const axutil_env_t *env);
70
 
 
 
70
            
71
71
 
72
72
                axis2_status_t AXIS2_CALL
73
73
                adb_terminateInstancesType_set_return_nil(
74
74
                        adb_terminateInstancesType_t* _terminateInstancesType,
75
75
                        const axutil_env_t *env);
76
 
 
 
76
            
77
77
 
78
78
 
79
79
       /************************* Function Implmentations ********************************/
82
82
            const axutil_env_t *env)
83
83
        {
84
84
            adb_terminateInstancesType_t *_terminateInstancesType = NULL;
85
 
 
 
85
            
86
86
            AXIS2_ENV_CHECK(env, NULL);
87
87
 
88
88
            _terminateInstancesType = (adb_terminateInstancesType_t *) AXIS2_MALLOC(env->
105
105
            _terminateInstancesType->is_valid_return  = AXIS2_FALSE;
106
106
            _terminateInstancesType->property_instanceIds  = NULL;
107
107
                  _terminateInstancesType->is_valid_instanceIds  = AXIS2_FALSE;
108
 
 
 
108
            
109
109
 
110
110
            return _terminateInstancesType;
111
111
        }
115
115
                adb_terminateInstancesType_t* _terminateInstancesType,
116
116
                const axutil_env_t *env)
117
117
        {
118
 
 
 
118
            
119
119
                int i = 0;
120
120
                int count = 0;
121
121
                void *element = NULL;
122
 
 
 
122
            
123
123
 
124
124
            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
125
125
            AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_FAILURE);
129
129
            adb_terminateInstancesType_reset_statusMessage(_terminateInstancesType, env);
130
130
            adb_terminateInstancesType_reset_return(_terminateInstancesType, env);
131
131
            adb_terminateInstancesType_reset_instanceIds(_terminateInstancesType, env);
132
 
 
 
132
            
133
133
 
134
134
            if(_terminateInstancesType)
135
135
            {
140
140
        }
141
141
 
142
142
 
143
 
 
 
143
        
144
144
 
145
145
        axis2_status_t AXIS2_CALL
146
146
        adb_terminateInstancesType_deserialize(
151
151
                axis2_bool_t dont_care_minoccurs)
152
152
        {
153
153
          axiom_node_t *parent = *dp_parent;
154
 
 
 
154
          
155
155
          axis2_status_t status = AXIS2_SUCCESS;
156
 
 
 
156
          
157
157
              void *element = NULL;
158
 
 
 
158
           
159
159
             axis2_char_t* text_value = NULL;
160
160
             axutil_qname_t *qname = NULL;
161
 
 
 
161
          
162
162
               int i = 0;
163
163
               axutil_array_list_t *arr_list = NULL;
164
 
 
 
164
            
165
165
               int sequence_broken = 0;
166
166
               axiom_node_t *tmp_node = NULL;
167
 
 
168
 
            axutil_qname_t *element_qname = NULL;
169
 
 
 
167
            
 
168
            axutil_qname_t *element_qname = NULL; 
 
169
            
170
170
               axiom_node_t *first_node = NULL;
171
171
               axis2_bool_t is_early_node_valid = AXIS2_TRUE;
172
172
               axiom_node_t *current_node = NULL;
173
173
               axiom_element_t *current_element = NULL;
174
 
 
 
174
            
175
175
            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
176
176
            AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_FAILURE);
177
177
 
178
 
 
179
 
 
 
178
            
 
179
              
180
180
              while(parent && axiom_node_get_node_type(parent, env) != AXIOM_ELEMENT)
181
181
              {
182
182
                  parent = axiom_node_get_next_sibling(parent, env);
184
184
              if (NULL == parent)
185
185
              {
186
186
                /* This should be checked before everything */
187
 
                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
 
187
                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
188
188
                            "Failed in building adb object for terminateInstancesType : "
189
189
                            "NULL elemenet can not be passed to deserialize");
190
190
                return AXIS2_FAILURE;
191
191
              }
192
 
 
193
 
 
 
192
              
 
193
                      
194
194
                      first_node = axiom_node_get_first_child(parent, env);
195
 
 
196
 
 
197
 
 
198
 
 
 
195
                      
 
196
                    
 
197
 
 
198
                     
199
199
                     /*
200
200
                      * building correlationId element
201
201
                      */
202
 
 
203
 
 
204
 
 
 
202
                     
 
203
                     
 
204
                     
205
205
                                   current_node = first_node;
206
206
                                   is_early_node_valid = AXIS2_FALSE;
207
 
 
208
 
 
 
207
                                   
 
208
                                   
209
209
                                    while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
210
210
                                    {
211
211
                                        current_node = axiom_node_get_next_sibling(current_node, env);
215
215
                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
216
216
                                        qname = axiom_element_get_qname(current_element, env, current_node);
217
217
                                    }
218
 
 
 
218
                                   
219
219
                                 element_qname = axutil_qname_create(env, "correlationId", "http://eucalyptus.ucsb.edu/", NULL);
220
 
 
221
 
 
222
 
                           if (
 
220
                                 
 
221
 
 
222
                           if ( 
223
223
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
224
224
                           {
225
225
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
226
226
                              {
227
227
                                is_early_node_valid = AXIS2_TRUE;
228
228
                              }
229
 
 
230
 
 
 
229
                              
 
230
                                 
231
231
                                      text_value = axiom_element_get_text(current_element, env, current_node);
232
232
                                      if(text_value != NULL)
233
233
                                      {
234
234
                                            status = adb_terminateInstancesType_set_correlationId(_terminateInstancesType, env,
235
235
                                                               text_value);
236
236
                                      }
237
 
 
 
237
                                      
238
238
                                      else
239
239
                                      {
240
240
                                            /*
241
241
                                             * axis2_qname_t *qname = NULL;
242
242
                                             * axiom_attribute_t *the_attri = NULL;
243
 
                                             *
 
243
                                             * 
244
244
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
245
245
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
246
246
                                             */
258
258
                                                 axutil_hash_index_t *hi;
259
259
                                                 void *val;
260
260
                                                 const void *key;
261
 
 
262
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
 
261
                                        
 
262
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi)) 
263
263
                                                 {
264
264
                                                     axutil_hash_this(hi, &key, NULL, &val);
265
 
 
 
265
                                                     
266
266
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
267
267
                                                     {
268
268
                                                         the_attri = (axiom_attribute_t*)val;
293
293
                                                                   "");
294
294
                                            }
295
295
                                      }
296
 
 
 
296
                                      
297
297
                                 if(AXIS2_FAILURE ==  status)
298
298
                                 {
299
299
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for correlationId ");
304
304
                                     return AXIS2_FAILURE;
305
305
                                 }
306
306
                              }
307
 
 
 
307
                           
308
308
                  if(element_qname)
309
309
                  {
310
310
                     axutil_qname_free(element_qname, env);
311
311
                     element_qname = NULL;
312
312
                  }
313
 
 
314
 
 
315
 
 
 
313
                 
 
314
 
 
315
                     
316
316
                     /*
317
317
                      * building userId element
318
318
                      */
319
 
 
320
 
 
321
 
 
 
319
                     
 
320
                     
 
321
                     
322
322
                                    /*
323
323
                                     * because elements are ordered this works fine
324
324
                                     */
325
 
 
326
 
 
 
325
                                  
 
326
                                   
327
327
                                   if(current_node != NULL && is_early_node_valid)
328
328
                                   {
329
329
                                       current_node = axiom_node_get_next_sibling(current_node, env);
330
 
 
331
 
 
 
330
                                       
 
331
                                       
332
332
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
333
333
                                        {
334
334
                                            current_node = axiom_node_get_next_sibling(current_node, env);
338
338
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
339
339
                                            qname = axiom_element_get_qname(current_element, env, current_node);
340
340
                                        }
341
 
 
 
341
                                       
342
342
                                   }
343
343
                                   is_early_node_valid = AXIS2_FALSE;
344
 
 
 
344
                                 
345
345
                                 element_qname = axutil_qname_create(env, "userId", "http://eucalyptus.ucsb.edu/", NULL);
346
 
 
347
 
 
348
 
                           if (
 
346
                                 
 
347
 
 
348
                           if ( 
349
349
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
350
350
                           {
351
351
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
352
352
                              {
353
353
                                is_early_node_valid = AXIS2_TRUE;
354
354
                              }
355
 
 
356
 
 
 
355
                              
 
356
                                 
357
357
                                      text_value = axiom_element_get_text(current_element, env, current_node);
358
358
                                      if(text_value != NULL)
359
359
                                      {
360
360
                                            status = adb_terminateInstancesType_set_userId(_terminateInstancesType, env,
361
361
                                                               text_value);
362
362
                                      }
363
 
 
 
363
                                      
364
364
                                      else
365
365
                                      {
366
366
                                            /*
367
367
                                             * axis2_qname_t *qname = NULL;
368
368
                                             * axiom_attribute_t *the_attri = NULL;
369
 
                                             *
 
369
                                             * 
370
370
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
371
371
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
372
372
                                             */
384
384
                                                 axutil_hash_index_t *hi;
385
385
                                                 void *val;
386
386
                                                 const void *key;
387
 
 
388
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
 
387
                                        
 
388
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi)) 
389
389
                                                 {
390
390
                                                     axutil_hash_this(hi, &key, NULL, &val);
391
 
 
 
391
                                                     
392
392
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
393
393
                                                     {
394
394
                                                         the_attri = (axiom_attribute_t*)val;
419
419
                                                                   "");
420
420
                                            }
421
421
                                      }
422
 
 
 
422
                                      
423
423
                                 if(AXIS2_FAILURE ==  status)
424
424
                                 {
425
425
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for userId ");
430
430
                                     return AXIS2_FAILURE;
431
431
                                 }
432
432
                              }
433
 
 
 
433
                           
434
434
                  if(element_qname)
435
435
                  {
436
436
                     axutil_qname_free(element_qname, env);
437
437
                     element_qname = NULL;
438
438
                  }
439
 
 
440
 
 
441
 
 
 
439
                 
 
440
 
 
441
                     
442
442
                     /*
443
443
                      * building statusMessage element
444
444
                      */
445
 
 
446
 
 
447
 
 
 
445
                     
 
446
                     
 
447
                     
448
448
                                    /*
449
449
                                     * because elements are ordered this works fine
450
450
                                     */
451
 
 
452
 
 
 
451
                                  
 
452
                                   
453
453
                                   if(current_node != NULL && is_early_node_valid)
454
454
                                   {
455
455
                                       current_node = axiom_node_get_next_sibling(current_node, env);
456
 
 
457
 
 
 
456
                                       
 
457
                                       
458
458
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
459
459
                                        {
460
460
                                            current_node = axiom_node_get_next_sibling(current_node, env);
464
464
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
465
465
                                            qname = axiom_element_get_qname(current_element, env, current_node);
466
466
                                        }
467
 
 
 
467
                                       
468
468
                                   }
469
469
                                   is_early_node_valid = AXIS2_FALSE;
470
 
 
 
470
                                 
471
471
                                 element_qname = axutil_qname_create(env, "statusMessage", "http://eucalyptus.ucsb.edu/", NULL);
472
 
 
473
 
 
474
 
                           if (
 
472
                                 
 
473
 
 
474
                           if ( 
475
475
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
476
476
                           {
477
477
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
478
478
                              {
479
479
                                is_early_node_valid = AXIS2_TRUE;
480
480
                              }
481
 
 
482
 
 
 
481
                              
 
482
                                 
483
483
                                      text_value = axiom_element_get_text(current_element, env, current_node);
484
484
                                      if(text_value != NULL)
485
485
                                      {
486
486
                                            status = adb_terminateInstancesType_set_statusMessage(_terminateInstancesType, env,
487
487
                                                               text_value);
488
488
                                      }
489
 
 
 
489
                                      
490
490
                                 if(AXIS2_FAILURE ==  status)
491
491
                                 {
492
492
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for statusMessage ");
497
497
                                     return AXIS2_FAILURE;
498
498
                                 }
499
499
                              }
500
 
 
 
500
                           
501
501
                  if(element_qname)
502
502
                  {
503
503
                     axutil_qname_free(element_qname, env);
504
504
                     element_qname = NULL;
505
505
                  }
506
 
 
507
 
 
508
 
 
 
506
                 
 
507
 
 
508
                     
509
509
                     /*
510
510
                      * building return element
511
511
                      */
512
 
 
513
 
 
514
 
 
 
512
                     
 
513
                     
 
514
                     
515
515
                                    /*
516
516
                                     * because elements are ordered this works fine
517
517
                                     */
518
 
 
519
 
 
 
518
                                  
 
519
                                   
520
520
                                   if(current_node != NULL && is_early_node_valid)
521
521
                                   {
522
522
                                       current_node = axiom_node_get_next_sibling(current_node, env);
523
 
 
524
 
 
 
523
                                       
 
524
                                       
525
525
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
526
526
                                        {
527
527
                                            current_node = axiom_node_get_next_sibling(current_node, env);
531
531
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
532
532
                                            qname = axiom_element_get_qname(current_element, env, current_node);
533
533
                                        }
534
 
 
 
534
                                       
535
535
                                   }
536
536
                                   is_early_node_valid = AXIS2_FALSE;
537
 
 
 
537
                                 
538
538
                                 element_qname = axutil_qname_create(env, "return", "http://eucalyptus.ucsb.edu/", NULL);
539
 
 
540
 
 
541
 
                           if (
 
539
                                 
 
540
 
 
541
                           if ( 
542
542
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
543
543
                           {
544
544
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
545
545
                              {
546
546
                                is_early_node_valid = AXIS2_TRUE;
547
547
                              }
548
 
 
549
 
 
 
548
                              
 
549
                                 
550
550
                                      text_value = axiom_element_get_text(current_element, env, current_node);
551
551
                                      if(text_value != NULL)
552
552
                                      {
561
561
                                                                      AXIS2_FALSE);
562
562
                                            }
563
563
                                      }
564
 
 
 
564
                                      
565
565
                                      else
566
566
                                      {
567
567
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element return");
568
568
                                          status = AXIS2_FAILURE;
569
569
                                      }
570
 
 
 
570
                                      
571
571
                                 if(AXIS2_FAILURE ==  status)
572
572
                                 {
573
573
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for return ");
578
578
                                     return AXIS2_FAILURE;
579
579
                                 }
580
580
                              }
581
 
 
 
581
                           
582
582
                  if(element_qname)
583
583
                  {
584
584
                     axutil_qname_free(element_qname, env);
585
585
                     element_qname = NULL;
586
586
                  }
587
 
 
 
587
                 
588
588
                    /*
589
589
                     * building instanceIds array
590
590
                     */
591
591
                       arr_list = axutil_array_list_create(env, 10);
592
 
 
593
 
 
594
 
 
 
592
                   
 
593
 
 
594
                     
595
595
                     /*
596
596
                      * building instanceIds element
597
597
                      */
598
 
 
599
 
 
600
 
 
 
598
                     
 
599
                     
 
600
                     
601
601
                                    element_qname = axutil_qname_create(env, "instanceIds", "http://eucalyptus.ucsb.edu/", NULL);
602
 
 
603
 
 
604
 
                               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;)
605
 
 
 
602
                                  
 
603
                               
 
604
                               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;) 
 
605
                                             
606
606
                               {
607
607
                                  if(axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
608
608
                                  {
610
610
                                     is_early_node_valid = AXIS2_FALSE;
611
611
                                     continue;
612
612
                                  }
613
 
 
 
613
                                  
614
614
                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
615
615
                                  qname = axiom_element_get_qname(current_element, env, current_node);
616
616
 
617
617
                                  if (axutil_qname_equals(element_qname, env, qname))
618
618
                                  {
619
 
 
 
619
                                  
620
620
                                      is_early_node_valid = AXIS2_TRUE;
621
 
 
622
 
 
 
621
                                      
 
622
                                     
623
623
                                          text_value = axiom_element_get_text(current_element, env, current_node);
624
624
                                          if(text_value != NULL)
625
625
                                          {
626
626
                                              axutil_array_list_add_at(arr_list, env, i, axutil_strdup(env, text_value));
627
627
                                          }
628
 
 
 
628
                                          
629
629
                                     if(AXIS2_FAILURE ==  status)
630
630
                                     {
631
631
                                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for instanceIds ");
648
648
                                      is_early_node_valid = AXIS2_FALSE;
649
649
                                      sequence_broken = 1;
650
650
                                  }
651
 
 
 
651
                                  
652
652
                               }
653
653
 
654
 
 
 
654
                               
655
655
                                   if (i < 0)
656
656
                                   {
657
657
                                     /* found element out of order */
666
666
                                     }
667
667
                                     return AXIS2_FAILURE;
668
668
                                   }
669
 
 
 
669
                               
670
670
 
671
671
                               if(0 == axutil_array_list_size(arr_list,env))
672
672
                               {
678
678
                                                                   arr_list);
679
679
                               }
680
680
 
681
 
 
 
681
                             
682
682
                  if(element_qname)
683
683
                  {
684
684
                     axutil_qname_free(element_qname, env);
685
685
                     element_qname = NULL;
686
686
                  }
687
 
 
 
687
                 
688
688
          return status;
689
689
       }
690
690
 
691
691
          axis2_bool_t AXIS2_CALL
692
692
          adb_terminateInstancesType_is_particle()
693
693
          {
694
 
 
 
694
            
695
695
                 return AXIS2_FALSE;
696
 
 
 
696
              
697
697
          }
698
698
 
699
699
 
703
703
                    const axutil_env_t *env, axiom_element_t *parent_element,
704
704
                    axutil_hash_t *namespaces, int *next_ns_index)
705
705
          {
706
 
 
 
706
            
707
707
                  /* Here this is an empty function, Nothing to declare */
708
 
 
 
708
                 
709
709
          }
710
710
 
711
 
 
712
 
 
 
711
        
 
712
        
713
713
        axiom_node_t* AXIS2_CALL
714
714
        adb_terminateInstancesType_serialize(
715
715
                adb_terminateInstancesType_t* _terminateInstancesType,
716
716
                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)
717
717
        {
718
 
 
719
 
 
 
718
            
 
719
            
720
720
             axis2_char_t *string_to_stream;
721
 
 
722
 
 
 
721
            
 
722
         
723
723
         axiom_node_t *current_node = NULL;
724
724
         int tag_closed = 0;
725
725
 
726
 
 
727
 
 
 
726
         
 
727
         
728
728
                axiom_namespace_t *ns1 = NULL;
729
729
 
730
730
                axis2_char_t *qname_uri = NULL;
731
731
                axis2_char_t *qname_prefix = NULL;
732
732
                axis2_char_t *p_prefix = NULL;
733
733
                axis2_bool_t ns_already_defined;
734
 
 
 
734
            
735
735
               int i = 0;
736
736
               int count = 0;
737
737
               void *element = NULL;
738
 
 
 
738
             
739
739
                    axis2_char_t *text_value_1;
740
740
                    axis2_char_t *text_value_1_temp;
741
 
 
 
741
                    
742
742
                    axis2_char_t *text_value_2;
743
743
                    axis2_char_t *text_value_2_temp;
744
 
 
 
744
                    
745
745
                    axis2_char_t *text_value_3;
746
746
                    axis2_char_t *text_value_3_temp;
747
 
 
 
747
                    
748
748
                    axis2_char_t text_value_4[64];
749
 
 
 
749
                    
750
750
                    axis2_char_t *text_value_5;
751
751
                    axis2_char_t *text_value_5_temp;
752
 
 
 
752
                    
753
753
               axis2_char_t *start_input_str = NULL;
754
754
               axis2_char_t *end_input_str = NULL;
755
755
               unsigned int start_input_str_len = 0;
756
756
               unsigned int end_input_str_len = 0;
757
 
 
758
 
 
 
757
            
 
758
            
759
759
               axiom_data_source_t *data_source = NULL;
760
760
               axutil_stream_t *stream = NULL;
761
761
 
762
 
 
 
762
            
763
763
 
764
764
            AXIS2_ENV_CHECK(env, NULL);
765
765
            AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, NULL);
766
 
 
767
 
 
 
766
            
 
767
            
768
768
                    current_node = parent;
769
769
                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, env);
770
770
                    if (!data_source)
772
772
                    stream = axiom_data_source_get_stream(data_source, env); /* assume parent is of type data source */
773
773
                    if (!stream)
774
774
                        return NULL;
775
 
 
 
775
                  
776
776
            if(!parent_tag_closed)
777
777
            {
778
 
 
779
 
              string_to_stream = ">";
 
778
            
 
779
              string_to_stream = ">"; 
780
780
              axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
781
781
              tag_closed = 1;
782
 
 
 
782
            
783
783
            }
784
 
 
 
784
            
785
785
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
786
786
                       {
787
787
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
788
788
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
789
789
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
790
 
 
 
790
                           
791
791
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
792
792
                                            "http://eucalyptus.ucsb.edu/",
793
793
                                            p_prefix));
794
794
                       }
795
 
 
 
795
                      
796
796
 
797
797
                   if (!_terminateInstancesType->is_valid_correlationId)
798
798
                   {
799
 
 
 
799
                      
800
800
                           /* no need to complain for minoccurs=0 element */
801
 
 
802
 
 
 
801
                            
 
802
                          
803
803
                   }
804
804
                   else
805
805
                   {
806
806
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
807
 
                                 (4 + axutil_strlen(p_prefix) +
808
 
                                  axutil_strlen("correlationId")));
809
 
 
 
807
                                 (4 + axutil_strlen(p_prefix) + 
 
808
                                  axutil_strlen("correlationId"))); 
 
809
                                 
810
810
                                 /* axutil_strlen("<:>") + 1 = 4 */
811
811
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
812
812
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("correlationId")));
813
813
                                  /* axutil_strlen("</:>") + 1 = 5 */
814
 
 
815
 
 
816
 
 
817
 
 
818
 
 
819
 
 
 
814
                                  
 
815
                     
 
816
 
 
817
                   
 
818
                   
 
819
                     
820
820
                     /*
821
821
                      * parsing correlationId element
822
822
                      */
823
823
 
824
 
 
825
 
 
 
824
                    
 
825
                    
826
826
                            sprintf(start_input_str, "<%s%scorrelationId>",
827
827
                                 p_prefix?p_prefix:"",
828
828
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
829
 
 
 
829
                            
830
830
                        start_input_str_len = axutil_strlen(start_input_str);
831
831
                        sprintf(end_input_str, "</%s%scorrelationId>",
832
832
                                 p_prefix?p_prefix:"",
833
833
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
834
834
                        end_input_str_len = axutil_strlen(end_input_str);
835
 
 
 
835
                    
836
836
                           text_value_1 = _terminateInstancesType->property_correlationId;
837
 
 
 
837
                           
838
838
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
839
 
 
840
 
 
 
839
                           
 
840
                            
841
841
                           text_value_1_temp = axutil_xml_quote_string(env, text_value_1, AXIS2_TRUE);
842
842
                           if (text_value_1_temp)
843
843
                           {
848
848
                           {
849
849
                               axutil_stream_write(stream, env, text_value_1, axutil_strlen(text_value_1));
850
850
                           }
851
 
 
 
851
                           
852
852
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
853
 
 
854
 
 
 
853
                           
 
854
                     
855
855
                     AXIS2_FREE(env->allocator,start_input_str);
856
856
                     AXIS2_FREE(env->allocator,end_input_str);
857
 
                 }
858
 
 
859
 
 
 
857
                 } 
 
858
 
 
859
                 
860
860
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
861
861
                       {
862
862
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
863
863
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
864
864
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
865
 
 
 
865
                           
866
866
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
867
867
                                            "http://eucalyptus.ucsb.edu/",
868
868
                                            p_prefix));
869
869
                       }
870
 
 
 
870
                      
871
871
 
872
872
                   if (!_terminateInstancesType->is_valid_userId)
873
873
                   {
874
 
 
 
874
                      
875
875
                           /* no need to complain for minoccurs=0 element */
876
 
 
877
 
 
 
876
                            
 
877
                          
878
878
                   }
879
879
                   else
880
880
                   {
881
881
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
882
 
                                 (4 + axutil_strlen(p_prefix) +
883
 
                                  axutil_strlen("userId")));
884
 
 
 
882
                                 (4 + axutil_strlen(p_prefix) + 
 
883
                                  axutil_strlen("userId"))); 
 
884
                                 
885
885
                                 /* axutil_strlen("<:>") + 1 = 4 */
886
886
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
887
887
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("userId")));
888
888
                                  /* axutil_strlen("</:>") + 1 = 5 */
889
 
 
890
 
 
891
 
 
892
 
 
893
 
 
894
 
 
 
889
                                  
 
890
                     
 
891
 
 
892
                   
 
893
                   
 
894
                     
895
895
                     /*
896
896
                      * parsing userId element
897
897
                      */
898
898
 
899
 
 
900
 
 
 
899
                    
 
900
                    
901
901
                            sprintf(start_input_str, "<%s%suserId>",
902
902
                                 p_prefix?p_prefix:"",
903
903
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
904
 
 
 
904
                            
905
905
                        start_input_str_len = axutil_strlen(start_input_str);
906
906
                        sprintf(end_input_str, "</%s%suserId>",
907
907
                                 p_prefix?p_prefix:"",
908
908
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
909
909
                        end_input_str_len = axutil_strlen(end_input_str);
910
 
 
 
910
                    
911
911
                           text_value_2 = _terminateInstancesType->property_userId;
912
 
 
 
912
                           
913
913
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
914
 
 
915
 
 
 
914
                           
 
915
                            
916
916
                           text_value_2_temp = axutil_xml_quote_string(env, text_value_2, AXIS2_TRUE);
917
917
                           if (text_value_2_temp)
918
918
                           {
923
923
                           {
924
924
                               axutil_stream_write(stream, env, text_value_2, axutil_strlen(text_value_2));
925
925
                           }
926
 
 
 
926
                           
927
927
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
928
 
 
929
 
 
 
928
                           
 
929
                     
930
930
                     AXIS2_FREE(env->allocator,start_input_str);
931
931
                     AXIS2_FREE(env->allocator,end_input_str);
932
 
                 }
933
 
 
934
 
 
 
932
                 } 
 
933
 
 
934
                 
935
935
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
936
936
                       {
937
937
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
938
938
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
939
939
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
940
 
 
 
940
                           
941
941
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
942
942
                                            "http://eucalyptus.ucsb.edu/",
943
943
                                            p_prefix));
944
944
                       }
945
 
 
 
945
                      
946
946
 
947
947
                   if (!_terminateInstancesType->is_valid_statusMessage)
948
948
                   {
949
 
 
 
949
                      
950
950
                           /* no need to complain for minoccurs=0 element */
951
 
 
952
 
 
 
951
                            
 
952
                          
953
953
                   }
954
954
                   else
955
955
                   {
956
956
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
957
 
                                 (4 + axutil_strlen(p_prefix) +
958
 
                                  axutil_strlen("statusMessage")));
959
 
 
 
957
                                 (4 + axutil_strlen(p_prefix) + 
 
958
                                  axutil_strlen("statusMessage"))); 
 
959
                                 
960
960
                                 /* axutil_strlen("<:>") + 1 = 4 */
961
961
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
962
962
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("statusMessage")));
963
963
                                  /* axutil_strlen("</:>") + 1 = 5 */
964
 
 
965
 
 
966
 
 
967
 
 
968
 
 
969
 
 
 
964
                                  
 
965
                     
 
966
 
 
967
                   
 
968
                   
 
969
                     
970
970
                     /*
971
971
                      * parsing statusMessage element
972
972
                      */
973
973
 
974
 
 
975
 
 
 
974
                    
 
975
                    
976
976
                            sprintf(start_input_str, "<%s%sstatusMessage>",
977
977
                                 p_prefix?p_prefix:"",
978
978
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
979
 
 
 
979
                            
980
980
                        start_input_str_len = axutil_strlen(start_input_str);
981
981
                        sprintf(end_input_str, "</%s%sstatusMessage>",
982
982
                                 p_prefix?p_prefix:"",
983
983
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
984
984
                        end_input_str_len = axutil_strlen(end_input_str);
985
 
 
 
985
                    
986
986
                           text_value_3 = _terminateInstancesType->property_statusMessage;
987
 
 
 
987
                           
988
988
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
989
 
 
990
 
 
 
989
                           
 
990
                            
991
991
                           text_value_3_temp = axutil_xml_quote_string(env, text_value_3, AXIS2_TRUE);
992
992
                           if (text_value_3_temp)
993
993
                           {
998
998
                           {
999
999
                               axutil_stream_write(stream, env, text_value_3, axutil_strlen(text_value_3));
1000
1000
                           }
1001
 
 
 
1001
                           
1002
1002
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
1003
 
 
1004
 
 
 
1003
                           
 
1004
                     
1005
1005
                     AXIS2_FREE(env->allocator,start_input_str);
1006
1006
                     AXIS2_FREE(env->allocator,end_input_str);
1007
 
                 }
1008
 
 
1009
 
 
 
1007
                 } 
 
1008
 
 
1009
                 
1010
1010
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
1011
1011
                       {
1012
1012
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
1013
1013
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
1014
1014
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
1015
 
 
 
1015
                           
1016
1016
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
1017
1017
                                            "http://eucalyptus.ucsb.edu/",
1018
1018
                                            p_prefix));
1019
1019
                       }
1020
 
 
 
1020
                      
1021
1021
 
1022
1022
                   if (!_terminateInstancesType->is_valid_return)
1023
1023
                   {
1024
 
 
 
1024
                      
1025
1025
                           /* no need to complain for minoccurs=0 element */
1026
 
 
1027
 
 
 
1026
                            
 
1027
                          
1028
1028
                   }
1029
1029
                   else
1030
1030
                   {
1031
1031
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
1032
 
                                 (4 + axutil_strlen(p_prefix) +
1033
 
                                  axutil_strlen("return")));
1034
 
 
 
1032
                                 (4 + axutil_strlen(p_prefix) + 
 
1033
                                  axutil_strlen("return"))); 
 
1034
                                 
1035
1035
                                 /* axutil_strlen("<:>") + 1 = 4 */
1036
1036
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
1037
1037
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("return")));
1038
1038
                                  /* axutil_strlen("</:>") + 1 = 5 */
1039
 
 
1040
 
 
1041
 
 
1042
 
 
1043
 
 
1044
 
 
 
1039
                                  
 
1040
                     
 
1041
 
 
1042
                   
 
1043
                   
 
1044
                     
1045
1045
                     /*
1046
1046
                      * parsing return element
1047
1047
                      */
1048
1048
 
1049
 
 
1050
 
 
 
1049
                    
 
1050
                    
1051
1051
                            sprintf(start_input_str, "<%s%sreturn>",
1052
1052
                                 p_prefix?p_prefix:"",
1053
1053
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
1054
 
 
 
1054
                            
1055
1055
                        start_input_str_len = axutil_strlen(start_input_str);
1056
1056
                        sprintf(end_input_str, "</%s%sreturn>",
1057
1057
                                 p_prefix?p_prefix:"",
1058
1058
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
1059
1059
                        end_input_str_len = axutil_strlen(end_input_str);
1060
 
 
 
1060
                    
1061
1061
                           strcpy(text_value_4, (_terminateInstancesType->property_return)?"true":"false");
1062
 
 
 
1062
                           
1063
1063
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
1064
 
 
 
1064
                           
1065
1065
                           axutil_stream_write(stream, env, text_value_4, axutil_strlen(text_value_4));
1066
 
 
 
1066
                           
1067
1067
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
1068
 
 
1069
 
 
 
1068
                           
 
1069
                     
1070
1070
                     AXIS2_FREE(env->allocator,start_input_str);
1071
1071
                     AXIS2_FREE(env->allocator,end_input_str);
1072
 
                 }
1073
 
 
1074
 
 
 
1072
                 } 
 
1073
 
 
1074
                 
1075
1075
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
1076
1076
                       {
1077
1077
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
1078
1078
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
1079
1079
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
1080
 
 
 
1080
                           
1081
1081
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
1082
1082
                                            "http://eucalyptus.ucsb.edu/",
1083
1083
                                            p_prefix));
1084
1084
                       }
1085
 
 
 
1085
                      
1086
1086
 
1087
1087
                   if (!_terminateInstancesType->is_valid_instanceIds)
1088
1088
                   {
1089
 
 
 
1089
                      
1090
1090
                           /* no need to complain for minoccurs=0 element */
1091
 
 
1092
 
 
 
1091
                            
 
1092
                          
1093
1093
                   }
1094
1094
                   else
1095
1095
                   {
1096
1096
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
1097
 
                                 (4 + axutil_strlen(p_prefix) +
1098
 
                                  axutil_strlen("instanceIds")));
1099
 
 
 
1097
                                 (4 + axutil_strlen(p_prefix) + 
 
1098
                                  axutil_strlen("instanceIds"))); 
 
1099
                                 
1100
1100
                                 /* axutil_strlen("<:>") + 1 = 4 */
1101
1101
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
1102
1102
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("instanceIds")));
1103
1103
                                  /* axutil_strlen("</:>") + 1 = 5 */
1104
 
 
1105
 
 
1106
 
 
1107
 
 
1108
 
 
 
1104
                                  
 
1105
                     
 
1106
 
 
1107
                   
 
1108
                   
1109
1109
                     /*
1110
1110
                      * Parsing instanceIds array
1111
1111
                      */
1112
1112
                     if (_terminateInstancesType->property_instanceIds != NULL)
1113
1113
                     {
1114
 
 
 
1114
                        
1115
1115
                            sprintf(start_input_str, "<%s%sinstanceIds>",
1116
1116
                                 p_prefix?p_prefix:"",
1117
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
1118
 
 
 
1117
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":""); 
 
1118
                            
1119
1119
                         start_input_str_len = axutil_strlen(start_input_str);
1120
1120
 
1121
1121
                         sprintf(end_input_str, "</%s%sinstanceIds>",
1128
1128
                         {
1129
1129
                            element = axutil_array_list_get(_terminateInstancesType->property_instanceIds, env, i);
1130
1130
 
1131
 
                            if(NULL == element)
 
1131
                            if(NULL == element) 
1132
1132
                            {
1133
1133
                                continue;
1134
1134
                            }
1135
 
 
1136
 
 
 
1135
                    
 
1136
                     
1137
1137
                     /*
1138
1138
                      * parsing instanceIds element
1139
1139
                      */
1140
1140
 
1141
 
 
1142
 
 
 
1141
                    
 
1142
                    
1143
1143
                           text_value_5 = (axis2_char_t*)element;
1144
 
 
 
1144
                           
1145
1145
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
1146
 
 
1147
 
 
 
1146
                           
 
1147
                            
1148
1148
                           text_value_5_temp = axutil_xml_quote_string(env, text_value_5, AXIS2_TRUE);
1149
1149
                           if (text_value_5_temp)
1150
1150
                           {
1155
1155
                           {
1156
1156
                               axutil_stream_write(stream, env, text_value_5, axutil_strlen(text_value_5));
1157
1157
                           }
1158
 
 
 
1158
                           
1159
1159
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
1160
 
 
 
1160
                           
1161
1161
                         }
1162
1162
                     }
1163
 
 
1164
 
 
 
1163
                   
 
1164
                     
1165
1165
                     AXIS2_FREE(env->allocator,start_input_str);
1166
1166
                     AXIS2_FREE(env->allocator,end_input_str);
1167
 
                 }
1168
 
 
1169
 
 
 
1167
                 } 
 
1168
 
 
1169
                 
1170
1170
 
1171
1171
            return parent;
1172
1172
        }
1173
1173
 
1174
1174
 
1175
 
 
 
1175
        
1176
1176
 
1177
1177
            /**
1178
1178
             * getter for correlationId.
1182
1182
                    adb_terminateInstancesType_t* _terminateInstancesType,
1183
1183
                    const axutil_env_t *env)
1184
1184
             {
1185
 
 
 
1185
                
1186
1186
                    AXIS2_ENV_CHECK(env, NULL);
1187
1187
                    AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, NULL);
1188
 
 
 
1188
                  
1189
1189
 
1190
1190
                return _terminateInstancesType->property_correlationId;
1191
1191
             }
1199
1199
                    const axutil_env_t *env,
1200
1200
                    const axis2_char_t*  arg_correlationId)
1201
1201
             {
1202
 
 
 
1202
                
1203
1203
 
1204
1204
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1205
1205
                AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_FAILURE);
1206
 
 
 
1206
                
1207
1207
                if(_terminateInstancesType->is_valid_correlationId &&
1208
1208
                        arg_correlationId == _terminateInstancesType->property_correlationId)
1209
1209
                {
1210
 
 
1211
 
                    return AXIS2_SUCCESS;
 
1210
                    
 
1211
                    return AXIS2_SUCCESS; 
1212
1212
                }
1213
1213
 
1214
1214
                adb_terminateInstancesType_reset_correlationId(_terminateInstancesType, env);
1215
1215
 
1216
 
 
 
1216
                
1217
1217
                if(NULL == arg_correlationId)
1218
1218
                {
1219
1219
                    /* We are already done */
1226
1226
                            return AXIS2_FAILURE;
1227
1227
                        }
1228
1228
                        _terminateInstancesType->is_valid_correlationId = AXIS2_TRUE;
1229
 
 
 
1229
                    
1230
1230
                return AXIS2_SUCCESS;
1231
1231
             }
1232
1232
 
1233
 
 
 
1233
             
1234
1234
 
1235
1235
           /**
1236
1236
            * resetter for correlationId
1246
1246
 
1247
1247
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1248
1248
               AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_FAILURE);
1249
 
 
1250
 
 
1251
 
 
1252
 
 
1253
 
 
 
1249
               
 
1250
 
 
1251
               
 
1252
            
 
1253
                
1254
1254
                if(_terminateInstancesType->property_correlationId != NULL)
1255
1255
                {
1256
 
 
1257
 
 
 
1256
                   
 
1257
                   
1258
1258
                        AXIS2_FREE(env-> allocator, _terminateInstancesType->property_correlationId);
1259
1259
                     _terminateInstancesType->property_correlationId = NULL;
1260
1260
                }
1261
 
 
1262
 
 
1263
 
 
1264
 
                _terminateInstancesType->is_valid_correlationId = AXIS2_FALSE;
 
1261
            
 
1262
                
 
1263
                
 
1264
                _terminateInstancesType->is_valid_correlationId = AXIS2_FALSE; 
1265
1265
               return AXIS2_SUCCESS;
1266
1266
           }
1267
1267
 
1275
1275
           {
1276
1276
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1277
1277
               AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_TRUE);
1278
 
 
 
1278
               
1279
1279
               return !_terminateInstancesType->is_valid_correlationId;
1280
1280
           }
1281
1281
 
1290
1290
               return adb_terminateInstancesType_reset_correlationId(_terminateInstancesType, env);
1291
1291
           }
1292
1292
 
1293
 
 
 
1293
           
1294
1294
 
1295
1295
            /**
1296
1296
             * getter for userId.
1300
1300
                    adb_terminateInstancesType_t* _terminateInstancesType,
1301
1301
                    const axutil_env_t *env)
1302
1302
             {
1303
 
 
 
1303
                
1304
1304
                    AXIS2_ENV_CHECK(env, NULL);
1305
1305
                    AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, NULL);
1306
 
 
 
1306
                  
1307
1307
 
1308
1308
                return _terminateInstancesType->property_userId;
1309
1309
             }
1317
1317
                    const axutil_env_t *env,
1318
1318
                    const axis2_char_t*  arg_userId)
1319
1319
             {
1320
 
 
 
1320
                
1321
1321
 
1322
1322
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1323
1323
                AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_FAILURE);
1324
 
 
 
1324
                
1325
1325
                if(_terminateInstancesType->is_valid_userId &&
1326
1326
                        arg_userId == _terminateInstancesType->property_userId)
1327
1327
                {
1328
 
 
1329
 
                    return AXIS2_SUCCESS;
 
1328
                    
 
1329
                    return AXIS2_SUCCESS; 
1330
1330
                }
1331
1331
 
1332
1332
                adb_terminateInstancesType_reset_userId(_terminateInstancesType, env);
1333
1333
 
1334
 
 
 
1334
                
1335
1335
                if(NULL == arg_userId)
1336
1336
                {
1337
1337
                    /* We are already done */
1344
1344
                            return AXIS2_FAILURE;
1345
1345
                        }
1346
1346
                        _terminateInstancesType->is_valid_userId = AXIS2_TRUE;
1347
 
 
 
1347
                    
1348
1348
                return AXIS2_SUCCESS;
1349
1349
             }
1350
1350
 
1351
 
 
 
1351
             
1352
1352
 
1353
1353
           /**
1354
1354
            * resetter for userId
1364
1364
 
1365
1365
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1366
1366
               AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_FAILURE);
1367
 
 
1368
 
 
1369
 
 
1370
 
 
1371
 
 
 
1367
               
 
1368
 
 
1369
               
 
1370
            
 
1371
                
1372
1372
                if(_terminateInstancesType->property_userId != NULL)
1373
1373
                {
1374
 
 
1375
 
 
 
1374
                   
 
1375
                   
1376
1376
                        AXIS2_FREE(env-> allocator, _terminateInstancesType->property_userId);
1377
1377
                     _terminateInstancesType->property_userId = NULL;
1378
1378
                }
1379
 
 
1380
 
 
1381
 
 
1382
 
                _terminateInstancesType->is_valid_userId = AXIS2_FALSE;
 
1379
            
 
1380
                
 
1381
                
 
1382
                _terminateInstancesType->is_valid_userId = AXIS2_FALSE; 
1383
1383
               return AXIS2_SUCCESS;
1384
1384
           }
1385
1385
 
1393
1393
           {
1394
1394
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1395
1395
               AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_TRUE);
1396
 
 
 
1396
               
1397
1397
               return !_terminateInstancesType->is_valid_userId;
1398
1398
           }
1399
1399
 
1408
1408
               return adb_terminateInstancesType_reset_userId(_terminateInstancesType, env);
1409
1409
           }
1410
1410
 
1411
 
 
 
1411
           
1412
1412
 
1413
1413
            /**
1414
1414
             * getter for statusMessage.
1418
1418
                    adb_terminateInstancesType_t* _terminateInstancesType,
1419
1419
                    const axutil_env_t *env)
1420
1420
             {
1421
 
 
 
1421
                
1422
1422
                    AXIS2_ENV_CHECK(env, NULL);
1423
1423
                    AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, NULL);
1424
 
 
 
1424
                  
1425
1425
 
1426
1426
                return _terminateInstancesType->property_statusMessage;
1427
1427
             }
1435
1435
                    const axutil_env_t *env,
1436
1436
                    const axis2_char_t*  arg_statusMessage)
1437
1437
             {
1438
 
 
 
1438
                
1439
1439
 
1440
1440
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1441
1441
                AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_FAILURE);
1442
 
 
 
1442
                
1443
1443
                if(_terminateInstancesType->is_valid_statusMessage &&
1444
1444
                        arg_statusMessage == _terminateInstancesType->property_statusMessage)
1445
1445
                {
1446
 
 
1447
 
                    return AXIS2_SUCCESS;
 
1446
                    
 
1447
                    return AXIS2_SUCCESS; 
1448
1448
                }
1449
1449
 
1450
1450
                adb_terminateInstancesType_reset_statusMessage(_terminateInstancesType, env);
1451
1451
 
1452
 
 
 
1452
                
1453
1453
                if(NULL == arg_statusMessage)
1454
1454
                {
1455
1455
                    /* We are already done */
1462
1462
                            return AXIS2_FAILURE;
1463
1463
                        }
1464
1464
                        _terminateInstancesType->is_valid_statusMessage = AXIS2_TRUE;
1465
 
 
 
1465
                    
1466
1466
                return AXIS2_SUCCESS;
1467
1467
             }
1468
1468
 
1469
 
 
 
1469
             
1470
1470
 
1471
1471
           /**
1472
1472
            * resetter for statusMessage
1482
1482
 
1483
1483
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1484
1484
               AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_FAILURE);
1485
 
 
1486
 
 
1487
 
 
1488
 
 
1489
 
 
 
1485
               
 
1486
 
 
1487
               
 
1488
            
 
1489
                
1490
1490
                if(_terminateInstancesType->property_statusMessage != NULL)
1491
1491
                {
1492
 
 
1493
 
 
 
1492
                   
 
1493
                   
1494
1494
                        AXIS2_FREE(env-> allocator, _terminateInstancesType->property_statusMessage);
1495
1495
                     _terminateInstancesType->property_statusMessage = NULL;
1496
1496
                }
1497
 
 
1498
 
 
1499
 
 
1500
 
                _terminateInstancesType->is_valid_statusMessage = AXIS2_FALSE;
 
1497
            
 
1498
                
 
1499
                
 
1500
                _terminateInstancesType->is_valid_statusMessage = AXIS2_FALSE; 
1501
1501
               return AXIS2_SUCCESS;
1502
1502
           }
1503
1503
 
1511
1511
           {
1512
1512
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1513
1513
               AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_TRUE);
1514
 
 
 
1514
               
1515
1515
               return !_terminateInstancesType->is_valid_statusMessage;
1516
1516
           }
1517
1517
 
1526
1526
               return adb_terminateInstancesType_reset_statusMessage(_terminateInstancesType, env);
1527
1527
           }
1528
1528
 
1529
 
 
 
1529
           
1530
1530
 
1531
1531
            /**
1532
1532
             * getter for return.
1536
1536
                    adb_terminateInstancesType_t* _terminateInstancesType,
1537
1537
                    const axutil_env_t *env)
1538
1538
             {
1539
 
 
 
1539
                
1540
1540
                    AXIS2_ENV_CHECK(env, (axis2_bool_t)0);
1541
1541
                    AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, (axis2_bool_t)0);
1542
 
 
 
1542
                  
1543
1543
 
1544
1544
                return _terminateInstancesType->property_return;
1545
1545
             }
1553
1553
                    const axutil_env_t *env,
1554
1554
                    axis2_bool_t  arg_return)
1555
1555
             {
1556
 
 
 
1556
                
1557
1557
 
1558
1558
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1559
1559
                AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_FAILURE);
1560
 
 
 
1560
                
1561
1561
                if(_terminateInstancesType->is_valid_return &&
1562
1562
                        arg_return == _terminateInstancesType->property_return)
1563
1563
                {
1564
 
 
1565
 
                    return AXIS2_SUCCESS;
 
1564
                    
 
1565
                    return AXIS2_SUCCESS; 
1566
1566
                }
1567
1567
 
1568
1568
                adb_terminateInstancesType_reset_return(_terminateInstancesType, env);
1569
1569
 
1570
1570
                _terminateInstancesType->property_return = arg_return;
1571
1571
                        _terminateInstancesType->is_valid_return = AXIS2_TRUE;
1572
 
 
 
1572
                    
1573
1573
                return AXIS2_SUCCESS;
1574
1574
             }
1575
1575
 
1576
 
 
 
1576
             
1577
1577
 
1578
1578
           /**
1579
1579
            * resetter for return
1589
1589
 
1590
1590
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1591
1591
               AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_FAILURE);
1592
 
 
1593
 
 
1594
 
               _terminateInstancesType->is_valid_return = AXIS2_FALSE;
 
1592
               
 
1593
 
 
1594
               _terminateInstancesType->is_valid_return = AXIS2_FALSE; 
1595
1595
               return AXIS2_SUCCESS;
1596
1596
           }
1597
1597
 
1605
1605
           {
1606
1606
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1607
1607
               AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_TRUE);
1608
 
 
 
1608
               
1609
1609
               return !_terminateInstancesType->is_valid_return;
1610
1610
           }
1611
1611
 
1620
1620
               return adb_terminateInstancesType_reset_return(_terminateInstancesType, env);
1621
1621
           }
1622
1622
 
1623
 
 
 
1623
           
1624
1624
 
1625
1625
            /**
1626
1626
             * getter for instanceIds.
1630
1630
                    adb_terminateInstancesType_t* _terminateInstancesType,
1631
1631
                    const axutil_env_t *env)
1632
1632
             {
1633
 
 
 
1633
                
1634
1634
                    AXIS2_ENV_CHECK(env, NULL);
1635
1635
                    AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, NULL);
1636
 
 
 
1636
                  
1637
1637
 
1638
1638
                return _terminateInstancesType->property_instanceIds;
1639
1639
             }
1647
1647
                    const axutil_env_t *env,
1648
1648
                    axutil_array_list_t*  arg_instanceIds)
1649
1649
             {
1650
 
 
 
1650
                
1651
1651
                 int size = 0;
1652
1652
                 int i = 0;
1653
1653
                 axis2_bool_t non_nil_exists = AXIS2_FALSE;
1654
 
 
 
1654
                
1655
1655
 
1656
1656
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1657
1657
                AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_FAILURE);
1658
 
 
 
1658
                
1659
1659
                if(_terminateInstancesType->is_valid_instanceIds &&
1660
1660
                        arg_instanceIds == _terminateInstancesType->property_instanceIds)
1661
1661
                {
1662
 
 
1663
 
                    return AXIS2_SUCCESS;
 
1662
                    
 
1663
                    return AXIS2_SUCCESS; 
1664
1664
                }
1665
1665
 
1666
 
 
 
1666
                
1667
1667
                 size = axutil_array_list_size(arg_instanceIds, env);
1668
 
 
 
1668
                 
1669
1669
                 if (size < 0)
1670
1670
                 {
1671
1671
                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "instanceIds has less than minOccurs(0)");
1682
1682
 
1683
1683
                 adb_terminateInstancesType_reset_instanceIds(_terminateInstancesType, env);
1684
1684
 
1685
 
 
 
1685
                
1686
1686
                if(NULL == arg_instanceIds)
1687
1687
                {
1688
1688
                    /* We are already done */
1693
1693
                        {
1694
1694
                            _terminateInstancesType->is_valid_instanceIds = AXIS2_TRUE;
1695
1695
                        }
1696
 
 
1697
 
 
 
1696
                        
 
1697
                    
1698
1698
                return AXIS2_SUCCESS;
1699
1699
             }
1700
1700
 
1701
 
 
 
1701
            
1702
1702
            /**
1703
1703
             * Get ith element of instanceIds.
1704
1704
             */
1709
1709
            {
1710
1710
                axis2_char_t* ret_val;
1711
1711
 
1712
 
 
 
1712
                
1713
1713
                    AXIS2_ENV_CHECK(env, NULL);
1714
1714
                    AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, NULL);
1715
 
 
 
1715
                  
1716
1716
 
1717
1717
                if(_terminateInstancesType->property_instanceIds == NULL)
1718
1718
                {
1719
1719
                    return (axis2_char_t*)0;
1720
1720
                }
1721
1721
                ret_val = (axis2_char_t*)axutil_array_list_get(_terminateInstancesType->property_instanceIds, env, i);
1722
 
 
 
1722
                
1723
1723
                    return ret_val;
1724
 
 
 
1724
                  
1725
1725
            }
1726
1726
 
1727
1727
            /**
1739
1739
                int k;
1740
1740
                axis2_bool_t non_nil_exists = AXIS2_FALSE;
1741
1741
 
1742
 
 
 
1742
                
1743
1743
 
1744
1744
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1745
1745
                AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_FAILURE);
1746
 
 
 
1746
                
1747
1747
                if( _terminateInstancesType->is_valid_instanceIds &&
1748
1748
                    _terminateInstancesType->property_instanceIds &&
1749
 
 
 
1749
                
1750
1750
                    arg_instanceIds == (axis2_char_t*)axutil_array_list_get(_terminateInstancesType->property_instanceIds, env, i))
1751
 
 
 
1751
                  
1752
1752
                {
1753
 
 
1754
 
                    return AXIS2_SUCCESS;
 
1753
                    
 
1754
                    return AXIS2_SUCCESS; 
1755
1755
                }
1756
1756
 
1757
 
 
 
1757
                
1758
1758
                    if(NULL == arg_instanceIds)
1759
1759
                    {
1760
1760
                        if(_terminateInstancesType->property_instanceIds != NULL)
1762
1762
                            size = axutil_array_list_size(_terminateInstancesType->property_instanceIds, env);
1763
1763
                            for(j = 0, k = 0; j < size; j ++ )
1764
1764
                            {
1765
 
                                if(i == j) continue;
 
1765
                                if(i == j) continue; 
1766
1766
                                if(NULL != axutil_array_list_get(_terminateInstancesType->property_instanceIds, env, i))
1767
1767
                                {
1768
1768
                                    k ++;
1779
1779
                    {
1780
1780
                        non_nil_exists = AXIS2_TRUE;
1781
1781
                    }
1782
 
 
 
1782
                  
1783
1783
                if( k < 0)
1784
1784
                {
1785
1785
                       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)");
1790
1790
                {
1791
1791
                    _terminateInstancesType->property_instanceIds = axutil_array_list_create(env, 10);
1792
1792
                }
1793
 
 
 
1793
                
1794
1794
                /* check whether there already exist an element */
1795
1795
                element = axutil_array_list_get(_terminateInstancesType->property_instanceIds, env, i);
1796
1796
                if(NULL != element)
1797
1797
                {
1798
 
 
1799
 
 
1800
 
 
 
1798
                  
 
1799
                  
 
1800
                  
1801
1801
                       /* This is an unknown type or a primitive. Please free this manually*/
1802
 
 
 
1802
                     
1803
1803
                }
1804
1804
 
1805
 
 
 
1805
                
1806
1806
                    if(!non_nil_exists)
1807
1807
                    {
1808
 
 
 
1808
                        
1809
1809
                        _terminateInstancesType->is_valid_instanceIds = AXIS2_FALSE;
1810
1810
                        axutil_array_list_set(_terminateInstancesType->property_instanceIds , env, i, NULL);
1811
 
 
 
1811
                        
1812
1812
                        return AXIS2_SUCCESS;
1813
1813
                    }
1814
 
 
 
1814
                
1815
1815
                   axutil_array_list_set(_terminateInstancesType->property_instanceIds , env, i, axutil_strdup(env, arg_instanceIds));
1816
1816
                  _terminateInstancesType->is_valid_instanceIds = AXIS2_TRUE;
1817
 
 
 
1817
                
1818
1818
                return AXIS2_SUCCESS;
1819
1819
            }
1820
1820
 
1827
1827
                    const axutil_env_t *env,
1828
1828
                    const axis2_char_t* arg_instanceIds)
1829
1829
             {
1830
 
 
 
1830
                
1831
1831
 
1832
1832
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1833
1833
                AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_FAILURE);
1834
1834
 
1835
 
 
 
1835
                
1836
1836
                    if(NULL == arg_instanceIds)
1837
1837
                    {
1838
 
 
1839
 
                           return AXIS2_SUCCESS;
1840
 
 
 
1838
                      
 
1839
                           return AXIS2_SUCCESS; 
 
1840
                        
1841
1841
                    }
1842
 
 
 
1842
                  
1843
1843
 
1844
1844
                if(_terminateInstancesType->property_instanceIds == NULL)
1845
1845
                {
1849
1849
                {
1850
1850
                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in allocatting memory for instanceIds");
1851
1851
                    return AXIS2_FAILURE;
1852
 
 
 
1852
                    
1853
1853
                }
1854
 
 
 
1854
                
1855
1855
                   axutil_array_list_add(_terminateInstancesType->property_instanceIds , env, axutil_strdup(env, arg_instanceIds));
1856
1856
                  _terminateInstancesType->is_valid_instanceIds = AXIS2_TRUE;
1857
1857
                return AXIS2_SUCCESS;
1885
1885
                return adb_terminateInstancesType_set_instanceIds_nil_at(_terminateInstancesType, env, i);
1886
1886
            }
1887
1887
 
1888
 
 
 
1888
            
1889
1889
 
1890
1890
           /**
1891
1891
            * resetter for instanceIds
1901
1901
 
1902
1902
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
1903
1903
               AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_FAILURE);
1904
 
 
1905
 
 
1906
 
 
 
1904
               
 
1905
 
 
1906
               
1907
1907
                  if (_terminateInstancesType->property_instanceIds != NULL)
1908
1908
                  {
1909
1909
                      count = axutil_array_list_size(_terminateInstancesType->property_instanceIds, env);
1910
1910
                      for(i = 0; i < count; i ++)
1911
1911
                      {
1912
1912
                         element = axutil_array_list_get(_terminateInstancesType->property_instanceIds, env, i);
1913
 
 
1914
 
 
1915
 
 
 
1913
                
 
1914
            
 
1915
                
1916
1916
                if(element != NULL)
1917
1917
                {
1918
 
 
1919
 
 
 
1918
                   
 
1919
                   
1920
1920
                        AXIS2_FREE(env-> allocator, (axis2_char_t*)element);
1921
1921
                     element = NULL;
1922
1922
                }
1923
 
 
1924
 
 
1925
 
 
1926
 
 
 
1923
            
 
1924
                
 
1925
                
 
1926
                
1927
1927
                      }
1928
1928
                      axutil_array_list_free(_terminateInstancesType->property_instanceIds, env);
1929
1929
                  }
1930
 
                _terminateInstancesType->is_valid_instanceIds = AXIS2_FALSE;
 
1930
                _terminateInstancesType->is_valid_instanceIds = AXIS2_FALSE; 
1931
1931
               return AXIS2_SUCCESS;
1932
1932
           }
1933
1933
 
1941
1941
           {
1942
1942
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1943
1943
               AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_TRUE);
1944
 
 
 
1944
               
1945
1945
               return !_terminateInstancesType->is_valid_instanceIds;
1946
1946
           }
1947
1947
 
1956
1956
               return adb_terminateInstancesType_reset_instanceIds(_terminateInstancesType, env);
1957
1957
           }
1958
1958
 
1959
 
 
 
1959
           
1960
1960
           /**
1961
1961
            * Check whether instanceIds is nill at i
1962
1962
            */
1967
1967
           {
1968
1968
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
1969
1969
               AXIS2_PARAM_CHECK(env->error, _terminateInstancesType, AXIS2_TRUE);
1970
 
 
 
1970
               
1971
1971
               return (_terminateInstancesType->is_valid_instanceIds == AXIS2_FALSE ||
1972
 
                        NULL == _terminateInstancesType->property_instanceIds ||
 
1972
                        NULL == _terminateInstancesType->property_instanceIds || 
1973
1973
                        NULL == axutil_array_list_get(_terminateInstancesType->property_instanceIds, env, i));
1974
1974
           }
1975
1975
 
1994
1994
                if(_terminateInstancesType->property_instanceIds == NULL ||
1995
1995
                            _terminateInstancesType->is_valid_instanceIds == AXIS2_FALSE)
1996
1996
                {
1997
 
 
 
1997
                    
1998
1998
                    non_nil_exists = AXIS2_FALSE;
1999
1999
                }
2000
2000
                else
2002
2002
                    size = axutil_array_list_size(_terminateInstancesType->property_instanceIds, env);
2003
2003
                    for(j = 0, k = 0; j < size; j ++ )
2004
2004
                    {
2005
 
                        if(i == j) continue;
 
2005
                        if(i == j) continue; 
2006
2006
                        if(NULL != axutil_array_list_get(_terminateInstancesType->property_instanceIds, env, i))
2007
2007
                        {
2008
2008
                            k ++;
2014
2014
                        }
2015
2015
                    }
2016
2016
                }
2017
 
 
 
2017
                
2018
2018
 
2019
2019
                if( k < 0)
2020
2020
                {
2021
2021
                       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)");
2022
2022
                       return AXIS2_FAILURE;
2023
2023
                }
2024
 
 
 
2024
 
2025
2025
                if(_terminateInstancesType->property_instanceIds == NULL)
2026
2026
                {
2027
2027
                    _terminateInstancesType->is_valid_instanceIds = AXIS2_FALSE;
2028
 
 
 
2028
                    
2029
2029
                    return AXIS2_SUCCESS;
2030
2030
                }
2031
2031
 
2033
2033
                element = axutil_array_list_get(_terminateInstancesType->property_instanceIds, env, i);
2034
2034
                if(NULL != element)
2035
2035
                {
2036
 
 
2037
 
 
2038
 
 
 
2036
                  
 
2037
                  
 
2038
                  
2039
2039
                       /* This is an unknown type or a primitive. Please free this manually*/
2040
 
 
 
2040
                     
2041
2041
                }
2042
2042
 
2043
 
 
 
2043
                
2044
2044
                    if(!non_nil_exists)
2045
2045
                    {
2046
 
 
 
2046
                        
2047
2047
                        _terminateInstancesType->is_valid_instanceIds = AXIS2_FALSE;
2048
2048
                        axutil_array_list_set(_terminateInstancesType->property_instanceIds , env, i, NULL);
2049
2049
                        return AXIS2_SUCCESS;
2050
2050
                    }
2051
 
 
2052
 
 
2053
 
 
 
2051
                
 
2052
 
 
2053
                
2054
2054
                axutil_array_list_set(_terminateInstancesType->property_instanceIds , env, i, NULL);
2055
 
 
 
2055
                
2056
2056
                return AXIS2_SUCCESS;
2057
2057
 
2058
2058
           }
2059
2059
 
2060
 
 
 
2060
           
2061
2061