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

« back to all changes in this revision

Viewing changes to cluster/generated/adb_instanceType.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_instanceType.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_instanceType.h"
11
 
 
12
 
                /*
13
 
                 * This type was generated from the piece of schema that had
14
 
                 * name = instanceType
15
 
                 * Namespace URI = http://eucalyptus.ucsb.edu/
16
 
                 * Namespace Prefix = ns1
17
 
                 */
18
 
 
19
 
 
20
 
 
21
 
        struct adb_instanceType
22
 
        {
23
 
            axis2_char_t* property_reservationId;
24
 
 
25
 
 
26
 
                axis2_bool_t is_valid_reservationId;
27
 
 
28
 
 
29
 
            axis2_char_t* property_instanceId;
30
 
 
31
 
 
32
 
                axis2_bool_t is_valid_instanceId;
33
 
 
34
 
 
35
 
            axis2_char_t* property_imageId;
36
 
 
37
 
 
38
 
                axis2_bool_t is_valid_imageId;
39
 
 
40
 
 
41
 
            axis2_char_t* property_kernelId;
42
 
 
43
 
 
44
 
                axis2_bool_t is_valid_kernelId;
45
 
 
46
 
 
47
 
            axis2_char_t* property_ramdiskId;
48
 
 
49
 
 
50
 
                axis2_bool_t is_valid_ramdiskId;
51
 
 
52
 
 
53
 
            axis2_char_t* property_userId;
54
 
 
55
 
 
56
 
                axis2_bool_t is_valid_userId;
57
 
 
58
 
 
59
 
            axis2_char_t* property_keyName;
60
 
 
61
 
 
62
 
                axis2_bool_t is_valid_keyName;
63
 
 
64
 
 
65
 
            adb_virtualMachineType_t* property_instanceType;
66
 
 
67
 
 
68
 
                axis2_bool_t is_valid_instanceType;
69
 
 
70
 
 
71
 
            adb_netConfigType_t* property_netParams;
72
 
 
73
 
 
74
 
                axis2_bool_t is_valid_netParams;
75
 
 
76
 
 
77
 
            axis2_char_t* property_stateName;
78
 
 
79
 
 
80
 
                axis2_bool_t is_valid_stateName;
81
 
 
82
 
 
83
 
            axutil_date_time_t* property_launchTime;
84
 
 
85
 
 
86
 
                axis2_bool_t is_valid_launchTime;
87
 
 
88
 
 
89
 
            axis2_char_t* property_userData;
90
 
 
91
 
 
92
 
                axis2_bool_t is_valid_userData;
93
 
 
94
 
 
95
 
            axis2_char_t* property_launchIndex;
96
 
 
97
 
 
98
 
                axis2_bool_t is_valid_launchIndex;
99
 
 
100
 
 
101
 
            axutil_array_list_t* property_groupNames;
102
 
 
103
 
 
104
 
                axis2_bool_t is_valid_groupNames;
105
 
 
106
 
 
107
 
            axutil_array_list_t* property_volumes;
108
 
 
109
 
 
110
 
                axis2_bool_t is_valid_volumes;
111
 
 
112
 
 
113
 
            axis2_char_t* property_serviceTag;
114
 
 
115
 
 
116
 
                axis2_bool_t is_valid_serviceTag;
117
 
 
118
 
 
119
 
 
120
 
        };
121
 
 
122
 
 
123
 
       /************************* Private Function prototypes ********************************/
124
 
 
125
 
 
126
 
                axis2_status_t AXIS2_CALL
127
 
                adb_instanceType_set_reservationId_nil(
128
 
                        adb_instanceType_t* _instanceType,
129
 
                        const axutil_env_t *env);
130
 
 
131
 
 
132
 
                axis2_status_t AXIS2_CALL
133
 
                adb_instanceType_set_instanceId_nil(
134
 
                        adb_instanceType_t* _instanceType,
135
 
                        const axutil_env_t *env);
136
 
 
137
 
 
138
 
                axis2_status_t AXIS2_CALL
139
 
                adb_instanceType_set_imageId_nil(
140
 
                        adb_instanceType_t* _instanceType,
141
 
                        const axutil_env_t *env);
142
 
 
143
 
 
144
 
                axis2_status_t AXIS2_CALL
145
 
                adb_instanceType_set_kernelId_nil(
146
 
                        adb_instanceType_t* _instanceType,
147
 
                        const axutil_env_t *env);
148
 
 
149
 
 
150
 
                axis2_status_t AXIS2_CALL
151
 
                adb_instanceType_set_ramdiskId_nil(
152
 
                        adb_instanceType_t* _instanceType,
153
 
                        const axutil_env_t *env);
154
 
 
155
 
 
156
 
                axis2_status_t AXIS2_CALL
157
 
                adb_instanceType_set_userId_nil(
158
 
                        adb_instanceType_t* _instanceType,
159
 
                        const axutil_env_t *env);
160
 
 
161
 
 
162
 
                axis2_status_t AXIS2_CALL
163
 
                adb_instanceType_set_keyName_nil(
164
 
                        adb_instanceType_t* _instanceType,
165
 
                        const axutil_env_t *env);
166
 
 
167
 
 
168
 
                axis2_status_t AXIS2_CALL
169
 
                adb_instanceType_set_instanceType_nil(
170
 
                        adb_instanceType_t* _instanceType,
171
 
                        const axutil_env_t *env);
172
 
 
173
 
 
174
 
                axis2_status_t AXIS2_CALL
175
 
                adb_instanceType_set_netParams_nil(
176
 
                        adb_instanceType_t* _instanceType,
177
 
                        const axutil_env_t *env);
178
 
 
179
 
 
180
 
                axis2_status_t AXIS2_CALL
181
 
                adb_instanceType_set_stateName_nil(
182
 
                        adb_instanceType_t* _instanceType,
183
 
                        const axutil_env_t *env);
184
 
 
185
 
 
186
 
                axis2_status_t AXIS2_CALL
187
 
                adb_instanceType_set_launchTime_nil(
188
 
                        adb_instanceType_t* _instanceType,
189
 
                        const axutil_env_t *env);
190
 
 
191
 
 
192
 
                axis2_status_t AXIS2_CALL
193
 
                adb_instanceType_set_userData_nil(
194
 
                        adb_instanceType_t* _instanceType,
195
 
                        const axutil_env_t *env);
196
 
 
197
 
 
198
 
                axis2_status_t AXIS2_CALL
199
 
                adb_instanceType_set_launchIndex_nil(
200
 
                        adb_instanceType_t* _instanceType,
201
 
                        const axutil_env_t *env);
202
 
 
203
 
                 axis2_status_t AXIS2_CALL
204
 
                 adb_instanceType_set_groupNames_nil_at(
205
 
                        adb_instanceType_t* _instanceType,
206
 
                        const axutil_env_t *env, int i);
207
 
 
208
 
 
209
 
                axis2_status_t AXIS2_CALL
210
 
                adb_instanceType_set_groupNames_nil(
211
 
                        adb_instanceType_t* _instanceType,
212
 
                        const axutil_env_t *env);
213
 
 
214
 
                 axis2_status_t AXIS2_CALL
215
 
                 adb_instanceType_set_volumes_nil_at(
216
 
                        adb_instanceType_t* _instanceType,
217
 
                        const axutil_env_t *env, int i);
218
 
 
219
 
 
220
 
                axis2_status_t AXIS2_CALL
221
 
                adb_instanceType_set_volumes_nil(
222
 
                        adb_instanceType_t* _instanceType,
223
 
                        const axutil_env_t *env);
224
 
 
225
 
 
226
 
                axis2_status_t AXIS2_CALL
227
 
                adb_instanceType_set_serviceTag_nil(
228
 
                        adb_instanceType_t* _instanceType,
229
 
                        const axutil_env_t *env);
230
 
 
231
 
 
232
 
 
233
 
       /************************* Function Implmentations ********************************/
234
 
        adb_instanceType_t* AXIS2_CALL
235
 
        adb_instanceType_create(
236
 
            const axutil_env_t *env)
237
 
        {
238
 
            adb_instanceType_t *_instanceType = NULL;
239
 
 
240
 
            AXIS2_ENV_CHECK(env, NULL);
241
 
 
242
 
            _instanceType = (adb_instanceType_t *) AXIS2_MALLOC(env->
243
 
                allocator, sizeof(adb_instanceType_t));
244
 
 
245
 
            if(NULL == _instanceType)
246
 
            {
247
 
                AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
248
 
                return NULL;
249
 
            }
250
 
 
251
 
            memset(_instanceType, 0, sizeof(adb_instanceType_t));
252
 
 
253
 
            _instanceType->property_reservationId  = NULL;
254
 
                  _instanceType->is_valid_reservationId  = AXIS2_FALSE;
255
 
            _instanceType->property_instanceId  = NULL;
256
 
                  _instanceType->is_valid_instanceId  = AXIS2_FALSE;
257
 
            _instanceType->property_imageId  = NULL;
258
 
                  _instanceType->is_valid_imageId  = AXIS2_FALSE;
259
 
            _instanceType->property_kernelId  = NULL;
260
 
                  _instanceType->is_valid_kernelId  = AXIS2_FALSE;
261
 
            _instanceType->property_ramdiskId  = NULL;
262
 
                  _instanceType->is_valid_ramdiskId  = AXIS2_FALSE;
263
 
            _instanceType->property_userId  = NULL;
264
 
                  _instanceType->is_valid_userId  = AXIS2_FALSE;
265
 
            _instanceType->property_keyName  = NULL;
266
 
                  _instanceType->is_valid_keyName  = AXIS2_FALSE;
267
 
            _instanceType->property_instanceType  = NULL;
268
 
                  _instanceType->is_valid_instanceType  = AXIS2_FALSE;
269
 
            _instanceType->property_netParams  = NULL;
270
 
                  _instanceType->is_valid_netParams  = AXIS2_FALSE;
271
 
            _instanceType->property_stateName  = NULL;
272
 
                  _instanceType->is_valid_stateName  = AXIS2_FALSE;
273
 
            _instanceType->property_launchTime  = NULL;
274
 
                  _instanceType->is_valid_launchTime  = AXIS2_FALSE;
275
 
            _instanceType->property_userData  = NULL;
276
 
                  _instanceType->is_valid_userData  = AXIS2_FALSE;
277
 
            _instanceType->property_launchIndex  = NULL;
278
 
                  _instanceType->is_valid_launchIndex  = AXIS2_FALSE;
279
 
            _instanceType->property_groupNames  = NULL;
280
 
                  _instanceType->is_valid_groupNames  = AXIS2_FALSE;
281
 
            _instanceType->property_volumes  = NULL;
282
 
                  _instanceType->is_valid_volumes  = AXIS2_FALSE;
283
 
            _instanceType->property_serviceTag  = NULL;
284
 
                  _instanceType->is_valid_serviceTag  = AXIS2_FALSE;
285
 
 
286
 
 
287
 
            return _instanceType;
288
 
        }
289
 
 
290
 
        axis2_status_t AXIS2_CALL
291
 
        adb_instanceType_free (
292
 
                adb_instanceType_t* _instanceType,
293
 
                const axutil_env_t *env)
294
 
        {
295
 
 
296
 
                int i = 0;
297
 
                int count = 0;
298
 
                void *element = NULL;
299
 
 
300
 
 
301
 
            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
302
 
            AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
303
 
 
304
 
            adb_instanceType_reset_reservationId(_instanceType, env);
305
 
            adb_instanceType_reset_instanceId(_instanceType, env);
306
 
            adb_instanceType_reset_imageId(_instanceType, env);
307
 
            adb_instanceType_reset_kernelId(_instanceType, env);
308
 
            adb_instanceType_reset_ramdiskId(_instanceType, env);
309
 
            adb_instanceType_reset_userId(_instanceType, env);
310
 
            adb_instanceType_reset_keyName(_instanceType, env);
311
 
            adb_instanceType_reset_instanceType(_instanceType, env);
312
 
            adb_instanceType_reset_netParams(_instanceType, env);
313
 
            adb_instanceType_reset_stateName(_instanceType, env);
314
 
            adb_instanceType_reset_launchTime(_instanceType, env);
315
 
            adb_instanceType_reset_userData(_instanceType, env);
316
 
            adb_instanceType_reset_launchIndex(_instanceType, env);
317
 
            adb_instanceType_reset_groupNames(_instanceType, env);
318
 
            adb_instanceType_reset_volumes(_instanceType, env);
319
 
            adb_instanceType_reset_serviceTag(_instanceType, env);
320
 
 
321
 
 
322
 
            if(_instanceType)
323
 
            {
324
 
                AXIS2_FREE(env->allocator, _instanceType);
325
 
                _instanceType = NULL;
326
 
            }
327
 
            return AXIS2_SUCCESS;
328
 
        }
329
 
 
330
 
 
331
 
 
332
 
 
333
 
        axis2_status_t AXIS2_CALL
334
 
        adb_instanceType_deserialize(
335
 
                adb_instanceType_t* _instanceType,
336
 
                const axutil_env_t *env,
337
 
                axiom_node_t **dp_parent,
338
 
                axis2_bool_t *dp_is_early_node_valid,
339
 
                axis2_bool_t dont_care_minoccurs)
340
 
        {
341
 
          axiom_node_t *parent = *dp_parent;
342
 
 
343
 
          axis2_status_t status = AXIS2_SUCCESS;
344
 
 
345
 
              void *element = NULL;
346
 
 
347
 
             axis2_char_t* text_value = NULL;
348
 
             axutil_qname_t *qname = NULL;
349
 
 
350
 
               int i = 0;
351
 
               axutil_array_list_t *arr_list = NULL;
352
 
 
353
 
               int sequence_broken = 0;
354
 
               axiom_node_t *tmp_node = NULL;
355
 
 
356
 
            axutil_qname_t *element_qname = NULL;
357
 
 
358
 
               axiom_node_t *first_node = NULL;
359
 
               axis2_bool_t is_early_node_valid = AXIS2_TRUE;
360
 
               axiom_node_t *current_node = NULL;
361
 
               axiom_element_t *current_element = NULL;
362
 
 
363
 
            AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
364
 
            AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
365
 
 
366
 
 
367
 
 
368
 
              while(parent && axiom_node_get_node_type(parent, env) != AXIOM_ELEMENT)
369
 
              {
370
 
                  parent = axiom_node_get_next_sibling(parent, env);
371
 
              }
372
 
              if (NULL == parent)
373
 
              {
374
 
                /* This should be checked before everything */
375
 
                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
376
 
                            "Failed in building adb object for instanceType : "
377
 
                            "NULL elemenet can not be passed to deserialize");
378
 
                return AXIS2_FAILURE;
379
 
              }
380
 
 
381
 
 
382
 
                      first_node = axiom_node_get_first_child(parent, env);
383
 
 
384
 
 
385
 
 
386
 
 
387
 
                     /*
388
 
                      * building reservationId element
389
 
                      */
390
 
 
391
 
 
392
 
 
393
 
                                   current_node = first_node;
394
 
                                   is_early_node_valid = AXIS2_FALSE;
395
 
 
396
 
 
397
 
                                    while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
398
 
                                    {
399
 
                                        current_node = axiom_node_get_next_sibling(current_node, env);
400
 
                                    }
401
 
                                    if(current_node != NULL)
402
 
                                    {
403
 
                                        current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
404
 
                                        qname = axiom_element_get_qname(current_element, env, current_node);
405
 
                                    }
406
 
 
407
 
                                 element_qname = axutil_qname_create(env, "reservationId", "http://eucalyptus.ucsb.edu/", NULL);
408
 
 
409
 
 
410
 
                           if (
411
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
412
 
                           {
413
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
414
 
                              {
415
 
                                is_early_node_valid = AXIS2_TRUE;
416
 
                              }
417
 
 
418
 
 
419
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
420
 
                                      if(text_value != NULL)
421
 
                                      {
422
 
                                            status = adb_instanceType_set_reservationId(_instanceType, env,
423
 
                                                               text_value);
424
 
                                      }
425
 
 
426
 
                                      else
427
 
                                      {
428
 
                                            /*
429
 
                                             * axis2_qname_t *qname = NULL;
430
 
                                             * axiom_attribute_t *the_attri = NULL;
431
 
                                             *
432
 
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
433
 
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
434
 
                                             */
435
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
436
 
 
437
 
                                            axiom_attribute_t *the_attri = NULL;
438
 
                                            axis2_char_t *attrib_text = NULL;
439
 
                                            axutil_hash_t *attribute_hash = NULL;
440
 
 
441
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
442
 
 
443
 
                                            attrib_text = NULL;
444
 
                                            if(attribute_hash)
445
 
                                            {
446
 
                                                 axutil_hash_index_t *hi;
447
 
                                                 void *val;
448
 
                                                 const void *key;
449
 
 
450
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
451
 
                                                 {
452
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
453
 
 
454
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
455
 
                                                     {
456
 
                                                         the_attri = (axiom_attribute_t*)val;
457
 
                                                         break;
458
 
                                                     }
459
 
                                                 }
460
 
                                            }
461
 
 
462
 
                                            if(the_attri)
463
 
                                            {
464
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
465
 
                                            }
466
 
                                            else
467
 
                                            {
468
 
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
469
 
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
470
 
                                            }
471
 
 
472
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
473
 
                                            {
474
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element reservationId");
475
 
                                                status = AXIS2_FAILURE;
476
 
                                            }
477
 
                                            else
478
 
                                            {
479
 
                                                /* after all, we found this is a empty string */
480
 
                                                status = adb_instanceType_set_reservationId(_instanceType, env,
481
 
                                                                   "");
482
 
                                            }
483
 
                                      }
484
 
 
485
 
                                 if(AXIS2_FAILURE ==  status)
486
 
                                 {
487
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for reservationId ");
488
 
                                     if(element_qname)
489
 
                                     {
490
 
                                         axutil_qname_free(element_qname, env);
491
 
                                     }
492
 
                                     return AXIS2_FAILURE;
493
 
                                 }
494
 
                              }
495
 
 
496
 
                              else if(!dont_care_minoccurs)
497
 
                              {
498
 
                                  if(element_qname)
499
 
                                  {
500
 
                                      axutil_qname_free(element_qname, env);
501
 
                                  }
502
 
                                  /* this is not a nillable element*/
503
 
                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "non nillable or minOuccrs != 0 element reservationId missing");
504
 
                                  return AXIS2_FAILURE;
505
 
                              }
506
 
 
507
 
                  if(element_qname)
508
 
                  {
509
 
                     axutil_qname_free(element_qname, env);
510
 
                     element_qname = NULL;
511
 
                  }
512
 
 
513
 
 
514
 
 
515
 
                     /*
516
 
                      * building instanceId element
517
 
                      */
518
 
 
519
 
 
520
 
 
521
 
                                    /*
522
 
                                     * because elements are ordered this works fine
523
 
                                     */
524
 
 
525
 
 
526
 
                                   if(current_node != NULL && is_early_node_valid)
527
 
                                   {
528
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
529
 
 
530
 
 
531
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
532
 
                                        {
533
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
534
 
                                        }
535
 
                                        if(current_node != NULL)
536
 
                                        {
537
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
538
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
539
 
                                        }
540
 
 
541
 
                                   }
542
 
                                   is_early_node_valid = AXIS2_FALSE;
543
 
 
544
 
                                 element_qname = axutil_qname_create(env, "instanceId", "http://eucalyptus.ucsb.edu/", NULL);
545
 
 
546
 
 
547
 
                           if (
548
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
549
 
                           {
550
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
551
 
                              {
552
 
                                is_early_node_valid = AXIS2_TRUE;
553
 
                              }
554
 
 
555
 
 
556
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
557
 
                                      if(text_value != NULL)
558
 
                                      {
559
 
                                            status = adb_instanceType_set_instanceId(_instanceType, env,
560
 
                                                               text_value);
561
 
                                      }
562
 
 
563
 
                                      else
564
 
                                      {
565
 
                                            /*
566
 
                                             * axis2_qname_t *qname = NULL;
567
 
                                             * axiom_attribute_t *the_attri = NULL;
568
 
                                             *
569
 
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
570
 
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
571
 
                                             */
572
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
573
 
 
574
 
                                            axiom_attribute_t *the_attri = NULL;
575
 
                                            axis2_char_t *attrib_text = NULL;
576
 
                                            axutil_hash_t *attribute_hash = NULL;
577
 
 
578
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
579
 
 
580
 
                                            attrib_text = NULL;
581
 
                                            if(attribute_hash)
582
 
                                            {
583
 
                                                 axutil_hash_index_t *hi;
584
 
                                                 void *val;
585
 
                                                 const void *key;
586
 
 
587
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
588
 
                                                 {
589
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
590
 
 
591
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
592
 
                                                     {
593
 
                                                         the_attri = (axiom_attribute_t*)val;
594
 
                                                         break;
595
 
                                                     }
596
 
                                                 }
597
 
                                            }
598
 
 
599
 
                                            if(the_attri)
600
 
                                            {
601
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
602
 
                                            }
603
 
                                            else
604
 
                                            {
605
 
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
606
 
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
607
 
                                            }
608
 
 
609
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
610
 
                                            {
611
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element instanceId");
612
 
                                                status = AXIS2_FAILURE;
613
 
                                            }
614
 
                                            else
615
 
                                            {
616
 
                                                /* after all, we found this is a empty string */
617
 
                                                status = adb_instanceType_set_instanceId(_instanceType, env,
618
 
                                                                   "");
619
 
                                            }
620
 
                                      }
621
 
 
622
 
                                 if(AXIS2_FAILURE ==  status)
623
 
                                 {
624
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for instanceId ");
625
 
                                     if(element_qname)
626
 
                                     {
627
 
                                         axutil_qname_free(element_qname, env);
628
 
                                     }
629
 
                                     return AXIS2_FAILURE;
630
 
                                 }
631
 
                              }
632
 
 
633
 
                              else if(!dont_care_minoccurs)
634
 
                              {
635
 
                                  if(element_qname)
636
 
                                  {
637
 
                                      axutil_qname_free(element_qname, env);
638
 
                                  }
639
 
                                  /* this is not a nillable element*/
640
 
                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "non nillable or minOuccrs != 0 element instanceId missing");
641
 
                                  return AXIS2_FAILURE;
642
 
                              }
643
 
 
644
 
                  if(element_qname)
645
 
                  {
646
 
                     axutil_qname_free(element_qname, env);
647
 
                     element_qname = NULL;
648
 
                  }
649
 
 
650
 
 
651
 
 
652
 
                     /*
653
 
                      * building imageId element
654
 
                      */
655
 
 
656
 
 
657
 
 
658
 
                                    /*
659
 
                                     * because elements are ordered this works fine
660
 
                                     */
661
 
 
662
 
 
663
 
                                   if(current_node != NULL && is_early_node_valid)
664
 
                                   {
665
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
666
 
 
667
 
 
668
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
669
 
                                        {
670
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
671
 
                                        }
672
 
                                        if(current_node != NULL)
673
 
                                        {
674
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
675
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
676
 
                                        }
677
 
 
678
 
                                   }
679
 
                                   is_early_node_valid = AXIS2_FALSE;
680
 
 
681
 
                                 element_qname = axutil_qname_create(env, "imageId", "http://eucalyptus.ucsb.edu/", NULL);
682
 
 
683
 
 
684
 
                           if (
685
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
686
 
                           {
687
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
688
 
                              {
689
 
                                is_early_node_valid = AXIS2_TRUE;
690
 
                              }
691
 
 
692
 
 
693
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
694
 
                                      if(text_value != NULL)
695
 
                                      {
696
 
                                            status = adb_instanceType_set_imageId(_instanceType, env,
697
 
                                                               text_value);
698
 
                                      }
699
 
 
700
 
                                      else
701
 
                                      {
702
 
                                            /*
703
 
                                             * axis2_qname_t *qname = NULL;
704
 
                                             * axiom_attribute_t *the_attri = NULL;
705
 
                                             *
706
 
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
707
 
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
708
 
                                             */
709
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
710
 
 
711
 
                                            axiom_attribute_t *the_attri = NULL;
712
 
                                            axis2_char_t *attrib_text = NULL;
713
 
                                            axutil_hash_t *attribute_hash = NULL;
714
 
 
715
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
716
 
 
717
 
                                            attrib_text = NULL;
718
 
                                            if(attribute_hash)
719
 
                                            {
720
 
                                                 axutil_hash_index_t *hi;
721
 
                                                 void *val;
722
 
                                                 const void *key;
723
 
 
724
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
725
 
                                                 {
726
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
727
 
 
728
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
729
 
                                                     {
730
 
                                                         the_attri = (axiom_attribute_t*)val;
731
 
                                                         break;
732
 
                                                     }
733
 
                                                 }
734
 
                                            }
735
 
 
736
 
                                            if(the_attri)
737
 
                                            {
738
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
739
 
                                            }
740
 
                                            else
741
 
                                            {
742
 
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
743
 
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
744
 
                                            }
745
 
 
746
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
747
 
                                            {
748
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element imageId");
749
 
                                                status = AXIS2_FAILURE;
750
 
                                            }
751
 
                                            else
752
 
                                            {
753
 
                                                /* after all, we found this is a empty string */
754
 
                                                status = adb_instanceType_set_imageId(_instanceType, env,
755
 
                                                                   "");
756
 
                                            }
757
 
                                      }
758
 
 
759
 
                                 if(AXIS2_FAILURE ==  status)
760
 
                                 {
761
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for imageId ");
762
 
                                     if(element_qname)
763
 
                                     {
764
 
                                         axutil_qname_free(element_qname, env);
765
 
                                     }
766
 
                                     return AXIS2_FAILURE;
767
 
                                 }
768
 
                              }
769
 
 
770
 
                              else if(!dont_care_minoccurs)
771
 
                              {
772
 
                                  if(element_qname)
773
 
                                  {
774
 
                                      axutil_qname_free(element_qname, env);
775
 
                                  }
776
 
                                  /* this is not a nillable element*/
777
 
                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "non nillable or minOuccrs != 0 element imageId missing");
778
 
                                  return AXIS2_FAILURE;
779
 
                              }
780
 
 
781
 
                  if(element_qname)
782
 
                  {
783
 
                     axutil_qname_free(element_qname, env);
784
 
                     element_qname = NULL;
785
 
                  }
786
 
 
787
 
 
788
 
 
789
 
                     /*
790
 
                      * building kernelId element
791
 
                      */
792
 
 
793
 
 
794
 
 
795
 
                                    /*
796
 
                                     * because elements are ordered this works fine
797
 
                                     */
798
 
 
799
 
 
800
 
                                   if(current_node != NULL && is_early_node_valid)
801
 
                                   {
802
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
803
 
 
804
 
 
805
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
806
 
                                        {
807
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
808
 
                                        }
809
 
                                        if(current_node != NULL)
810
 
                                        {
811
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
812
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
813
 
                                        }
814
 
 
815
 
                                   }
816
 
                                   is_early_node_valid = AXIS2_FALSE;
817
 
 
818
 
                                 element_qname = axutil_qname_create(env, "kernelId", "http://eucalyptus.ucsb.edu/", NULL);
819
 
 
820
 
 
821
 
                           if (
822
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
823
 
                           {
824
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
825
 
                              {
826
 
                                is_early_node_valid = AXIS2_TRUE;
827
 
                              }
828
 
 
829
 
 
830
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
831
 
                                      if(text_value != NULL)
832
 
                                      {
833
 
                                            status = adb_instanceType_set_kernelId(_instanceType, env,
834
 
                                                               text_value);
835
 
                                      }
836
 
 
837
 
                                      else
838
 
                                      {
839
 
                                            /*
840
 
                                             * axis2_qname_t *qname = NULL;
841
 
                                             * axiom_attribute_t *the_attri = NULL;
842
 
                                             *
843
 
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
844
 
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
845
 
                                             */
846
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
847
 
 
848
 
                                            axiom_attribute_t *the_attri = NULL;
849
 
                                            axis2_char_t *attrib_text = NULL;
850
 
                                            axutil_hash_t *attribute_hash = NULL;
851
 
 
852
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
853
 
 
854
 
                                            attrib_text = NULL;
855
 
                                            if(attribute_hash)
856
 
                                            {
857
 
                                                 axutil_hash_index_t *hi;
858
 
                                                 void *val;
859
 
                                                 const void *key;
860
 
 
861
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
862
 
                                                 {
863
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
864
 
 
865
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
866
 
                                                     {
867
 
                                                         the_attri = (axiom_attribute_t*)val;
868
 
                                                         break;
869
 
                                                     }
870
 
                                                 }
871
 
                                            }
872
 
 
873
 
                                            if(the_attri)
874
 
                                            {
875
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
876
 
                                            }
877
 
                                            else
878
 
                                            {
879
 
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
880
 
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
881
 
                                            }
882
 
 
883
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
884
 
                                            {
885
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element kernelId");
886
 
                                                status = AXIS2_FAILURE;
887
 
                                            }
888
 
                                            else
889
 
                                            {
890
 
                                                /* after all, we found this is a empty string */
891
 
                                                status = adb_instanceType_set_kernelId(_instanceType, env,
892
 
                                                                   "");
893
 
                                            }
894
 
                                      }
895
 
 
896
 
                                 if(AXIS2_FAILURE ==  status)
897
 
                                 {
898
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for kernelId ");
899
 
                                     if(element_qname)
900
 
                                     {
901
 
                                         axutil_qname_free(element_qname, env);
902
 
                                     }
903
 
                                     return AXIS2_FAILURE;
904
 
                                 }
905
 
                              }
906
 
 
907
 
                              else if(!dont_care_minoccurs)
908
 
                              {
909
 
                                  if(element_qname)
910
 
                                  {
911
 
                                      axutil_qname_free(element_qname, env);
912
 
                                  }
913
 
                                  /* this is not a nillable element*/
914
 
                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "non nillable or minOuccrs != 0 element kernelId missing");
915
 
                                  return AXIS2_FAILURE;
916
 
                              }
917
 
 
918
 
                  if(element_qname)
919
 
                  {
920
 
                     axutil_qname_free(element_qname, env);
921
 
                     element_qname = NULL;
922
 
                  }
923
 
 
924
 
 
925
 
 
926
 
                     /*
927
 
                      * building ramdiskId element
928
 
                      */
929
 
 
930
 
 
931
 
 
932
 
                                    /*
933
 
                                     * because elements are ordered this works fine
934
 
                                     */
935
 
 
936
 
 
937
 
                                   if(current_node != NULL && is_early_node_valid)
938
 
                                   {
939
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
940
 
 
941
 
 
942
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
943
 
                                        {
944
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
945
 
                                        }
946
 
                                        if(current_node != NULL)
947
 
                                        {
948
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
949
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
950
 
                                        }
951
 
 
952
 
                                   }
953
 
                                   is_early_node_valid = AXIS2_FALSE;
954
 
 
955
 
                                 element_qname = axutil_qname_create(env, "ramdiskId", "http://eucalyptus.ucsb.edu/", NULL);
956
 
 
957
 
 
958
 
                           if (
959
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
960
 
                           {
961
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
962
 
                              {
963
 
                                is_early_node_valid = AXIS2_TRUE;
964
 
                              }
965
 
 
966
 
 
967
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
968
 
                                      if(text_value != NULL)
969
 
                                      {
970
 
                                            status = adb_instanceType_set_ramdiskId(_instanceType, env,
971
 
                                                               text_value);
972
 
                                      }
973
 
 
974
 
                                      else
975
 
                                      {
976
 
                                            /*
977
 
                                             * axis2_qname_t *qname = NULL;
978
 
                                             * axiom_attribute_t *the_attri = NULL;
979
 
                                             *
980
 
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
981
 
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
982
 
                                             */
983
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
984
 
 
985
 
                                            axiom_attribute_t *the_attri = NULL;
986
 
                                            axis2_char_t *attrib_text = NULL;
987
 
                                            axutil_hash_t *attribute_hash = NULL;
988
 
 
989
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
990
 
 
991
 
                                            attrib_text = NULL;
992
 
                                            if(attribute_hash)
993
 
                                            {
994
 
                                                 axutil_hash_index_t *hi;
995
 
                                                 void *val;
996
 
                                                 const void *key;
997
 
 
998
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
999
 
                                                 {
1000
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
1001
 
 
1002
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
1003
 
                                                     {
1004
 
                                                         the_attri = (axiom_attribute_t*)val;
1005
 
                                                         break;
1006
 
                                                     }
1007
 
                                                 }
1008
 
                                            }
1009
 
 
1010
 
                                            if(the_attri)
1011
 
                                            {
1012
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
1013
 
                                            }
1014
 
                                            else
1015
 
                                            {
1016
 
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
1017
 
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
1018
 
                                            }
1019
 
 
1020
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
1021
 
                                            {
1022
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element ramdiskId");
1023
 
                                                status = AXIS2_FAILURE;
1024
 
                                            }
1025
 
                                            else
1026
 
                                            {
1027
 
                                                /* after all, we found this is a empty string */
1028
 
                                                status = adb_instanceType_set_ramdiskId(_instanceType, env,
1029
 
                                                                   "");
1030
 
                                            }
1031
 
                                      }
1032
 
 
1033
 
                                 if(AXIS2_FAILURE ==  status)
1034
 
                                 {
1035
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for ramdiskId ");
1036
 
                                     if(element_qname)
1037
 
                                     {
1038
 
                                         axutil_qname_free(element_qname, env);
1039
 
                                     }
1040
 
                                     return AXIS2_FAILURE;
1041
 
                                 }
1042
 
                              }
1043
 
 
1044
 
                  if(element_qname)
1045
 
                  {
1046
 
                     axutil_qname_free(element_qname, env);
1047
 
                     element_qname = NULL;
1048
 
                  }
1049
 
 
1050
 
 
1051
 
 
1052
 
                     /*
1053
 
                      * building userId element
1054
 
                      */
1055
 
 
1056
 
 
1057
 
 
1058
 
                                    /*
1059
 
                                     * because elements are ordered this works fine
1060
 
                                     */
1061
 
 
1062
 
 
1063
 
                                   if(current_node != NULL && is_early_node_valid)
1064
 
                                   {
1065
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
1066
 
 
1067
 
 
1068
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
1069
 
                                        {
1070
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
1071
 
                                        }
1072
 
                                        if(current_node != NULL)
1073
 
                                        {
1074
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
1075
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
1076
 
                                        }
1077
 
 
1078
 
                                   }
1079
 
                                   is_early_node_valid = AXIS2_FALSE;
1080
 
 
1081
 
                                 element_qname = axutil_qname_create(env, "userId", "http://eucalyptus.ucsb.edu/", NULL);
1082
 
 
1083
 
 
1084
 
                           if (
1085
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
1086
 
                           {
1087
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
1088
 
                              {
1089
 
                                is_early_node_valid = AXIS2_TRUE;
1090
 
                              }
1091
 
 
1092
 
 
1093
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
1094
 
                                      if(text_value != NULL)
1095
 
                                      {
1096
 
                                            status = adb_instanceType_set_userId(_instanceType, env,
1097
 
                                                               text_value);
1098
 
                                      }
1099
 
 
1100
 
                                      else
1101
 
                                      {
1102
 
                                            /*
1103
 
                                             * axis2_qname_t *qname = NULL;
1104
 
                                             * axiom_attribute_t *the_attri = NULL;
1105
 
                                             *
1106
 
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
1107
 
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
1108
 
                                             */
1109
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
1110
 
 
1111
 
                                            axiom_attribute_t *the_attri = NULL;
1112
 
                                            axis2_char_t *attrib_text = NULL;
1113
 
                                            axutil_hash_t *attribute_hash = NULL;
1114
 
 
1115
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
1116
 
 
1117
 
                                            attrib_text = NULL;
1118
 
                                            if(attribute_hash)
1119
 
                                            {
1120
 
                                                 axutil_hash_index_t *hi;
1121
 
                                                 void *val;
1122
 
                                                 const void *key;
1123
 
 
1124
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
1125
 
                                                 {
1126
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
1127
 
 
1128
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
1129
 
                                                     {
1130
 
                                                         the_attri = (axiom_attribute_t*)val;
1131
 
                                                         break;
1132
 
                                                     }
1133
 
                                                 }
1134
 
                                            }
1135
 
 
1136
 
                                            if(the_attri)
1137
 
                                            {
1138
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
1139
 
                                            }
1140
 
                                            else
1141
 
                                            {
1142
 
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
1143
 
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
1144
 
                                            }
1145
 
 
1146
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
1147
 
                                            {
1148
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element userId");
1149
 
                                                status = AXIS2_FAILURE;
1150
 
                                            }
1151
 
                                            else
1152
 
                                            {
1153
 
                                                /* after all, we found this is a empty string */
1154
 
                                                status = adb_instanceType_set_userId(_instanceType, env,
1155
 
                                                                   "");
1156
 
                                            }
1157
 
                                      }
1158
 
 
1159
 
                                 if(AXIS2_FAILURE ==  status)
1160
 
                                 {
1161
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for userId ");
1162
 
                                     if(element_qname)
1163
 
                                     {
1164
 
                                         axutil_qname_free(element_qname, env);
1165
 
                                     }
1166
 
                                     return AXIS2_FAILURE;
1167
 
                                 }
1168
 
                              }
1169
 
 
1170
 
                              else if(!dont_care_minoccurs)
1171
 
                              {
1172
 
                                  if(element_qname)
1173
 
                                  {
1174
 
                                      axutil_qname_free(element_qname, env);
1175
 
                                  }
1176
 
                                  /* this is not a nillable element*/
1177
 
                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "non nillable or minOuccrs != 0 element userId missing");
1178
 
                                  return AXIS2_FAILURE;
1179
 
                              }
1180
 
 
1181
 
                  if(element_qname)
1182
 
                  {
1183
 
                     axutil_qname_free(element_qname, env);
1184
 
                     element_qname = NULL;
1185
 
                  }
1186
 
 
1187
 
 
1188
 
 
1189
 
                     /*
1190
 
                      * building keyName element
1191
 
                      */
1192
 
 
1193
 
 
1194
 
 
1195
 
                                    /*
1196
 
                                     * because elements are ordered this works fine
1197
 
                                     */
1198
 
 
1199
 
 
1200
 
                                   if(current_node != NULL && is_early_node_valid)
1201
 
                                   {
1202
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
1203
 
 
1204
 
 
1205
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
1206
 
                                        {
1207
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
1208
 
                                        }
1209
 
                                        if(current_node != NULL)
1210
 
                                        {
1211
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
1212
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
1213
 
                                        }
1214
 
 
1215
 
                                   }
1216
 
                                   is_early_node_valid = AXIS2_FALSE;
1217
 
 
1218
 
                                 element_qname = axutil_qname_create(env, "keyName", "http://eucalyptus.ucsb.edu/", NULL);
1219
 
 
1220
 
 
1221
 
                           if (
1222
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
1223
 
                           {
1224
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
1225
 
                              {
1226
 
                                is_early_node_valid = AXIS2_TRUE;
1227
 
                              }
1228
 
 
1229
 
 
1230
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
1231
 
                                      if(text_value != NULL)
1232
 
                                      {
1233
 
                                            status = adb_instanceType_set_keyName(_instanceType, env,
1234
 
                                                               text_value);
1235
 
                                      }
1236
 
 
1237
 
                                      else
1238
 
                                      {
1239
 
                                            /*
1240
 
                                             * axis2_qname_t *qname = NULL;
1241
 
                                             * axiom_attribute_t *the_attri = NULL;
1242
 
                                             *
1243
 
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
1244
 
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
1245
 
                                             */
1246
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
1247
 
 
1248
 
                                            axiom_attribute_t *the_attri = NULL;
1249
 
                                            axis2_char_t *attrib_text = NULL;
1250
 
                                            axutil_hash_t *attribute_hash = NULL;
1251
 
 
1252
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
1253
 
 
1254
 
                                            attrib_text = NULL;
1255
 
                                            if(attribute_hash)
1256
 
                                            {
1257
 
                                                 axutil_hash_index_t *hi;
1258
 
                                                 void *val;
1259
 
                                                 const void *key;
1260
 
 
1261
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
1262
 
                                                 {
1263
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
1264
 
 
1265
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
1266
 
                                                     {
1267
 
                                                         the_attri = (axiom_attribute_t*)val;
1268
 
                                                         break;
1269
 
                                                     }
1270
 
                                                 }
1271
 
                                            }
1272
 
 
1273
 
                                            if(the_attri)
1274
 
                                            {
1275
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
1276
 
                                            }
1277
 
                                            else
1278
 
                                            {
1279
 
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
1280
 
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
1281
 
                                            }
1282
 
 
1283
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
1284
 
                                            {
1285
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element keyName");
1286
 
                                                status = AXIS2_FAILURE;
1287
 
                                            }
1288
 
                                            else
1289
 
                                            {
1290
 
                                                /* after all, we found this is a empty string */
1291
 
                                                status = adb_instanceType_set_keyName(_instanceType, env,
1292
 
                                                                   "");
1293
 
                                            }
1294
 
                                      }
1295
 
 
1296
 
                                 if(AXIS2_FAILURE ==  status)
1297
 
                                 {
1298
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for keyName ");
1299
 
                                     if(element_qname)
1300
 
                                     {
1301
 
                                         axutil_qname_free(element_qname, env);
1302
 
                                     }
1303
 
                                     return AXIS2_FAILURE;
1304
 
                                 }
1305
 
                              }
1306
 
 
1307
 
                              else if(!dont_care_minoccurs)
1308
 
                              {
1309
 
                                  if(element_qname)
1310
 
                                  {
1311
 
                                      axutil_qname_free(element_qname, env);
1312
 
                                  }
1313
 
                                  /* this is not a nillable element*/
1314
 
                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "non nillable or minOuccrs != 0 element keyName missing");
1315
 
                                  return AXIS2_FAILURE;
1316
 
                              }
1317
 
 
1318
 
                  if(element_qname)
1319
 
                  {
1320
 
                     axutil_qname_free(element_qname, env);
1321
 
                     element_qname = NULL;
1322
 
                  }
1323
 
 
1324
 
 
1325
 
 
1326
 
                     /*
1327
 
                      * building instanceType element
1328
 
                      */
1329
 
 
1330
 
 
1331
 
 
1332
 
                                    /*
1333
 
                                     * because elements are ordered this works fine
1334
 
                                     */
1335
 
 
1336
 
 
1337
 
                                   if(current_node != NULL && is_early_node_valid)
1338
 
                                   {
1339
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
1340
 
 
1341
 
 
1342
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
1343
 
                                        {
1344
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
1345
 
                                        }
1346
 
                                        if(current_node != NULL)
1347
 
                                        {
1348
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
1349
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
1350
 
                                        }
1351
 
 
1352
 
                                   }
1353
 
                                   is_early_node_valid = AXIS2_FALSE;
1354
 
 
1355
 
                                 element_qname = axutil_qname_create(env, "instanceType", "http://eucalyptus.ucsb.edu/", NULL);
1356
 
 
1357
 
 
1358
 
                           if (adb_virtualMachineType_is_particle() ||
1359
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
1360
 
                           {
1361
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
1362
 
                              {
1363
 
                                is_early_node_valid = AXIS2_TRUE;
1364
 
                              }
1365
 
 
1366
 
 
1367
 
                                      element = (void*)adb_virtualMachineType_create(env);
1368
 
 
1369
 
                                      status =  adb_virtualMachineType_deserialize((adb_virtualMachineType_t*)element,
1370
 
                                                                            env, &current_node, &is_early_node_valid, AXIS2_FALSE);
1371
 
                                      if(AXIS2_FAILURE == status)
1372
 
                                      {
1373
 
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building adb object for element instanceType");
1374
 
                                      }
1375
 
                                      else
1376
 
                                      {
1377
 
                                          status = adb_instanceType_set_instanceType(_instanceType, env,
1378
 
                                                                   (adb_virtualMachineType_t*)element);
1379
 
                                      }
1380
 
 
1381
 
                                 if(AXIS2_FAILURE ==  status)
1382
 
                                 {
1383
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for instanceType ");
1384
 
                                     if(element_qname)
1385
 
                                     {
1386
 
                                         axutil_qname_free(element_qname, env);
1387
 
                                     }
1388
 
                                     return AXIS2_FAILURE;
1389
 
                                 }
1390
 
                              }
1391
 
 
1392
 
                              else if(!dont_care_minoccurs)
1393
 
                              {
1394
 
                                  if(element_qname)
1395
 
                                  {
1396
 
                                      axutil_qname_free(element_qname, env);
1397
 
                                  }
1398
 
                                  /* this is not a nillable element*/
1399
 
                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "non nillable or minOuccrs != 0 element instanceType missing");
1400
 
                                  return AXIS2_FAILURE;
1401
 
                              }
1402
 
 
1403
 
                  if(element_qname)
1404
 
                  {
1405
 
                     axutil_qname_free(element_qname, env);
1406
 
                     element_qname = NULL;
1407
 
                  }
1408
 
 
1409
 
 
1410
 
 
1411
 
                     /*
1412
 
                      * building netParams element
1413
 
                      */
1414
 
 
1415
 
 
1416
 
 
1417
 
                                    /*
1418
 
                                     * because elements are ordered this works fine
1419
 
                                     */
1420
 
 
1421
 
 
1422
 
                                   if(current_node != NULL && is_early_node_valid)
1423
 
                                   {
1424
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
1425
 
 
1426
 
 
1427
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
1428
 
                                        {
1429
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
1430
 
                                        }
1431
 
                                        if(current_node != NULL)
1432
 
                                        {
1433
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
1434
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
1435
 
                                        }
1436
 
 
1437
 
                                   }
1438
 
                                   is_early_node_valid = AXIS2_FALSE;
1439
 
 
1440
 
                                 element_qname = axutil_qname_create(env, "netParams", "http://eucalyptus.ucsb.edu/", NULL);
1441
 
 
1442
 
 
1443
 
                           if (adb_netConfigType_is_particle() ||
1444
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
1445
 
                           {
1446
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
1447
 
                              {
1448
 
                                is_early_node_valid = AXIS2_TRUE;
1449
 
                              }
1450
 
 
1451
 
 
1452
 
                                      element = (void*)adb_netConfigType_create(env);
1453
 
 
1454
 
                                      status =  adb_netConfigType_deserialize((adb_netConfigType_t*)element,
1455
 
                                                                            env, &current_node, &is_early_node_valid, AXIS2_FALSE);
1456
 
                                      if(AXIS2_FAILURE == status)
1457
 
                                      {
1458
 
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building adb object for element netParams");
1459
 
                                      }
1460
 
                                      else
1461
 
                                      {
1462
 
                                          status = adb_instanceType_set_netParams(_instanceType, env,
1463
 
                                                                   (adb_netConfigType_t*)element);
1464
 
                                      }
1465
 
 
1466
 
                                 if(AXIS2_FAILURE ==  status)
1467
 
                                 {
1468
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for netParams ");
1469
 
                                     if(element_qname)
1470
 
                                     {
1471
 
                                         axutil_qname_free(element_qname, env);
1472
 
                                     }
1473
 
                                     return AXIS2_FAILURE;
1474
 
                                 }
1475
 
                              }
1476
 
 
1477
 
                  if(element_qname)
1478
 
                  {
1479
 
                     axutil_qname_free(element_qname, env);
1480
 
                     element_qname = NULL;
1481
 
                  }
1482
 
 
1483
 
 
1484
 
 
1485
 
                     /*
1486
 
                      * building stateName element
1487
 
                      */
1488
 
 
1489
 
 
1490
 
 
1491
 
                                    /*
1492
 
                                     * because elements are ordered this works fine
1493
 
                                     */
1494
 
 
1495
 
 
1496
 
                                   if(current_node != NULL && is_early_node_valid)
1497
 
                                   {
1498
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
1499
 
 
1500
 
 
1501
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
1502
 
                                        {
1503
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
1504
 
                                        }
1505
 
                                        if(current_node != NULL)
1506
 
                                        {
1507
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
1508
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
1509
 
                                        }
1510
 
 
1511
 
                                   }
1512
 
                                   is_early_node_valid = AXIS2_FALSE;
1513
 
 
1514
 
                                 element_qname = axutil_qname_create(env, "stateName", "http://eucalyptus.ucsb.edu/", NULL);
1515
 
 
1516
 
 
1517
 
                           if (
1518
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
1519
 
                           {
1520
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
1521
 
                              {
1522
 
                                is_early_node_valid = AXIS2_TRUE;
1523
 
                              }
1524
 
 
1525
 
 
1526
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
1527
 
                                      if(text_value != NULL)
1528
 
                                      {
1529
 
                                            status = adb_instanceType_set_stateName(_instanceType, env,
1530
 
                                                               text_value);
1531
 
                                      }
1532
 
 
1533
 
                                      else
1534
 
                                      {
1535
 
                                            /*
1536
 
                                             * axis2_qname_t *qname = NULL;
1537
 
                                             * axiom_attribute_t *the_attri = NULL;
1538
 
                                             *
1539
 
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
1540
 
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
1541
 
                                             */
1542
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
1543
 
 
1544
 
                                            axiom_attribute_t *the_attri = NULL;
1545
 
                                            axis2_char_t *attrib_text = NULL;
1546
 
                                            axutil_hash_t *attribute_hash = NULL;
1547
 
 
1548
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
1549
 
 
1550
 
                                            attrib_text = NULL;
1551
 
                                            if(attribute_hash)
1552
 
                                            {
1553
 
                                                 axutil_hash_index_t *hi;
1554
 
                                                 void *val;
1555
 
                                                 const void *key;
1556
 
 
1557
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
1558
 
                                                 {
1559
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
1560
 
 
1561
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
1562
 
                                                     {
1563
 
                                                         the_attri = (axiom_attribute_t*)val;
1564
 
                                                         break;
1565
 
                                                     }
1566
 
                                                 }
1567
 
                                            }
1568
 
 
1569
 
                                            if(the_attri)
1570
 
                                            {
1571
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
1572
 
                                            }
1573
 
                                            else
1574
 
                                            {
1575
 
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
1576
 
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
1577
 
                                            }
1578
 
 
1579
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
1580
 
                                            {
1581
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element stateName");
1582
 
                                                status = AXIS2_FAILURE;
1583
 
                                            }
1584
 
                                            else
1585
 
                                            {
1586
 
                                                /* after all, we found this is a empty string */
1587
 
                                                status = adb_instanceType_set_stateName(_instanceType, env,
1588
 
                                                                   "");
1589
 
                                            }
1590
 
                                      }
1591
 
 
1592
 
                                 if(AXIS2_FAILURE ==  status)
1593
 
                                 {
1594
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for stateName ");
1595
 
                                     if(element_qname)
1596
 
                                     {
1597
 
                                         axutil_qname_free(element_qname, env);
1598
 
                                     }
1599
 
                                     return AXIS2_FAILURE;
1600
 
                                 }
1601
 
                              }
1602
 
 
1603
 
                              else if(!dont_care_minoccurs)
1604
 
                              {
1605
 
                                  if(element_qname)
1606
 
                                  {
1607
 
                                      axutil_qname_free(element_qname, env);
1608
 
                                  }
1609
 
                                  /* this is not a nillable element*/
1610
 
                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "non nillable or minOuccrs != 0 element stateName missing");
1611
 
                                  return AXIS2_FAILURE;
1612
 
                              }
1613
 
 
1614
 
                  if(element_qname)
1615
 
                  {
1616
 
                     axutil_qname_free(element_qname, env);
1617
 
                     element_qname = NULL;
1618
 
                  }
1619
 
 
1620
 
 
1621
 
 
1622
 
                     /*
1623
 
                      * building launchTime element
1624
 
                      */
1625
 
 
1626
 
 
1627
 
 
1628
 
                                    /*
1629
 
                                     * because elements are ordered this works fine
1630
 
                                     */
1631
 
 
1632
 
 
1633
 
                                   if(current_node != NULL && is_early_node_valid)
1634
 
                                   {
1635
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
1636
 
 
1637
 
 
1638
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
1639
 
                                        {
1640
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
1641
 
                                        }
1642
 
                                        if(current_node != NULL)
1643
 
                                        {
1644
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
1645
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
1646
 
                                        }
1647
 
 
1648
 
                                   }
1649
 
                                   is_early_node_valid = AXIS2_FALSE;
1650
 
 
1651
 
                                 element_qname = axutil_qname_create(env, "launchTime", "http://eucalyptus.ucsb.edu/", NULL);
1652
 
 
1653
 
 
1654
 
                           if (
1655
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
1656
 
                           {
1657
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
1658
 
                              {
1659
 
                                is_early_node_valid = AXIS2_TRUE;
1660
 
                              }
1661
 
 
1662
 
 
1663
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
1664
 
                                      if(text_value != NULL)
1665
 
                                      {
1666
 
                                          element = (void*)axutil_date_time_create(env);
1667
 
                                          status = axutil_date_time_deserialize_date_time((axutil_date_time_t*)element, env,
1668
 
                                                                          text_value);
1669
 
                                          if(AXIS2_FAILURE ==  status)
1670
 
                                          {
1671
 
                                              if(element != NULL)
1672
 
                                              {
1673
 
                                                  axutil_date_time_free((axutil_date_time_t*)element, env);
1674
 
                                              }
1675
 
                                              AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building element launchTime ");
1676
 
                                          }
1677
 
                                          else
1678
 
                                          {
1679
 
                                            status = adb_instanceType_set_launchTime(_instanceType, env,
1680
 
                                                                       (axutil_date_time_t*)element);
1681
 
                                          }
1682
 
                                      }
1683
 
 
1684
 
                                      else
1685
 
                                      {
1686
 
                                          AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element launchTime");
1687
 
                                          status = AXIS2_FAILURE;
1688
 
                                      }
1689
 
 
1690
 
                                 if(AXIS2_FAILURE ==  status)
1691
 
                                 {
1692
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for launchTime ");
1693
 
                                     if(element_qname)
1694
 
                                     {
1695
 
                                         axutil_qname_free(element_qname, env);
1696
 
                                     }
1697
 
                                     return AXIS2_FAILURE;
1698
 
                                 }
1699
 
                              }
1700
 
 
1701
 
                  if(element_qname)
1702
 
                  {
1703
 
                     axutil_qname_free(element_qname, env);
1704
 
                     element_qname = NULL;
1705
 
                  }
1706
 
 
1707
 
 
1708
 
 
1709
 
                     /*
1710
 
                      * building userData element
1711
 
                      */
1712
 
 
1713
 
 
1714
 
 
1715
 
                                    /*
1716
 
                                     * because elements are ordered this works fine
1717
 
                                     */
1718
 
 
1719
 
 
1720
 
                                   if(current_node != NULL && is_early_node_valid)
1721
 
                                   {
1722
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
1723
 
 
1724
 
 
1725
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
1726
 
                                        {
1727
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
1728
 
                                        }
1729
 
                                        if(current_node != NULL)
1730
 
                                        {
1731
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
1732
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
1733
 
                                        }
1734
 
 
1735
 
                                   }
1736
 
                                   is_early_node_valid = AXIS2_FALSE;
1737
 
 
1738
 
                                 element_qname = axutil_qname_create(env, "userData", "http://eucalyptus.ucsb.edu/", NULL);
1739
 
 
1740
 
 
1741
 
                           if (
1742
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
1743
 
                           {
1744
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
1745
 
                              {
1746
 
                                is_early_node_valid = AXIS2_TRUE;
1747
 
                              }
1748
 
 
1749
 
 
1750
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
1751
 
                                      if(text_value != NULL)
1752
 
                                      {
1753
 
                                            status = adb_instanceType_set_userData(_instanceType, env,
1754
 
                                                               text_value);
1755
 
                                      }
1756
 
 
1757
 
                                      else
1758
 
                                      {
1759
 
                                            /*
1760
 
                                             * axis2_qname_t *qname = NULL;
1761
 
                                             * axiom_attribute_t *the_attri = NULL;
1762
 
                                             *
1763
 
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
1764
 
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
1765
 
                                             */
1766
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
1767
 
 
1768
 
                                            axiom_attribute_t *the_attri = NULL;
1769
 
                                            axis2_char_t *attrib_text = NULL;
1770
 
                                            axutil_hash_t *attribute_hash = NULL;
1771
 
 
1772
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
1773
 
 
1774
 
                                            attrib_text = NULL;
1775
 
                                            if(attribute_hash)
1776
 
                                            {
1777
 
                                                 axutil_hash_index_t *hi;
1778
 
                                                 void *val;
1779
 
                                                 const void *key;
1780
 
 
1781
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
1782
 
                                                 {
1783
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
1784
 
 
1785
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
1786
 
                                                     {
1787
 
                                                         the_attri = (axiom_attribute_t*)val;
1788
 
                                                         break;
1789
 
                                                     }
1790
 
                                                 }
1791
 
                                            }
1792
 
 
1793
 
                                            if(the_attri)
1794
 
                                            {
1795
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
1796
 
                                            }
1797
 
                                            else
1798
 
                                            {
1799
 
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
1800
 
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
1801
 
                                            }
1802
 
 
1803
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
1804
 
                                            {
1805
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element userData");
1806
 
                                                status = AXIS2_FAILURE;
1807
 
                                            }
1808
 
                                            else
1809
 
                                            {
1810
 
                                                /* after all, we found this is a empty string */
1811
 
                                                status = adb_instanceType_set_userData(_instanceType, env,
1812
 
                                                                   "");
1813
 
                                            }
1814
 
                                      }
1815
 
 
1816
 
                                 if(AXIS2_FAILURE ==  status)
1817
 
                                 {
1818
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for userData ");
1819
 
                                     if(element_qname)
1820
 
                                     {
1821
 
                                         axutil_qname_free(element_qname, env);
1822
 
                                     }
1823
 
                                     return AXIS2_FAILURE;
1824
 
                                 }
1825
 
                              }
1826
 
 
1827
 
                  if(element_qname)
1828
 
                  {
1829
 
                     axutil_qname_free(element_qname, env);
1830
 
                     element_qname = NULL;
1831
 
                  }
1832
 
 
1833
 
 
1834
 
 
1835
 
                     /*
1836
 
                      * building launchIndex element
1837
 
                      */
1838
 
 
1839
 
 
1840
 
 
1841
 
                                    /*
1842
 
                                     * because elements are ordered this works fine
1843
 
                                     */
1844
 
 
1845
 
 
1846
 
                                   if(current_node != NULL && is_early_node_valid)
1847
 
                                   {
1848
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
1849
 
 
1850
 
 
1851
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
1852
 
                                        {
1853
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
1854
 
                                        }
1855
 
                                        if(current_node != NULL)
1856
 
                                        {
1857
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
1858
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
1859
 
                                        }
1860
 
 
1861
 
                                   }
1862
 
                                   is_early_node_valid = AXIS2_FALSE;
1863
 
 
1864
 
                                 element_qname = axutil_qname_create(env, "launchIndex", "http://eucalyptus.ucsb.edu/", NULL);
1865
 
 
1866
 
 
1867
 
                           if (
1868
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
1869
 
                           {
1870
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
1871
 
                              {
1872
 
                                is_early_node_valid = AXIS2_TRUE;
1873
 
                              }
1874
 
 
1875
 
 
1876
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
1877
 
                                      if(text_value != NULL)
1878
 
                                      {
1879
 
                                            status = adb_instanceType_set_launchIndex(_instanceType, env,
1880
 
                                                               text_value);
1881
 
                                      }
1882
 
 
1883
 
                                      else
1884
 
                                      {
1885
 
                                            /*
1886
 
                                             * axis2_qname_t *qname = NULL;
1887
 
                                             * axiom_attribute_t *the_attri = NULL;
1888
 
                                             *
1889
 
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
1890
 
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
1891
 
                                             */
1892
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
1893
 
 
1894
 
                                            axiom_attribute_t *the_attri = NULL;
1895
 
                                            axis2_char_t *attrib_text = NULL;
1896
 
                                            axutil_hash_t *attribute_hash = NULL;
1897
 
 
1898
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
1899
 
 
1900
 
                                            attrib_text = NULL;
1901
 
                                            if(attribute_hash)
1902
 
                                            {
1903
 
                                                 axutil_hash_index_t *hi;
1904
 
                                                 void *val;
1905
 
                                                 const void *key;
1906
 
 
1907
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
1908
 
                                                 {
1909
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
1910
 
 
1911
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
1912
 
                                                     {
1913
 
                                                         the_attri = (axiom_attribute_t*)val;
1914
 
                                                         break;
1915
 
                                                     }
1916
 
                                                 }
1917
 
                                            }
1918
 
 
1919
 
                                            if(the_attri)
1920
 
                                            {
1921
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
1922
 
                                            }
1923
 
                                            else
1924
 
                                            {
1925
 
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
1926
 
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
1927
 
                                            }
1928
 
 
1929
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
1930
 
                                            {
1931
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element launchIndex");
1932
 
                                                status = AXIS2_FAILURE;
1933
 
                                            }
1934
 
                                            else
1935
 
                                            {
1936
 
                                                /* after all, we found this is a empty string */
1937
 
                                                status = adb_instanceType_set_launchIndex(_instanceType, env,
1938
 
                                                                   "");
1939
 
                                            }
1940
 
                                      }
1941
 
 
1942
 
                                 if(AXIS2_FAILURE ==  status)
1943
 
                                 {
1944
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for launchIndex ");
1945
 
                                     if(element_qname)
1946
 
                                     {
1947
 
                                         axutil_qname_free(element_qname, env);
1948
 
                                     }
1949
 
                                     return AXIS2_FAILURE;
1950
 
                                 }
1951
 
                              }
1952
 
 
1953
 
                  if(element_qname)
1954
 
                  {
1955
 
                     axutil_qname_free(element_qname, env);
1956
 
                     element_qname = NULL;
1957
 
                  }
1958
 
 
1959
 
                    /*
1960
 
                     * building groupNames array
1961
 
                     */
1962
 
                       arr_list = axutil_array_list_create(env, 10);
1963
 
 
1964
 
 
1965
 
 
1966
 
                     /*
1967
 
                      * building groupNames element
1968
 
                      */
1969
 
 
1970
 
 
1971
 
 
1972
 
                                    element_qname = axutil_qname_create(env, "groupNames", "http://eucalyptus.ucsb.edu/", NULL);
1973
 
 
1974
 
 
1975
 
                               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;)
1976
 
 
1977
 
                               {
1978
 
                                  if(axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
1979
 
                                  {
1980
 
                                     current_node =axiom_node_get_next_sibling(current_node, env);
1981
 
                                     is_early_node_valid = AXIS2_FALSE;
1982
 
                                     continue;
1983
 
                                  }
1984
 
 
1985
 
                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
1986
 
                                  qname = axiom_element_get_qname(current_element, env, current_node);
1987
 
 
1988
 
                                  if (axutil_qname_equals(element_qname, env, qname))
1989
 
                                  {
1990
 
 
1991
 
                                      is_early_node_valid = AXIS2_TRUE;
1992
 
 
1993
 
 
1994
 
                                          text_value = axiom_element_get_text(current_element, env, current_node);
1995
 
                                          if(text_value != NULL)
1996
 
                                          {
1997
 
                                              axutil_array_list_add_at(arr_list, env, i, axutil_strdup(env, text_value));
1998
 
                                          }
1999
 
 
2000
 
                                          else
2001
 
                                          {
2002
 
                                              /*
2003
 
                                               * axis2_qname_t *qname = NULL;
2004
 
                                               * axiom_attribute_t *the_attri = NULL;
2005
 
                                               *
2006
 
                                               * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
2007
 
                                               * the_attri = axiom_element_get_attribute(current_element, env, qname);
2008
 
                                               */
2009
 
 
2010
 
                                              /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
2011
 
 
2012
 
                                              axiom_attribute_t *the_attri = NULL;
2013
 
                                              axis2_char_t *attrib_text = NULL;
2014
 
                                              axutil_hash_t *attribute_hash = NULL;
2015
 
 
2016
 
                                              attribute_hash = axiom_element_get_all_attributes(current_element, env);
2017
 
 
2018
 
                                              attrib_text = NULL;
2019
 
                                              if(attribute_hash)
2020
 
                                              {
2021
 
                                                   axutil_hash_index_t *hi;
2022
 
                                                   void *val;
2023
 
                                                   const void *key;
2024
 
 
2025
 
                                                   for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
2026
 
                                                   {
2027
 
                                                       axutil_hash_this(hi, &key, NULL, &val);
2028
 
 
2029
 
                                                       if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
2030
 
                                                       {
2031
 
                                                           the_attri = (axiom_attribute_t*)val;
2032
 
                                                           break;
2033
 
                                                       }
2034
 
                                                   }
2035
 
                                              }
2036
 
 
2037
 
                                              if(the_attri)
2038
 
                                              {
2039
 
                                                  attrib_text = axiom_attribute_get_value(the_attri, env);
2040
 
                                              }
2041
 
                                              else
2042
 
                                              {
2043
 
                                                  /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
2044
 
                                                  attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
2045
 
                                              }
2046
 
 
2047
 
                                              if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
2048
 
                                              {
2049
 
                                                  AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element groupNames");
2050
 
                                                  status = AXIS2_FAILURE;
2051
 
                                              }
2052
 
                                              else
2053
 
                                              {
2054
 
                                                  /* after all, we found this is a empty string */
2055
 
                                                  axutil_array_list_add_at(arr_list, env, i, axutil_strdup(env, ""));
2056
 
                                              }
2057
 
                                          }
2058
 
 
2059
 
                                     if(AXIS2_FAILURE ==  status)
2060
 
                                     {
2061
 
                                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for groupNames ");
2062
 
                                         if(element_qname)
2063
 
                                         {
2064
 
                                            axutil_qname_free(element_qname, env);
2065
 
                                         }
2066
 
                                         if(arr_list)
2067
 
                                         {
2068
 
                                            axutil_array_list_free(arr_list, env);
2069
 
                                         }
2070
 
                                         return AXIS2_FAILURE;
2071
 
                                     }
2072
 
 
2073
 
                                     i ++;
2074
 
                                    current_node = axiom_node_get_next_sibling(current_node, env);
2075
 
                                  }
2076
 
                                  else
2077
 
                                  {
2078
 
                                      is_early_node_valid = AXIS2_FALSE;
2079
 
                                      sequence_broken = 1;
2080
 
                                  }
2081
 
 
2082
 
                               }
2083
 
 
2084
 
 
2085
 
                                   if (i < 0)
2086
 
                                   {
2087
 
                                     /* found element out of order */
2088
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "groupNames (@minOccurs = '0') only have %d elements", i);
2089
 
                                     if(element_qname)
2090
 
                                     {
2091
 
                                        axutil_qname_free(element_qname, env);
2092
 
                                     }
2093
 
                                     if(arr_list)
2094
 
                                     {
2095
 
                                        axutil_array_list_free(arr_list, env);
2096
 
                                     }
2097
 
                                     return AXIS2_FAILURE;
2098
 
                                   }
2099
 
 
2100
 
 
2101
 
                               if(0 == axutil_array_list_size(arr_list,env))
2102
 
                               {
2103
 
                                    axutil_array_list_free(arr_list, env);
2104
 
                               }
2105
 
                               else
2106
 
                               {
2107
 
                                    status = adb_instanceType_set_groupNames(_instanceType, env,
2108
 
                                                                   arr_list);
2109
 
                               }
2110
 
 
2111
 
 
2112
 
                  if(element_qname)
2113
 
                  {
2114
 
                     axutil_qname_free(element_qname, env);
2115
 
                     element_qname = NULL;
2116
 
                  }
2117
 
 
2118
 
                    /*
2119
 
                     * building volumes array
2120
 
                     */
2121
 
                       arr_list = axutil_array_list_create(env, 10);
2122
 
 
2123
 
 
2124
 
 
2125
 
                     /*
2126
 
                      * building volumes element
2127
 
                      */
2128
 
 
2129
 
 
2130
 
 
2131
 
                                    element_qname = axutil_qname_create(env, "volumes", "http://eucalyptus.ucsb.edu/", NULL);
2132
 
 
2133
 
 
2134
 
                               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;)
2135
 
 
2136
 
                               {
2137
 
                                  if(axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
2138
 
                                  {
2139
 
                                     current_node =axiom_node_get_next_sibling(current_node, env);
2140
 
                                     is_early_node_valid = AXIS2_FALSE;
2141
 
                                     continue;
2142
 
                                  }
2143
 
 
2144
 
                                  current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
2145
 
                                  qname = axiom_element_get_qname(current_element, env, current_node);
2146
 
 
2147
 
                                  if (axutil_qname_equals(element_qname, env, qname))
2148
 
                                  {
2149
 
 
2150
 
                                      is_early_node_valid = AXIS2_TRUE;
2151
 
 
2152
 
 
2153
 
                                          element = (void*)adb_volumeType_create(env);
2154
 
 
2155
 
                                          status =  adb_volumeType_deserialize((adb_volumeType_t*)element, env,
2156
 
                                                                                 &current_node, &is_early_node_valid, AXIS2_FALSE);
2157
 
 
2158
 
                                          if(AXIS2_FAILURE ==  status)
2159
 
                                          {
2160
 
                                              AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in building element volumes ");
2161
 
                                          }
2162
 
                                          else
2163
 
                                          {
2164
 
                                            axutil_array_list_add_at(arr_list, env, i, element);
2165
 
                                          }
2166
 
 
2167
 
                                     if(AXIS2_FAILURE ==  status)
2168
 
                                     {
2169
 
                                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for volumes ");
2170
 
                                         if(element_qname)
2171
 
                                         {
2172
 
                                            axutil_qname_free(element_qname, env);
2173
 
                                         }
2174
 
                                         if(arr_list)
2175
 
                                         {
2176
 
                                            axutil_array_list_free(arr_list, env);
2177
 
                                         }
2178
 
                                         return AXIS2_FAILURE;
2179
 
                                     }
2180
 
 
2181
 
                                     i ++;
2182
 
                                    current_node = axiom_node_get_next_sibling(current_node, env);
2183
 
                                  }
2184
 
                                  else
2185
 
                                  {
2186
 
                                      is_early_node_valid = AXIS2_FALSE;
2187
 
                                      sequence_broken = 1;
2188
 
                                  }
2189
 
 
2190
 
                               }
2191
 
 
2192
 
 
2193
 
                                   if (i < 0)
2194
 
                                   {
2195
 
                                     /* found element out of order */
2196
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "volumes (@minOccurs = '0') only have %d elements", i);
2197
 
                                     if(element_qname)
2198
 
                                     {
2199
 
                                        axutil_qname_free(element_qname, env);
2200
 
                                     }
2201
 
                                     if(arr_list)
2202
 
                                     {
2203
 
                                        axutil_array_list_free(arr_list, env);
2204
 
                                     }
2205
 
                                     return AXIS2_FAILURE;
2206
 
                                   }
2207
 
 
2208
 
 
2209
 
                               if(0 == axutil_array_list_size(arr_list,env))
2210
 
                               {
2211
 
                                    axutil_array_list_free(arr_list, env);
2212
 
                               }
2213
 
                               else
2214
 
                               {
2215
 
                                    status = adb_instanceType_set_volumes(_instanceType, env,
2216
 
                                                                   arr_list);
2217
 
                               }
2218
 
 
2219
 
 
2220
 
                  if(element_qname)
2221
 
                  {
2222
 
                     axutil_qname_free(element_qname, env);
2223
 
                     element_qname = NULL;
2224
 
                  }
2225
 
 
2226
 
 
2227
 
 
2228
 
                     /*
2229
 
                      * building serviceTag element
2230
 
                      */
2231
 
 
2232
 
 
2233
 
 
2234
 
                                    /*
2235
 
                                     * because elements are ordered this works fine
2236
 
                                     */
2237
 
 
2238
 
 
2239
 
                                   if(current_node != NULL && is_early_node_valid)
2240
 
                                   {
2241
 
                                       current_node = axiom_node_get_next_sibling(current_node, env);
2242
 
 
2243
 
 
2244
 
                                        while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
2245
 
                                        {
2246
 
                                            current_node = axiom_node_get_next_sibling(current_node, env);
2247
 
                                        }
2248
 
                                        if(current_node != NULL)
2249
 
                                        {
2250
 
                                            current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, env);
2251
 
                                            qname = axiom_element_get_qname(current_element, env, current_node);
2252
 
                                        }
2253
 
 
2254
 
                                   }
2255
 
                                   is_early_node_valid = AXIS2_FALSE;
2256
 
 
2257
 
                                 element_qname = axutil_qname_create(env, "serviceTag", "http://eucalyptus.ucsb.edu/", NULL);
2258
 
 
2259
 
 
2260
 
                           if (
2261
 
                                (current_node   && current_element && (axutil_qname_equals(element_qname, env, qname))))
2262
 
                           {
2263
 
                              if( current_node   && current_element && (axutil_qname_equals(element_qname, env, qname)))
2264
 
                              {
2265
 
                                is_early_node_valid = AXIS2_TRUE;
2266
 
                              }
2267
 
 
2268
 
 
2269
 
                                      text_value = axiom_element_get_text(current_element, env, current_node);
2270
 
                                      if(text_value != NULL)
2271
 
                                      {
2272
 
                                            status = adb_instanceType_set_serviceTag(_instanceType, env,
2273
 
                                                               text_value);
2274
 
                                      }
2275
 
 
2276
 
                                      else
2277
 
                                      {
2278
 
                                            /*
2279
 
                                             * axis2_qname_t *qname = NULL;
2280
 
                                             * axiom_attribute_t *the_attri = NULL;
2281
 
                                             *
2282
 
                                             * qname = axutil_qname_create(env, "nil", "http://www.w3.org/2001/XMLSchema-instance", "xsi");
2283
 
                                             * the_attri = axiom_element_get_attribute(current_element, env, qname);
2284
 
                                             */
2285
 
                                            /* currently thereis a bug in the axiom_element_get_attribute, so we have to go to this bad method */
2286
 
 
2287
 
                                            axiom_attribute_t *the_attri = NULL;
2288
 
                                            axis2_char_t *attrib_text = NULL;
2289
 
                                            axutil_hash_t *attribute_hash = NULL;
2290
 
 
2291
 
                                            attribute_hash = axiom_element_get_all_attributes(current_element, env);
2292
 
 
2293
 
                                            attrib_text = NULL;
2294
 
                                            if(attribute_hash)
2295
 
                                            {
2296
 
                                                 axutil_hash_index_t *hi;
2297
 
                                                 void *val;
2298
 
                                                 const void *key;
2299
 
 
2300
 
                                                 for (hi = axutil_hash_first(attribute_hash, env); hi; hi = axutil_hash_next(env, hi))
2301
 
                                                 {
2302
 
                                                     axutil_hash_this(hi, &key, NULL, &val);
2303
 
 
2304
 
                                                     if(strstr((axis2_char_t*)key, "nil|http://www.w3.org/2001/XMLSchema-instance"))
2305
 
                                                     {
2306
 
                                                         the_attri = (axiom_attribute_t*)val;
2307
 
                                                         break;
2308
 
                                                     }
2309
 
                                                 }
2310
 
                                            }
2311
 
 
2312
 
                                            if(the_attri)
2313
 
                                            {
2314
 
                                                attrib_text = axiom_attribute_get_value(the_attri, env);
2315
 
                                            }
2316
 
                                            else
2317
 
                                            {
2318
 
                                                /* this is hoping that attribute is stored in "http://www.w3.org/2001/XMLSchema-instance", this happnes when name is in default namespace */
2319
 
                                                attrib_text = axiom_element_get_attribute_value_by_name(current_element, env, "nil");
2320
 
                                            }
2321
 
 
2322
 
                                            if(attrib_text && 0 == axutil_strcmp(attrib_text, "1"))
2323
 
                                            {
2324
 
                                                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element serviceTag");
2325
 
                                                status = AXIS2_FAILURE;
2326
 
                                            }
2327
 
                                            else
2328
 
                                            {
2329
 
                                                /* after all, we found this is a empty string */
2330
 
                                                status = adb_instanceType_set_serviceTag(_instanceType, env,
2331
 
                                                                   "");
2332
 
                                            }
2333
 
                                      }
2334
 
 
2335
 
                                 if(AXIS2_FAILURE ==  status)
2336
 
                                 {
2337
 
                                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the value for serviceTag ");
2338
 
                                     if(element_qname)
2339
 
                                     {
2340
 
                                         axutil_qname_free(element_qname, env);
2341
 
                                     }
2342
 
                                     return AXIS2_FAILURE;
2343
 
                                 }
2344
 
                              }
2345
 
 
2346
 
                  if(element_qname)
2347
 
                  {
2348
 
                     axutil_qname_free(element_qname, env);
2349
 
                     element_qname = NULL;
2350
 
                  }
2351
 
 
2352
 
          return status;
2353
 
       }
2354
 
 
2355
 
          axis2_bool_t AXIS2_CALL
2356
 
          adb_instanceType_is_particle()
2357
 
          {
2358
 
 
2359
 
                 return AXIS2_FALSE;
2360
 
 
2361
 
          }
2362
 
 
2363
 
 
2364
 
          void AXIS2_CALL
2365
 
          adb_instanceType_declare_parent_namespaces(
2366
 
                    adb_instanceType_t* _instanceType,
2367
 
                    const axutil_env_t *env, axiom_element_t *parent_element,
2368
 
                    axutil_hash_t *namespaces, int *next_ns_index)
2369
 
          {
2370
 
 
2371
 
                  /* Here this is an empty function, Nothing to declare */
2372
 
 
2373
 
          }
2374
 
 
2375
 
 
2376
 
 
2377
 
        axiom_node_t* AXIS2_CALL
2378
 
        adb_instanceType_serialize(
2379
 
                adb_instanceType_t* _instanceType,
2380
 
                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)
2381
 
        {
2382
 
 
2383
 
 
2384
 
             axis2_char_t *string_to_stream;
2385
 
 
2386
 
 
2387
 
         axiom_node_t *current_node = NULL;
2388
 
         int tag_closed = 0;
2389
 
 
2390
 
 
2391
 
 
2392
 
                axiom_namespace_t *ns1 = NULL;
2393
 
 
2394
 
                axis2_char_t *qname_uri = NULL;
2395
 
                axis2_char_t *qname_prefix = NULL;
2396
 
                axis2_char_t *p_prefix = NULL;
2397
 
                axis2_bool_t ns_already_defined;
2398
 
 
2399
 
               int i = 0;
2400
 
               int count = 0;
2401
 
               void *element = NULL;
2402
 
 
2403
 
                    axis2_char_t *text_value_1;
2404
 
                    axis2_char_t *text_value_1_temp;
2405
 
 
2406
 
                    axis2_char_t *text_value_2;
2407
 
                    axis2_char_t *text_value_2_temp;
2408
 
 
2409
 
                    axis2_char_t *text_value_3;
2410
 
                    axis2_char_t *text_value_3_temp;
2411
 
 
2412
 
                    axis2_char_t *text_value_4;
2413
 
                    axis2_char_t *text_value_4_temp;
2414
 
 
2415
 
                    axis2_char_t *text_value_5;
2416
 
                    axis2_char_t *text_value_5_temp;
2417
 
 
2418
 
                    axis2_char_t *text_value_6;
2419
 
                    axis2_char_t *text_value_6_temp;
2420
 
 
2421
 
                    axis2_char_t *text_value_7;
2422
 
                    axis2_char_t *text_value_7_temp;
2423
 
 
2424
 
                    axis2_char_t text_value_8[64];
2425
 
 
2426
 
                    axis2_char_t text_value_9[64];
2427
 
 
2428
 
                    axis2_char_t *text_value_10;
2429
 
                    axis2_char_t *text_value_10_temp;
2430
 
 
2431
 
                    axis2_char_t *text_value_11;
2432
 
                    axis2_char_t *text_value_11_temp;
2433
 
 
2434
 
                    axis2_char_t *text_value_12;
2435
 
                    axis2_char_t *text_value_12_temp;
2436
 
 
2437
 
                    axis2_char_t *text_value_13;
2438
 
                    axis2_char_t *text_value_13_temp;
2439
 
 
2440
 
                    axis2_char_t *text_value_14;
2441
 
                    axis2_char_t *text_value_14_temp;
2442
 
 
2443
 
                    axis2_char_t text_value_15[64];
2444
 
 
2445
 
                    axis2_char_t *text_value_16;
2446
 
                    axis2_char_t *text_value_16_temp;
2447
 
 
2448
 
               axis2_char_t *start_input_str = NULL;
2449
 
               axis2_char_t *end_input_str = NULL;
2450
 
               unsigned int start_input_str_len = 0;
2451
 
               unsigned int end_input_str_len = 0;
2452
 
 
2453
 
 
2454
 
               axiom_data_source_t *data_source = NULL;
2455
 
               axutil_stream_t *stream = NULL;
2456
 
 
2457
 
 
2458
 
 
2459
 
            AXIS2_ENV_CHECK(env, NULL);
2460
 
            AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
2461
 
 
2462
 
 
2463
 
                    current_node = parent;
2464
 
                    data_source = (axiom_data_source_t *)axiom_node_get_data_element(current_node, env);
2465
 
                    if (!data_source)
2466
 
                        return NULL;
2467
 
                    stream = axiom_data_source_get_stream(data_source, env); /* assume parent is of type data source */
2468
 
                    if (!stream)
2469
 
                        return NULL;
2470
 
 
2471
 
            if(!parent_tag_closed)
2472
 
            {
2473
 
 
2474
 
              string_to_stream = ">";
2475
 
              axutil_stream_write(stream, env, string_to_stream, axutil_strlen(string_to_stream));
2476
 
              tag_closed = 1;
2477
 
 
2478
 
            }
2479
 
 
2480
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
2481
 
                       {
2482
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
2483
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
2484
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
2485
 
 
2486
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
2487
 
                                            "http://eucalyptus.ucsb.edu/",
2488
 
                                            p_prefix));
2489
 
                       }
2490
 
 
2491
 
 
2492
 
                   if (!_instanceType->is_valid_reservationId)
2493
 
                   {
2494
 
 
2495
 
 
2496
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-nillable property reservationId");
2497
 
                            return NULL;
2498
 
 
2499
 
                   }
2500
 
                   else
2501
 
                   {
2502
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
2503
 
                                 (4 + axutil_strlen(p_prefix) +
2504
 
                                  axutil_strlen("reservationId")));
2505
 
 
2506
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
2507
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
2508
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("reservationId")));
2509
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
2510
 
 
2511
 
 
2512
 
 
2513
 
 
2514
 
 
2515
 
 
2516
 
                     /*
2517
 
                      * parsing reservationId element
2518
 
                      */
2519
 
 
2520
 
 
2521
 
 
2522
 
                            sprintf(start_input_str, "<%s%sreservationId>",
2523
 
                                 p_prefix?p_prefix:"",
2524
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
2525
 
 
2526
 
                        start_input_str_len = axutil_strlen(start_input_str);
2527
 
                        sprintf(end_input_str, "</%s%sreservationId>",
2528
 
                                 p_prefix?p_prefix:"",
2529
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
2530
 
                        end_input_str_len = axutil_strlen(end_input_str);
2531
 
 
2532
 
                           text_value_1 = _instanceType->property_reservationId;
2533
 
 
2534
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
2535
 
 
2536
 
 
2537
 
                           text_value_1_temp = axutil_xml_quote_string(env, text_value_1, AXIS2_TRUE);
2538
 
                           if (text_value_1_temp)
2539
 
                           {
2540
 
                               axutil_stream_write(stream, env, text_value_1_temp, axutil_strlen(text_value_1_temp));
2541
 
                               AXIS2_FREE(env->allocator, text_value_1_temp);
2542
 
                           }
2543
 
                           else
2544
 
                           {
2545
 
                               axutil_stream_write(stream, env, text_value_1, axutil_strlen(text_value_1));
2546
 
                           }
2547
 
 
2548
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
2549
 
 
2550
 
 
2551
 
                     AXIS2_FREE(env->allocator,start_input_str);
2552
 
                     AXIS2_FREE(env->allocator,end_input_str);
2553
 
                 }
2554
 
 
2555
 
 
2556
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
2557
 
                       {
2558
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
2559
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
2560
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
2561
 
 
2562
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
2563
 
                                            "http://eucalyptus.ucsb.edu/",
2564
 
                                            p_prefix));
2565
 
                       }
2566
 
 
2567
 
 
2568
 
                   if (!_instanceType->is_valid_instanceId)
2569
 
                   {
2570
 
 
2571
 
 
2572
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-nillable property instanceId");
2573
 
                            return NULL;
2574
 
 
2575
 
                   }
2576
 
                   else
2577
 
                   {
2578
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
2579
 
                                 (4 + axutil_strlen(p_prefix) +
2580
 
                                  axutil_strlen("instanceId")));
2581
 
 
2582
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
2583
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
2584
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("instanceId")));
2585
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
2586
 
 
2587
 
 
2588
 
 
2589
 
 
2590
 
 
2591
 
 
2592
 
                     /*
2593
 
                      * parsing instanceId element
2594
 
                      */
2595
 
 
2596
 
 
2597
 
 
2598
 
                            sprintf(start_input_str, "<%s%sinstanceId>",
2599
 
                                 p_prefix?p_prefix:"",
2600
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
2601
 
 
2602
 
                        start_input_str_len = axutil_strlen(start_input_str);
2603
 
                        sprintf(end_input_str, "</%s%sinstanceId>",
2604
 
                                 p_prefix?p_prefix:"",
2605
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
2606
 
                        end_input_str_len = axutil_strlen(end_input_str);
2607
 
 
2608
 
                           text_value_2 = _instanceType->property_instanceId;
2609
 
 
2610
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
2611
 
 
2612
 
 
2613
 
                           text_value_2_temp = axutil_xml_quote_string(env, text_value_2, AXIS2_TRUE);
2614
 
                           if (text_value_2_temp)
2615
 
                           {
2616
 
                               axutil_stream_write(stream, env, text_value_2_temp, axutil_strlen(text_value_2_temp));
2617
 
                               AXIS2_FREE(env->allocator, text_value_2_temp);
2618
 
                           }
2619
 
                           else
2620
 
                           {
2621
 
                               axutil_stream_write(stream, env, text_value_2, axutil_strlen(text_value_2));
2622
 
                           }
2623
 
 
2624
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
2625
 
 
2626
 
 
2627
 
                     AXIS2_FREE(env->allocator,start_input_str);
2628
 
                     AXIS2_FREE(env->allocator,end_input_str);
2629
 
                 }
2630
 
 
2631
 
 
2632
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
2633
 
                       {
2634
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
2635
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
2636
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
2637
 
 
2638
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
2639
 
                                            "http://eucalyptus.ucsb.edu/",
2640
 
                                            p_prefix));
2641
 
                       }
2642
 
 
2643
 
 
2644
 
                   if (!_instanceType->is_valid_imageId)
2645
 
                   {
2646
 
 
2647
 
 
2648
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-nillable property imageId");
2649
 
                            return NULL;
2650
 
 
2651
 
                   }
2652
 
                   else
2653
 
                   {
2654
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
2655
 
                                 (4 + axutil_strlen(p_prefix) +
2656
 
                                  axutil_strlen("imageId")));
2657
 
 
2658
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
2659
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
2660
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("imageId")));
2661
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
2662
 
 
2663
 
 
2664
 
 
2665
 
 
2666
 
 
2667
 
 
2668
 
                     /*
2669
 
                      * parsing imageId element
2670
 
                      */
2671
 
 
2672
 
 
2673
 
 
2674
 
                            sprintf(start_input_str, "<%s%simageId>",
2675
 
                                 p_prefix?p_prefix:"",
2676
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
2677
 
 
2678
 
                        start_input_str_len = axutil_strlen(start_input_str);
2679
 
                        sprintf(end_input_str, "</%s%simageId>",
2680
 
                                 p_prefix?p_prefix:"",
2681
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
2682
 
                        end_input_str_len = axutil_strlen(end_input_str);
2683
 
 
2684
 
                           text_value_3 = _instanceType->property_imageId;
2685
 
 
2686
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
2687
 
 
2688
 
 
2689
 
                           text_value_3_temp = axutil_xml_quote_string(env, text_value_3, AXIS2_TRUE);
2690
 
                           if (text_value_3_temp)
2691
 
                           {
2692
 
                               axutil_stream_write(stream, env, text_value_3_temp, axutil_strlen(text_value_3_temp));
2693
 
                               AXIS2_FREE(env->allocator, text_value_3_temp);
2694
 
                           }
2695
 
                           else
2696
 
                           {
2697
 
                               axutil_stream_write(stream, env, text_value_3, axutil_strlen(text_value_3));
2698
 
                           }
2699
 
 
2700
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
2701
 
 
2702
 
 
2703
 
                     AXIS2_FREE(env->allocator,start_input_str);
2704
 
                     AXIS2_FREE(env->allocator,end_input_str);
2705
 
                 }
2706
 
 
2707
 
 
2708
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
2709
 
                       {
2710
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
2711
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
2712
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
2713
 
 
2714
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
2715
 
                                            "http://eucalyptus.ucsb.edu/",
2716
 
                                            p_prefix));
2717
 
                       }
2718
 
 
2719
 
 
2720
 
                   if (!_instanceType->is_valid_kernelId)
2721
 
                   {
2722
 
 
2723
 
 
2724
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-nillable property kernelId");
2725
 
                            return NULL;
2726
 
 
2727
 
                   }
2728
 
                   else
2729
 
                   {
2730
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
2731
 
                                 (4 + axutil_strlen(p_prefix) +
2732
 
                                  axutil_strlen("kernelId")));
2733
 
 
2734
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
2735
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
2736
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("kernelId")));
2737
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
2738
 
 
2739
 
 
2740
 
 
2741
 
 
2742
 
 
2743
 
 
2744
 
                     /*
2745
 
                      * parsing kernelId element
2746
 
                      */
2747
 
 
2748
 
 
2749
 
 
2750
 
                            sprintf(start_input_str, "<%s%skernelId>",
2751
 
                                 p_prefix?p_prefix:"",
2752
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
2753
 
 
2754
 
                        start_input_str_len = axutil_strlen(start_input_str);
2755
 
                        sprintf(end_input_str, "</%s%skernelId>",
2756
 
                                 p_prefix?p_prefix:"",
2757
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
2758
 
                        end_input_str_len = axutil_strlen(end_input_str);
2759
 
 
2760
 
                           text_value_4 = _instanceType->property_kernelId;
2761
 
 
2762
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
2763
 
 
2764
 
 
2765
 
                           text_value_4_temp = axutil_xml_quote_string(env, text_value_4, AXIS2_TRUE);
2766
 
                           if (text_value_4_temp)
2767
 
                           {
2768
 
                               axutil_stream_write(stream, env, text_value_4_temp, axutil_strlen(text_value_4_temp));
2769
 
                               AXIS2_FREE(env->allocator, text_value_4_temp);
2770
 
                           }
2771
 
                           else
2772
 
                           {
2773
 
                               axutil_stream_write(stream, env, text_value_4, axutil_strlen(text_value_4));
2774
 
                           }
2775
 
 
2776
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
2777
 
 
2778
 
 
2779
 
                     AXIS2_FREE(env->allocator,start_input_str);
2780
 
                     AXIS2_FREE(env->allocator,end_input_str);
2781
 
                 }
2782
 
 
2783
 
 
2784
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
2785
 
                       {
2786
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
2787
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
2788
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
2789
 
 
2790
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
2791
 
                                            "http://eucalyptus.ucsb.edu/",
2792
 
                                            p_prefix));
2793
 
                       }
2794
 
 
2795
 
 
2796
 
                   if (!_instanceType->is_valid_ramdiskId)
2797
 
                   {
2798
 
 
2799
 
                           /* no need to complain for minoccurs=0 element */
2800
 
 
2801
 
 
2802
 
                   }
2803
 
                   else
2804
 
                   {
2805
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
2806
 
                                 (4 + axutil_strlen(p_prefix) +
2807
 
                                  axutil_strlen("ramdiskId")));
2808
 
 
2809
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
2810
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
2811
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("ramdiskId")));
2812
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
2813
 
 
2814
 
 
2815
 
 
2816
 
 
2817
 
 
2818
 
 
2819
 
                     /*
2820
 
                      * parsing ramdiskId element
2821
 
                      */
2822
 
 
2823
 
 
2824
 
 
2825
 
                            sprintf(start_input_str, "<%s%sramdiskId>",
2826
 
                                 p_prefix?p_prefix:"",
2827
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
2828
 
 
2829
 
                        start_input_str_len = axutil_strlen(start_input_str);
2830
 
                        sprintf(end_input_str, "</%s%sramdiskId>",
2831
 
                                 p_prefix?p_prefix:"",
2832
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
2833
 
                        end_input_str_len = axutil_strlen(end_input_str);
2834
 
 
2835
 
                           text_value_5 = _instanceType->property_ramdiskId;
2836
 
 
2837
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
2838
 
 
2839
 
 
2840
 
                           text_value_5_temp = axutil_xml_quote_string(env, text_value_5, AXIS2_TRUE);
2841
 
                           if (text_value_5_temp)
2842
 
                           {
2843
 
                               axutil_stream_write(stream, env, text_value_5_temp, axutil_strlen(text_value_5_temp));
2844
 
                               AXIS2_FREE(env->allocator, text_value_5_temp);
2845
 
                           }
2846
 
                           else
2847
 
                           {
2848
 
                               axutil_stream_write(stream, env, text_value_5, axutil_strlen(text_value_5));
2849
 
                           }
2850
 
 
2851
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
2852
 
 
2853
 
 
2854
 
                     AXIS2_FREE(env->allocator,start_input_str);
2855
 
                     AXIS2_FREE(env->allocator,end_input_str);
2856
 
                 }
2857
 
 
2858
 
 
2859
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
2860
 
                       {
2861
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
2862
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
2863
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
2864
 
 
2865
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
2866
 
                                            "http://eucalyptus.ucsb.edu/",
2867
 
                                            p_prefix));
2868
 
                       }
2869
 
 
2870
 
 
2871
 
                   if (!_instanceType->is_valid_userId)
2872
 
                   {
2873
 
 
2874
 
 
2875
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-nillable property userId");
2876
 
                            return NULL;
2877
 
 
2878
 
                   }
2879
 
                   else
2880
 
                   {
2881
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
2882
 
                                 (4 + axutil_strlen(p_prefix) +
2883
 
                                  axutil_strlen("userId")));
2884
 
 
2885
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
2886
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
2887
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("userId")));
2888
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
2889
 
 
2890
 
 
2891
 
 
2892
 
 
2893
 
 
2894
 
 
2895
 
                     /*
2896
 
                      * parsing userId element
2897
 
                      */
2898
 
 
2899
 
 
2900
 
 
2901
 
                            sprintf(start_input_str, "<%s%suserId>",
2902
 
                                 p_prefix?p_prefix:"",
2903
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
2904
 
 
2905
 
                        start_input_str_len = axutil_strlen(start_input_str);
2906
 
                        sprintf(end_input_str, "</%s%suserId>",
2907
 
                                 p_prefix?p_prefix:"",
2908
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
2909
 
                        end_input_str_len = axutil_strlen(end_input_str);
2910
 
 
2911
 
                           text_value_6 = _instanceType->property_userId;
2912
 
 
2913
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
2914
 
 
2915
 
 
2916
 
                           text_value_6_temp = axutil_xml_quote_string(env, text_value_6, AXIS2_TRUE);
2917
 
                           if (text_value_6_temp)
2918
 
                           {
2919
 
                               axutil_stream_write(stream, env, text_value_6_temp, axutil_strlen(text_value_6_temp));
2920
 
                               AXIS2_FREE(env->allocator, text_value_6_temp);
2921
 
                           }
2922
 
                           else
2923
 
                           {
2924
 
                               axutil_stream_write(stream, env, text_value_6, axutil_strlen(text_value_6));
2925
 
                           }
2926
 
 
2927
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
2928
 
 
2929
 
 
2930
 
                     AXIS2_FREE(env->allocator,start_input_str);
2931
 
                     AXIS2_FREE(env->allocator,end_input_str);
2932
 
                 }
2933
 
 
2934
 
 
2935
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
2936
 
                       {
2937
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
2938
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
2939
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
2940
 
 
2941
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
2942
 
                                            "http://eucalyptus.ucsb.edu/",
2943
 
                                            p_prefix));
2944
 
                       }
2945
 
 
2946
 
 
2947
 
                   if (!_instanceType->is_valid_keyName)
2948
 
                   {
2949
 
 
2950
 
 
2951
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-nillable property keyName");
2952
 
                            return NULL;
2953
 
 
2954
 
                   }
2955
 
                   else
2956
 
                   {
2957
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
2958
 
                                 (4 + axutil_strlen(p_prefix) +
2959
 
                                  axutil_strlen("keyName")));
2960
 
 
2961
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
2962
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
2963
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("keyName")));
2964
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
2965
 
 
2966
 
 
2967
 
 
2968
 
 
2969
 
 
2970
 
 
2971
 
                     /*
2972
 
                      * parsing keyName element
2973
 
                      */
2974
 
 
2975
 
 
2976
 
 
2977
 
                            sprintf(start_input_str, "<%s%skeyName>",
2978
 
                                 p_prefix?p_prefix:"",
2979
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
2980
 
 
2981
 
                        start_input_str_len = axutil_strlen(start_input_str);
2982
 
                        sprintf(end_input_str, "</%s%skeyName>",
2983
 
                                 p_prefix?p_prefix:"",
2984
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
2985
 
                        end_input_str_len = axutil_strlen(end_input_str);
2986
 
 
2987
 
                           text_value_7 = _instanceType->property_keyName;
2988
 
 
2989
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
2990
 
 
2991
 
 
2992
 
                           text_value_7_temp = axutil_xml_quote_string(env, text_value_7, AXIS2_TRUE);
2993
 
                           if (text_value_7_temp)
2994
 
                           {
2995
 
                               axutil_stream_write(stream, env, text_value_7_temp, axutil_strlen(text_value_7_temp));
2996
 
                               AXIS2_FREE(env->allocator, text_value_7_temp);
2997
 
                           }
2998
 
                           else
2999
 
                           {
3000
 
                               axutil_stream_write(stream, env, text_value_7, axutil_strlen(text_value_7));
3001
 
                           }
3002
 
 
3003
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
3004
 
 
3005
 
 
3006
 
                     AXIS2_FREE(env->allocator,start_input_str);
3007
 
                     AXIS2_FREE(env->allocator,end_input_str);
3008
 
                 }
3009
 
 
3010
 
 
3011
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
3012
 
                       {
3013
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
3014
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
3015
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
3016
 
 
3017
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
3018
 
                                            "http://eucalyptus.ucsb.edu/",
3019
 
                                            p_prefix));
3020
 
                       }
3021
 
 
3022
 
 
3023
 
                   if (!_instanceType->is_valid_instanceType)
3024
 
                   {
3025
 
 
3026
 
 
3027
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-nillable property instanceType");
3028
 
                            return NULL;
3029
 
 
3030
 
                   }
3031
 
                   else
3032
 
                   {
3033
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3034
 
                                 (4 + axutil_strlen(p_prefix) +
3035
 
                                  axutil_strlen("instanceType")));
3036
 
 
3037
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
3038
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3039
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("instanceType")));
3040
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
3041
 
 
3042
 
 
3043
 
 
3044
 
 
3045
 
 
3046
 
 
3047
 
                     /*
3048
 
                      * parsing instanceType element
3049
 
                      */
3050
 
 
3051
 
 
3052
 
 
3053
 
                            sprintf(start_input_str, "<%s%sinstanceType",
3054
 
                                 p_prefix?p_prefix:"",
3055
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3056
 
 
3057
 
                        start_input_str_len = axutil_strlen(start_input_str);
3058
 
                        sprintf(end_input_str, "</%s%sinstanceType>",
3059
 
                                 p_prefix?p_prefix:"",
3060
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3061
 
                        end_input_str_len = axutil_strlen(end_input_str);
3062
 
 
3063
 
                            if(!adb_virtualMachineType_is_particle())
3064
 
                            {
3065
 
                                axutil_stream_write(stream, env, start_input_str, start_input_str_len);
3066
 
                            }
3067
 
 
3068
 
                            adb_virtualMachineType_serialize(_instanceType->property_instanceType,
3069
 
                                                                                 env, current_node, parent_element,
3070
 
                                                                                 adb_virtualMachineType_is_particle() || AXIS2_FALSE, namespaces, next_ns_index);
3071
 
 
3072
 
                            if(!adb_virtualMachineType_is_particle())
3073
 
                            {
3074
 
                                axutil_stream_write(stream, env, end_input_str, end_input_str_len);
3075
 
                            }
3076
 
 
3077
 
 
3078
 
                     AXIS2_FREE(env->allocator,start_input_str);
3079
 
                     AXIS2_FREE(env->allocator,end_input_str);
3080
 
                 }
3081
 
 
3082
 
 
3083
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
3084
 
                       {
3085
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
3086
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
3087
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
3088
 
 
3089
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
3090
 
                                            "http://eucalyptus.ucsb.edu/",
3091
 
                                            p_prefix));
3092
 
                       }
3093
 
 
3094
 
 
3095
 
                   if (!_instanceType->is_valid_netParams)
3096
 
                   {
3097
 
 
3098
 
                           /* no need to complain for minoccurs=0 element */
3099
 
 
3100
 
 
3101
 
                   }
3102
 
                   else
3103
 
                   {
3104
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3105
 
                                 (4 + axutil_strlen(p_prefix) +
3106
 
                                  axutil_strlen("netParams")));
3107
 
 
3108
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
3109
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3110
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("netParams")));
3111
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
3112
 
 
3113
 
 
3114
 
 
3115
 
 
3116
 
 
3117
 
 
3118
 
                     /*
3119
 
                      * parsing netParams element
3120
 
                      */
3121
 
 
3122
 
 
3123
 
 
3124
 
                            sprintf(start_input_str, "<%s%snetParams",
3125
 
                                 p_prefix?p_prefix:"",
3126
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3127
 
 
3128
 
                        start_input_str_len = axutil_strlen(start_input_str);
3129
 
                        sprintf(end_input_str, "</%s%snetParams>",
3130
 
                                 p_prefix?p_prefix:"",
3131
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3132
 
                        end_input_str_len = axutil_strlen(end_input_str);
3133
 
 
3134
 
                            if(!adb_netConfigType_is_particle())
3135
 
                            {
3136
 
                                axutil_stream_write(stream, env, start_input_str, start_input_str_len);
3137
 
                            }
3138
 
 
3139
 
                            adb_netConfigType_serialize(_instanceType->property_netParams,
3140
 
                                                                                 env, current_node, parent_element,
3141
 
                                                                                 adb_netConfigType_is_particle() || AXIS2_FALSE, namespaces, next_ns_index);
3142
 
 
3143
 
                            if(!adb_netConfigType_is_particle())
3144
 
                            {
3145
 
                                axutil_stream_write(stream, env, end_input_str, end_input_str_len);
3146
 
                            }
3147
 
 
3148
 
 
3149
 
                     AXIS2_FREE(env->allocator,start_input_str);
3150
 
                     AXIS2_FREE(env->allocator,end_input_str);
3151
 
                 }
3152
 
 
3153
 
 
3154
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
3155
 
                       {
3156
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
3157
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
3158
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
3159
 
 
3160
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
3161
 
                                            "http://eucalyptus.ucsb.edu/",
3162
 
                                            p_prefix));
3163
 
                       }
3164
 
 
3165
 
 
3166
 
                   if (!_instanceType->is_valid_stateName)
3167
 
                   {
3168
 
 
3169
 
 
3170
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Nil value found in non-nillable property stateName");
3171
 
                            return NULL;
3172
 
 
3173
 
                   }
3174
 
                   else
3175
 
                   {
3176
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3177
 
                                 (4 + axutil_strlen(p_prefix) +
3178
 
                                  axutil_strlen("stateName")));
3179
 
 
3180
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
3181
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3182
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("stateName")));
3183
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
3184
 
 
3185
 
 
3186
 
 
3187
 
 
3188
 
 
3189
 
 
3190
 
                     /*
3191
 
                      * parsing stateName element
3192
 
                      */
3193
 
 
3194
 
 
3195
 
 
3196
 
                            sprintf(start_input_str, "<%s%sstateName>",
3197
 
                                 p_prefix?p_prefix:"",
3198
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3199
 
 
3200
 
                        start_input_str_len = axutil_strlen(start_input_str);
3201
 
                        sprintf(end_input_str, "</%s%sstateName>",
3202
 
                                 p_prefix?p_prefix:"",
3203
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3204
 
                        end_input_str_len = axutil_strlen(end_input_str);
3205
 
 
3206
 
                           text_value_10 = _instanceType->property_stateName;
3207
 
 
3208
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
3209
 
 
3210
 
 
3211
 
                           text_value_10_temp = axutil_xml_quote_string(env, text_value_10, AXIS2_TRUE);
3212
 
                           if (text_value_10_temp)
3213
 
                           {
3214
 
                               axutil_stream_write(stream, env, text_value_10_temp, axutil_strlen(text_value_10_temp));
3215
 
                               AXIS2_FREE(env->allocator, text_value_10_temp);
3216
 
                           }
3217
 
                           else
3218
 
                           {
3219
 
                               axutil_stream_write(stream, env, text_value_10, axutil_strlen(text_value_10));
3220
 
                           }
3221
 
 
3222
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
3223
 
 
3224
 
 
3225
 
                     AXIS2_FREE(env->allocator,start_input_str);
3226
 
                     AXIS2_FREE(env->allocator,end_input_str);
3227
 
                 }
3228
 
 
3229
 
 
3230
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
3231
 
                       {
3232
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
3233
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
3234
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
3235
 
 
3236
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
3237
 
                                            "http://eucalyptus.ucsb.edu/",
3238
 
                                            p_prefix));
3239
 
                       }
3240
 
 
3241
 
 
3242
 
                   if (!_instanceType->is_valid_launchTime)
3243
 
                   {
3244
 
 
3245
 
                           /* no need to complain for minoccurs=0 element */
3246
 
 
3247
 
 
3248
 
                   }
3249
 
                   else
3250
 
                   {
3251
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3252
 
                                 (4 + axutil_strlen(p_prefix) +
3253
 
                                  axutil_strlen("launchTime")));
3254
 
 
3255
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
3256
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3257
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("launchTime")));
3258
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
3259
 
 
3260
 
 
3261
 
 
3262
 
 
3263
 
 
3264
 
 
3265
 
                     /*
3266
 
                      * parsing launchTime element
3267
 
                      */
3268
 
 
3269
 
 
3270
 
 
3271
 
                            sprintf(start_input_str, "<%s%slaunchTime>",
3272
 
                                 p_prefix?p_prefix:"",
3273
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3274
 
 
3275
 
                        start_input_str_len = axutil_strlen(start_input_str);
3276
 
                        sprintf(end_input_str, "</%s%slaunchTime>",
3277
 
                                 p_prefix?p_prefix:"",
3278
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3279
 
                        end_input_str_len = axutil_strlen(end_input_str);
3280
 
 
3281
 
                          text_value_11 = axutil_date_time_serialize_date_time(_instanceType->property_launchTime, env);
3282
 
 
3283
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
3284
 
 
3285
 
                           axutil_stream_write(stream, env, text_value_11, axutil_strlen(text_value_11));
3286
 
 
3287
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
3288
 
 
3289
 
 
3290
 
                     AXIS2_FREE(env->allocator,start_input_str);
3291
 
                     AXIS2_FREE(env->allocator,end_input_str);
3292
 
                 }
3293
 
 
3294
 
 
3295
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
3296
 
                       {
3297
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
3298
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
3299
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
3300
 
 
3301
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
3302
 
                                            "http://eucalyptus.ucsb.edu/",
3303
 
                                            p_prefix));
3304
 
                       }
3305
 
 
3306
 
 
3307
 
                   if (!_instanceType->is_valid_userData)
3308
 
                   {
3309
 
 
3310
 
                           /* no need to complain for minoccurs=0 element */
3311
 
 
3312
 
 
3313
 
                   }
3314
 
                   else
3315
 
                   {
3316
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3317
 
                                 (4 + axutil_strlen(p_prefix) +
3318
 
                                  axutil_strlen("userData")));
3319
 
 
3320
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
3321
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3322
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("userData")));
3323
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
3324
 
 
3325
 
 
3326
 
 
3327
 
 
3328
 
 
3329
 
 
3330
 
                     /*
3331
 
                      * parsing userData element
3332
 
                      */
3333
 
 
3334
 
 
3335
 
 
3336
 
                            sprintf(start_input_str, "<%s%suserData>",
3337
 
                                 p_prefix?p_prefix:"",
3338
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3339
 
 
3340
 
                        start_input_str_len = axutil_strlen(start_input_str);
3341
 
                        sprintf(end_input_str, "</%s%suserData>",
3342
 
                                 p_prefix?p_prefix:"",
3343
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3344
 
                        end_input_str_len = axutil_strlen(end_input_str);
3345
 
 
3346
 
                           text_value_12 = _instanceType->property_userData;
3347
 
 
3348
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
3349
 
 
3350
 
 
3351
 
                           text_value_12_temp = axutil_xml_quote_string(env, text_value_12, AXIS2_TRUE);
3352
 
                           if (text_value_12_temp)
3353
 
                           {
3354
 
                               axutil_stream_write(stream, env, text_value_12_temp, axutil_strlen(text_value_12_temp));
3355
 
                               AXIS2_FREE(env->allocator, text_value_12_temp);
3356
 
                           }
3357
 
                           else
3358
 
                           {
3359
 
                               axutil_stream_write(stream, env, text_value_12, axutil_strlen(text_value_12));
3360
 
                           }
3361
 
 
3362
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
3363
 
 
3364
 
 
3365
 
                     AXIS2_FREE(env->allocator,start_input_str);
3366
 
                     AXIS2_FREE(env->allocator,end_input_str);
3367
 
                 }
3368
 
 
3369
 
 
3370
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
3371
 
                       {
3372
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
3373
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
3374
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
3375
 
 
3376
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
3377
 
                                            "http://eucalyptus.ucsb.edu/",
3378
 
                                            p_prefix));
3379
 
                       }
3380
 
 
3381
 
 
3382
 
                   if (!_instanceType->is_valid_launchIndex)
3383
 
                   {
3384
 
 
3385
 
                           /* no need to complain for minoccurs=0 element */
3386
 
 
3387
 
 
3388
 
                   }
3389
 
                   else
3390
 
                   {
3391
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3392
 
                                 (4 + axutil_strlen(p_prefix) +
3393
 
                                  axutil_strlen("launchIndex")));
3394
 
 
3395
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
3396
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3397
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("launchIndex")));
3398
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
3399
 
 
3400
 
 
3401
 
 
3402
 
 
3403
 
 
3404
 
 
3405
 
                     /*
3406
 
                      * parsing launchIndex element
3407
 
                      */
3408
 
 
3409
 
 
3410
 
 
3411
 
                            sprintf(start_input_str, "<%s%slaunchIndex>",
3412
 
                                 p_prefix?p_prefix:"",
3413
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3414
 
 
3415
 
                        start_input_str_len = axutil_strlen(start_input_str);
3416
 
                        sprintf(end_input_str, "</%s%slaunchIndex>",
3417
 
                                 p_prefix?p_prefix:"",
3418
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3419
 
                        end_input_str_len = axutil_strlen(end_input_str);
3420
 
 
3421
 
                           text_value_13 = _instanceType->property_launchIndex;
3422
 
 
3423
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
3424
 
 
3425
 
 
3426
 
                           text_value_13_temp = axutil_xml_quote_string(env, text_value_13, AXIS2_TRUE);
3427
 
                           if (text_value_13_temp)
3428
 
                           {
3429
 
                               axutil_stream_write(stream, env, text_value_13_temp, axutil_strlen(text_value_13_temp));
3430
 
                               AXIS2_FREE(env->allocator, text_value_13_temp);
3431
 
                           }
3432
 
                           else
3433
 
                           {
3434
 
                               axutil_stream_write(stream, env, text_value_13, axutil_strlen(text_value_13));
3435
 
                           }
3436
 
 
3437
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
3438
 
 
3439
 
 
3440
 
                     AXIS2_FREE(env->allocator,start_input_str);
3441
 
                     AXIS2_FREE(env->allocator,end_input_str);
3442
 
                 }
3443
 
 
3444
 
 
3445
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
3446
 
                       {
3447
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
3448
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
3449
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
3450
 
 
3451
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
3452
 
                                            "http://eucalyptus.ucsb.edu/",
3453
 
                                            p_prefix));
3454
 
                       }
3455
 
 
3456
 
 
3457
 
                   if (!_instanceType->is_valid_groupNames)
3458
 
                   {
3459
 
 
3460
 
                           /* no need to complain for minoccurs=0 element */
3461
 
 
3462
 
 
3463
 
                   }
3464
 
                   else
3465
 
                   {
3466
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3467
 
                                 (4 + axutil_strlen(p_prefix) +
3468
 
                                  axutil_strlen("groupNames")));
3469
 
 
3470
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
3471
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3472
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("groupNames")));
3473
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
3474
 
 
3475
 
 
3476
 
 
3477
 
 
3478
 
 
3479
 
                     /*
3480
 
                      * Parsing groupNames array
3481
 
                      */
3482
 
                     if (_instanceType->property_groupNames != NULL)
3483
 
                     {
3484
 
 
3485
 
                            sprintf(start_input_str, "<%s%sgroupNames>",
3486
 
                                 p_prefix?p_prefix:"",
3487
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3488
 
 
3489
 
                         start_input_str_len = axutil_strlen(start_input_str);
3490
 
 
3491
 
                         sprintf(end_input_str, "</%s%sgroupNames>",
3492
 
                                 p_prefix?p_prefix:"",
3493
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3494
 
                         end_input_str_len = axutil_strlen(end_input_str);
3495
 
 
3496
 
                         count = axutil_array_list_size(_instanceType->property_groupNames, env);
3497
 
                         for(i = 0; i < count; i ++)
3498
 
                         {
3499
 
                            element = axutil_array_list_get(_instanceType->property_groupNames, env, i);
3500
 
 
3501
 
                            if(NULL == element)
3502
 
                            {
3503
 
                                continue;
3504
 
                            }
3505
 
 
3506
 
 
3507
 
                     /*
3508
 
                      * parsing groupNames element
3509
 
                      */
3510
 
 
3511
 
 
3512
 
 
3513
 
                           text_value_14 = (axis2_char_t*)element;
3514
 
 
3515
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
3516
 
 
3517
 
 
3518
 
                           text_value_14_temp = axutil_xml_quote_string(env, text_value_14, AXIS2_TRUE);
3519
 
                           if (text_value_14_temp)
3520
 
                           {
3521
 
                               axutil_stream_write(stream, env, text_value_14_temp, axutil_strlen(text_value_14_temp));
3522
 
                               AXIS2_FREE(env->allocator, text_value_14_temp);
3523
 
                           }
3524
 
                           else
3525
 
                           {
3526
 
                               axutil_stream_write(stream, env, text_value_14, axutil_strlen(text_value_14));
3527
 
                           }
3528
 
 
3529
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
3530
 
 
3531
 
                         }
3532
 
                     }
3533
 
 
3534
 
 
3535
 
                     AXIS2_FREE(env->allocator,start_input_str);
3536
 
                     AXIS2_FREE(env->allocator,end_input_str);
3537
 
                 }
3538
 
 
3539
 
 
3540
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
3541
 
                       {
3542
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
3543
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
3544
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
3545
 
 
3546
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
3547
 
                                            "http://eucalyptus.ucsb.edu/",
3548
 
                                            p_prefix));
3549
 
                       }
3550
 
 
3551
 
 
3552
 
                   if (!_instanceType->is_valid_volumes)
3553
 
                   {
3554
 
 
3555
 
                           /* no need to complain for minoccurs=0 element */
3556
 
 
3557
 
 
3558
 
                   }
3559
 
                   else
3560
 
                   {
3561
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3562
 
                                 (4 + axutil_strlen(p_prefix) +
3563
 
                                  axutil_strlen("volumes")));
3564
 
 
3565
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
3566
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3567
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("volumes")));
3568
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
3569
 
 
3570
 
 
3571
 
 
3572
 
 
3573
 
 
3574
 
                     /*
3575
 
                      * Parsing volumes array
3576
 
                      */
3577
 
                     if (_instanceType->property_volumes != NULL)
3578
 
                     {
3579
 
 
3580
 
 
3581
 
                            sprintf(start_input_str, "<%s%svolumes",
3582
 
                                 p_prefix?p_prefix:"",
3583
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3584
 
 
3585
 
                         start_input_str_len = axutil_strlen(start_input_str);
3586
 
 
3587
 
                         sprintf(end_input_str, "</%s%svolumes>",
3588
 
                                 p_prefix?p_prefix:"",
3589
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3590
 
                         end_input_str_len = axutil_strlen(end_input_str);
3591
 
 
3592
 
                         count = axutil_array_list_size(_instanceType->property_volumes, env);
3593
 
                         for(i = 0; i < count; i ++)
3594
 
                         {
3595
 
                            element = axutil_array_list_get(_instanceType->property_volumes, env, i);
3596
 
 
3597
 
                            if(NULL == element)
3598
 
                            {
3599
 
                                continue;
3600
 
                            }
3601
 
 
3602
 
 
3603
 
                     /*
3604
 
                      * parsing volumes element
3605
 
                      */
3606
 
 
3607
 
 
3608
 
 
3609
 
                            if(!adb_volumeType_is_particle())
3610
 
                            {
3611
 
                                axutil_stream_write(stream, env, start_input_str, start_input_str_len);
3612
 
                            }
3613
 
 
3614
 
                            adb_volumeType_serialize((adb_volumeType_t*)element,
3615
 
                                                                                 env, current_node, parent_element,
3616
 
                                                                                 adb_volumeType_is_particle() || AXIS2_FALSE, namespaces, next_ns_index);
3617
 
 
3618
 
                            if(!adb_volumeType_is_particle())
3619
 
                            {
3620
 
                                axutil_stream_write(stream, env, end_input_str, end_input_str_len);
3621
 
                            }
3622
 
 
3623
 
                         }
3624
 
                     }
3625
 
 
3626
 
 
3627
 
                     AXIS2_FREE(env->allocator,start_input_str);
3628
 
                     AXIS2_FREE(env->allocator,end_input_str);
3629
 
                 }
3630
 
 
3631
 
 
3632
 
                       if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
3633
 
                       {
3634
 
                           p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
3635
 
                           sprintf(p_prefix, "n%d", (*next_ns_index)++);
3636
 
                           axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
3637
 
 
3638
 
                           axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
3639
 
                                            "http://eucalyptus.ucsb.edu/",
3640
 
                                            p_prefix));
3641
 
                       }
3642
 
 
3643
 
 
3644
 
                   if (!_instanceType->is_valid_serviceTag)
3645
 
                   {
3646
 
 
3647
 
                           /* no need to complain for minoccurs=0 element */
3648
 
 
3649
 
 
3650
 
                   }
3651
 
                   else
3652
 
                   {
3653
 
                     start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3654
 
                                 (4 + axutil_strlen(p_prefix) +
3655
 
                                  axutil_strlen("serviceTag")));
3656
 
 
3657
 
                                 /* axutil_strlen("<:>") + 1 = 4 */
3658
 
                     end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
3659
 
                                 (5 + axutil_strlen(p_prefix) + axutil_strlen("serviceTag")));
3660
 
                                  /* axutil_strlen("</:>") + 1 = 5 */
3661
 
 
3662
 
 
3663
 
 
3664
 
 
3665
 
 
3666
 
 
3667
 
                     /*
3668
 
                      * parsing serviceTag element
3669
 
                      */
3670
 
 
3671
 
 
3672
 
 
3673
 
                            sprintf(start_input_str, "<%s%sserviceTag>",
3674
 
                                 p_prefix?p_prefix:"",
3675
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3676
 
 
3677
 
                        start_input_str_len = axutil_strlen(start_input_str);
3678
 
                        sprintf(end_input_str, "</%s%sserviceTag>",
3679
 
                                 p_prefix?p_prefix:"",
3680
 
                                 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
3681
 
                        end_input_str_len = axutil_strlen(end_input_str);
3682
 
 
3683
 
                           text_value_16 = _instanceType->property_serviceTag;
3684
 
 
3685
 
                           axutil_stream_write(stream, env, start_input_str, start_input_str_len);
3686
 
 
3687
 
 
3688
 
                           text_value_16_temp = axutil_xml_quote_string(env, text_value_16, AXIS2_TRUE);
3689
 
                           if (text_value_16_temp)
3690
 
                           {
3691
 
                               axutil_stream_write(stream, env, text_value_16_temp, axutil_strlen(text_value_16_temp));
3692
 
                               AXIS2_FREE(env->allocator, text_value_16_temp);
3693
 
                           }
3694
 
                           else
3695
 
                           {
3696
 
                               axutil_stream_write(stream, env, text_value_16, axutil_strlen(text_value_16));
3697
 
                           }
3698
 
 
3699
 
                           axutil_stream_write(stream, env, end_input_str, end_input_str_len);
3700
 
 
3701
 
 
3702
 
                     AXIS2_FREE(env->allocator,start_input_str);
3703
 
                     AXIS2_FREE(env->allocator,end_input_str);
3704
 
                 }
3705
 
 
3706
 
 
3707
 
 
3708
 
            return parent;
3709
 
        }
3710
 
 
3711
 
 
3712
 
 
3713
 
 
3714
 
            /**
3715
 
             * getter for reservationId.
3716
 
             */
3717
 
            axis2_char_t* AXIS2_CALL
3718
 
            adb_instanceType_get_reservationId(
3719
 
                    adb_instanceType_t* _instanceType,
3720
 
                    const axutil_env_t *env)
3721
 
             {
3722
 
 
3723
 
                    AXIS2_ENV_CHECK(env, NULL);
3724
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
3725
 
 
3726
 
 
3727
 
                return _instanceType->property_reservationId;
3728
 
             }
3729
 
 
3730
 
            /**
3731
 
             * setter for reservationId
3732
 
             */
3733
 
            axis2_status_t AXIS2_CALL
3734
 
            adb_instanceType_set_reservationId(
3735
 
                    adb_instanceType_t* _instanceType,
3736
 
                    const axutil_env_t *env,
3737
 
                    const axis2_char_t*  arg_reservationId)
3738
 
             {
3739
 
 
3740
 
 
3741
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
3742
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
3743
 
 
3744
 
                if(_instanceType->is_valid_reservationId &&
3745
 
                        arg_reservationId == _instanceType->property_reservationId)
3746
 
                {
3747
 
 
3748
 
                    return AXIS2_SUCCESS;
3749
 
                }
3750
 
 
3751
 
 
3752
 
                  if(NULL == arg_reservationId)
3753
 
                  {
3754
 
                      AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "reservationId is being set to NULL, but it is not a nullable element");
3755
 
                      return AXIS2_FAILURE;
3756
 
                  }
3757
 
                adb_instanceType_reset_reservationId(_instanceType, env);
3758
 
 
3759
 
 
3760
 
                if(NULL == arg_reservationId)
3761
 
                {
3762
 
                    /* We are already done */
3763
 
                    return AXIS2_SUCCESS;
3764
 
                }
3765
 
                _instanceType->property_reservationId = (axis2_char_t *)axutil_strdup(env, arg_reservationId);
3766
 
                        if(NULL == _instanceType->property_reservationId)
3767
 
                        {
3768
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for reservationId");
3769
 
                            return AXIS2_FAILURE;
3770
 
                        }
3771
 
                        _instanceType->is_valid_reservationId = AXIS2_TRUE;
3772
 
 
3773
 
                return AXIS2_SUCCESS;
3774
 
             }
3775
 
 
3776
 
 
3777
 
 
3778
 
           /**
3779
 
            * resetter for reservationId
3780
 
            */
3781
 
           axis2_status_t AXIS2_CALL
3782
 
           adb_instanceType_reset_reservationId(
3783
 
                   adb_instanceType_t* _instanceType,
3784
 
                   const axutil_env_t *env)
3785
 
           {
3786
 
               int i = 0;
3787
 
               int count = 0;
3788
 
               void *element = NULL;
3789
 
 
3790
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
3791
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
3792
 
 
3793
 
 
3794
 
 
3795
 
 
3796
 
 
3797
 
                if(_instanceType->property_reservationId != NULL)
3798
 
                {
3799
 
 
3800
 
 
3801
 
                        AXIS2_FREE(env-> allocator, _instanceType->property_reservationId);
3802
 
                     _instanceType->property_reservationId = NULL;
3803
 
                }
3804
 
 
3805
 
 
3806
 
 
3807
 
                _instanceType->is_valid_reservationId = AXIS2_FALSE;
3808
 
               return AXIS2_SUCCESS;
3809
 
           }
3810
 
 
3811
 
           /**
3812
 
            * Check whether reservationId is nill
3813
 
            */
3814
 
           axis2_bool_t AXIS2_CALL
3815
 
           adb_instanceType_is_reservationId_nil(
3816
 
                   adb_instanceType_t* _instanceType,
3817
 
                   const axutil_env_t *env)
3818
 
           {
3819
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
3820
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
3821
 
 
3822
 
               return !_instanceType->is_valid_reservationId;
3823
 
           }
3824
 
 
3825
 
           /**
3826
 
            * Set reservationId to nill (currently the same as reset)
3827
 
            */
3828
 
           axis2_status_t AXIS2_CALL
3829
 
           adb_instanceType_set_reservationId_nil(
3830
 
                   adb_instanceType_t* _instanceType,
3831
 
                   const axutil_env_t *env)
3832
 
           {
3833
 
               return adb_instanceType_reset_reservationId(_instanceType, env);
3834
 
           }
3835
 
 
3836
 
 
3837
 
 
3838
 
            /**
3839
 
             * getter for instanceId.
3840
 
             */
3841
 
            axis2_char_t* AXIS2_CALL
3842
 
            adb_instanceType_get_instanceId(
3843
 
                    adb_instanceType_t* _instanceType,
3844
 
                    const axutil_env_t *env)
3845
 
             {
3846
 
 
3847
 
                    AXIS2_ENV_CHECK(env, NULL);
3848
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
3849
 
 
3850
 
 
3851
 
                return _instanceType->property_instanceId;
3852
 
             }
3853
 
 
3854
 
            /**
3855
 
             * setter for instanceId
3856
 
             */
3857
 
            axis2_status_t AXIS2_CALL
3858
 
            adb_instanceType_set_instanceId(
3859
 
                    adb_instanceType_t* _instanceType,
3860
 
                    const axutil_env_t *env,
3861
 
                    const axis2_char_t*  arg_instanceId)
3862
 
             {
3863
 
 
3864
 
 
3865
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
3866
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
3867
 
 
3868
 
                if(_instanceType->is_valid_instanceId &&
3869
 
                        arg_instanceId == _instanceType->property_instanceId)
3870
 
                {
3871
 
 
3872
 
                    return AXIS2_SUCCESS;
3873
 
                }
3874
 
 
3875
 
 
3876
 
                  if(NULL == arg_instanceId)
3877
 
                  {
3878
 
                      AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "instanceId is being set to NULL, but it is not a nullable element");
3879
 
                      return AXIS2_FAILURE;
3880
 
                  }
3881
 
                adb_instanceType_reset_instanceId(_instanceType, env);
3882
 
 
3883
 
 
3884
 
                if(NULL == arg_instanceId)
3885
 
                {
3886
 
                    /* We are already done */
3887
 
                    return AXIS2_SUCCESS;
3888
 
                }
3889
 
                _instanceType->property_instanceId = (axis2_char_t *)axutil_strdup(env, arg_instanceId);
3890
 
                        if(NULL == _instanceType->property_instanceId)
3891
 
                        {
3892
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for instanceId");
3893
 
                            return AXIS2_FAILURE;
3894
 
                        }
3895
 
                        _instanceType->is_valid_instanceId = AXIS2_TRUE;
3896
 
 
3897
 
                return AXIS2_SUCCESS;
3898
 
             }
3899
 
 
3900
 
 
3901
 
 
3902
 
           /**
3903
 
            * resetter for instanceId
3904
 
            */
3905
 
           axis2_status_t AXIS2_CALL
3906
 
           adb_instanceType_reset_instanceId(
3907
 
                   adb_instanceType_t* _instanceType,
3908
 
                   const axutil_env_t *env)
3909
 
           {
3910
 
               int i = 0;
3911
 
               int count = 0;
3912
 
               void *element = NULL;
3913
 
 
3914
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
3915
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
3916
 
 
3917
 
 
3918
 
 
3919
 
 
3920
 
 
3921
 
                if(_instanceType->property_instanceId != NULL)
3922
 
                {
3923
 
 
3924
 
 
3925
 
                        AXIS2_FREE(env-> allocator, _instanceType->property_instanceId);
3926
 
                     _instanceType->property_instanceId = NULL;
3927
 
                }
3928
 
 
3929
 
 
3930
 
 
3931
 
                _instanceType->is_valid_instanceId = AXIS2_FALSE;
3932
 
               return AXIS2_SUCCESS;
3933
 
           }
3934
 
 
3935
 
           /**
3936
 
            * Check whether instanceId is nill
3937
 
            */
3938
 
           axis2_bool_t AXIS2_CALL
3939
 
           adb_instanceType_is_instanceId_nil(
3940
 
                   adb_instanceType_t* _instanceType,
3941
 
                   const axutil_env_t *env)
3942
 
           {
3943
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
3944
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
3945
 
 
3946
 
               return !_instanceType->is_valid_instanceId;
3947
 
           }
3948
 
 
3949
 
           /**
3950
 
            * Set instanceId to nill (currently the same as reset)
3951
 
            */
3952
 
           axis2_status_t AXIS2_CALL
3953
 
           adb_instanceType_set_instanceId_nil(
3954
 
                   adb_instanceType_t* _instanceType,
3955
 
                   const axutil_env_t *env)
3956
 
           {
3957
 
               return adb_instanceType_reset_instanceId(_instanceType, env);
3958
 
           }
3959
 
 
3960
 
 
3961
 
 
3962
 
            /**
3963
 
             * getter for imageId.
3964
 
             */
3965
 
            axis2_char_t* AXIS2_CALL
3966
 
            adb_instanceType_get_imageId(
3967
 
                    adb_instanceType_t* _instanceType,
3968
 
                    const axutil_env_t *env)
3969
 
             {
3970
 
 
3971
 
                    AXIS2_ENV_CHECK(env, NULL);
3972
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
3973
 
 
3974
 
 
3975
 
                return _instanceType->property_imageId;
3976
 
             }
3977
 
 
3978
 
            /**
3979
 
             * setter for imageId
3980
 
             */
3981
 
            axis2_status_t AXIS2_CALL
3982
 
            adb_instanceType_set_imageId(
3983
 
                    adb_instanceType_t* _instanceType,
3984
 
                    const axutil_env_t *env,
3985
 
                    const axis2_char_t*  arg_imageId)
3986
 
             {
3987
 
 
3988
 
 
3989
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
3990
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
3991
 
 
3992
 
                if(_instanceType->is_valid_imageId &&
3993
 
                        arg_imageId == _instanceType->property_imageId)
3994
 
                {
3995
 
 
3996
 
                    return AXIS2_SUCCESS;
3997
 
                }
3998
 
 
3999
 
 
4000
 
                  if(NULL == arg_imageId)
4001
 
                  {
4002
 
                      AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "imageId is being set to NULL, but it is not a nullable element");
4003
 
                      return AXIS2_FAILURE;
4004
 
                  }
4005
 
                adb_instanceType_reset_imageId(_instanceType, env);
4006
 
 
4007
 
 
4008
 
                if(NULL == arg_imageId)
4009
 
                {
4010
 
                    /* We are already done */
4011
 
                    return AXIS2_SUCCESS;
4012
 
                }
4013
 
                _instanceType->property_imageId = (axis2_char_t *)axutil_strdup(env, arg_imageId);
4014
 
                        if(NULL == _instanceType->property_imageId)
4015
 
                        {
4016
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for imageId");
4017
 
                            return AXIS2_FAILURE;
4018
 
                        }
4019
 
                        _instanceType->is_valid_imageId = AXIS2_TRUE;
4020
 
 
4021
 
                return AXIS2_SUCCESS;
4022
 
             }
4023
 
 
4024
 
 
4025
 
 
4026
 
           /**
4027
 
            * resetter for imageId
4028
 
            */
4029
 
           axis2_status_t AXIS2_CALL
4030
 
           adb_instanceType_reset_imageId(
4031
 
                   adb_instanceType_t* _instanceType,
4032
 
                   const axutil_env_t *env)
4033
 
           {
4034
 
               int i = 0;
4035
 
               int count = 0;
4036
 
               void *element = NULL;
4037
 
 
4038
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4039
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4040
 
 
4041
 
 
4042
 
 
4043
 
 
4044
 
 
4045
 
                if(_instanceType->property_imageId != NULL)
4046
 
                {
4047
 
 
4048
 
 
4049
 
                        AXIS2_FREE(env-> allocator, _instanceType->property_imageId);
4050
 
                     _instanceType->property_imageId = NULL;
4051
 
                }
4052
 
 
4053
 
 
4054
 
 
4055
 
                _instanceType->is_valid_imageId = AXIS2_FALSE;
4056
 
               return AXIS2_SUCCESS;
4057
 
           }
4058
 
 
4059
 
           /**
4060
 
            * Check whether imageId is nill
4061
 
            */
4062
 
           axis2_bool_t AXIS2_CALL
4063
 
           adb_instanceType_is_imageId_nil(
4064
 
                   adb_instanceType_t* _instanceType,
4065
 
                   const axutil_env_t *env)
4066
 
           {
4067
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
4068
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
4069
 
 
4070
 
               return !_instanceType->is_valid_imageId;
4071
 
           }
4072
 
 
4073
 
           /**
4074
 
            * Set imageId to nill (currently the same as reset)
4075
 
            */
4076
 
           axis2_status_t AXIS2_CALL
4077
 
           adb_instanceType_set_imageId_nil(
4078
 
                   adb_instanceType_t* _instanceType,
4079
 
                   const axutil_env_t *env)
4080
 
           {
4081
 
               return adb_instanceType_reset_imageId(_instanceType, env);
4082
 
           }
4083
 
 
4084
 
 
4085
 
 
4086
 
            /**
4087
 
             * getter for kernelId.
4088
 
             */
4089
 
            axis2_char_t* AXIS2_CALL
4090
 
            adb_instanceType_get_kernelId(
4091
 
                    adb_instanceType_t* _instanceType,
4092
 
                    const axutil_env_t *env)
4093
 
             {
4094
 
 
4095
 
                    AXIS2_ENV_CHECK(env, NULL);
4096
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
4097
 
 
4098
 
 
4099
 
                return _instanceType->property_kernelId;
4100
 
             }
4101
 
 
4102
 
            /**
4103
 
             * setter for kernelId
4104
 
             */
4105
 
            axis2_status_t AXIS2_CALL
4106
 
            adb_instanceType_set_kernelId(
4107
 
                    adb_instanceType_t* _instanceType,
4108
 
                    const axutil_env_t *env,
4109
 
                    const axis2_char_t*  arg_kernelId)
4110
 
             {
4111
 
 
4112
 
 
4113
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4114
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4115
 
 
4116
 
                if(_instanceType->is_valid_kernelId &&
4117
 
                        arg_kernelId == _instanceType->property_kernelId)
4118
 
                {
4119
 
 
4120
 
                    return AXIS2_SUCCESS;
4121
 
                }
4122
 
 
4123
 
 
4124
 
                  if(NULL == arg_kernelId)
4125
 
                  {
4126
 
                      AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "kernelId is being set to NULL, but it is not a nullable element");
4127
 
                      return AXIS2_FAILURE;
4128
 
                  }
4129
 
                adb_instanceType_reset_kernelId(_instanceType, env);
4130
 
 
4131
 
 
4132
 
                if(NULL == arg_kernelId)
4133
 
                {
4134
 
                    /* We are already done */
4135
 
                    return AXIS2_SUCCESS;
4136
 
                }
4137
 
                _instanceType->property_kernelId = (axis2_char_t *)axutil_strdup(env, arg_kernelId);
4138
 
                        if(NULL == _instanceType->property_kernelId)
4139
 
                        {
4140
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for kernelId");
4141
 
                            return AXIS2_FAILURE;
4142
 
                        }
4143
 
                        _instanceType->is_valid_kernelId = AXIS2_TRUE;
4144
 
 
4145
 
                return AXIS2_SUCCESS;
4146
 
             }
4147
 
 
4148
 
 
4149
 
 
4150
 
           /**
4151
 
            * resetter for kernelId
4152
 
            */
4153
 
           axis2_status_t AXIS2_CALL
4154
 
           adb_instanceType_reset_kernelId(
4155
 
                   adb_instanceType_t* _instanceType,
4156
 
                   const axutil_env_t *env)
4157
 
           {
4158
 
               int i = 0;
4159
 
               int count = 0;
4160
 
               void *element = NULL;
4161
 
 
4162
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4163
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4164
 
 
4165
 
 
4166
 
 
4167
 
 
4168
 
 
4169
 
                if(_instanceType->property_kernelId != NULL)
4170
 
                {
4171
 
 
4172
 
 
4173
 
                        AXIS2_FREE(env-> allocator, _instanceType->property_kernelId);
4174
 
                     _instanceType->property_kernelId = NULL;
4175
 
                }
4176
 
 
4177
 
 
4178
 
 
4179
 
                _instanceType->is_valid_kernelId = AXIS2_FALSE;
4180
 
               return AXIS2_SUCCESS;
4181
 
           }
4182
 
 
4183
 
           /**
4184
 
            * Check whether kernelId is nill
4185
 
            */
4186
 
           axis2_bool_t AXIS2_CALL
4187
 
           adb_instanceType_is_kernelId_nil(
4188
 
                   adb_instanceType_t* _instanceType,
4189
 
                   const axutil_env_t *env)
4190
 
           {
4191
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
4192
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
4193
 
 
4194
 
               return !_instanceType->is_valid_kernelId;
4195
 
           }
4196
 
 
4197
 
           /**
4198
 
            * Set kernelId to nill (currently the same as reset)
4199
 
            */
4200
 
           axis2_status_t AXIS2_CALL
4201
 
           adb_instanceType_set_kernelId_nil(
4202
 
                   adb_instanceType_t* _instanceType,
4203
 
                   const axutil_env_t *env)
4204
 
           {
4205
 
               return adb_instanceType_reset_kernelId(_instanceType, env);
4206
 
           }
4207
 
 
4208
 
 
4209
 
 
4210
 
            /**
4211
 
             * getter for ramdiskId.
4212
 
             */
4213
 
            axis2_char_t* AXIS2_CALL
4214
 
            adb_instanceType_get_ramdiskId(
4215
 
                    adb_instanceType_t* _instanceType,
4216
 
                    const axutil_env_t *env)
4217
 
             {
4218
 
 
4219
 
                    AXIS2_ENV_CHECK(env, NULL);
4220
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
4221
 
 
4222
 
 
4223
 
                return _instanceType->property_ramdiskId;
4224
 
             }
4225
 
 
4226
 
            /**
4227
 
             * setter for ramdiskId
4228
 
             */
4229
 
            axis2_status_t AXIS2_CALL
4230
 
            adb_instanceType_set_ramdiskId(
4231
 
                    adb_instanceType_t* _instanceType,
4232
 
                    const axutil_env_t *env,
4233
 
                    const axis2_char_t*  arg_ramdiskId)
4234
 
             {
4235
 
 
4236
 
 
4237
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4238
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4239
 
 
4240
 
                if(_instanceType->is_valid_ramdiskId &&
4241
 
                        arg_ramdiskId == _instanceType->property_ramdiskId)
4242
 
                {
4243
 
 
4244
 
                    return AXIS2_SUCCESS;
4245
 
                }
4246
 
 
4247
 
                adb_instanceType_reset_ramdiskId(_instanceType, env);
4248
 
 
4249
 
 
4250
 
                if(NULL == arg_ramdiskId)
4251
 
                {
4252
 
                    /* We are already done */
4253
 
                    return AXIS2_SUCCESS;
4254
 
                }
4255
 
                _instanceType->property_ramdiskId = (axis2_char_t *)axutil_strdup(env, arg_ramdiskId);
4256
 
                        if(NULL == _instanceType->property_ramdiskId)
4257
 
                        {
4258
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for ramdiskId");
4259
 
                            return AXIS2_FAILURE;
4260
 
                        }
4261
 
                        _instanceType->is_valid_ramdiskId = AXIS2_TRUE;
4262
 
 
4263
 
                return AXIS2_SUCCESS;
4264
 
             }
4265
 
 
4266
 
 
4267
 
 
4268
 
           /**
4269
 
            * resetter for ramdiskId
4270
 
            */
4271
 
           axis2_status_t AXIS2_CALL
4272
 
           adb_instanceType_reset_ramdiskId(
4273
 
                   adb_instanceType_t* _instanceType,
4274
 
                   const axutil_env_t *env)
4275
 
           {
4276
 
               int i = 0;
4277
 
               int count = 0;
4278
 
               void *element = NULL;
4279
 
 
4280
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4281
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4282
 
 
4283
 
 
4284
 
 
4285
 
 
4286
 
 
4287
 
                if(_instanceType->property_ramdiskId != NULL)
4288
 
                {
4289
 
 
4290
 
 
4291
 
                        AXIS2_FREE(env-> allocator, _instanceType->property_ramdiskId);
4292
 
                     _instanceType->property_ramdiskId = NULL;
4293
 
                }
4294
 
 
4295
 
 
4296
 
 
4297
 
                _instanceType->is_valid_ramdiskId = AXIS2_FALSE;
4298
 
               return AXIS2_SUCCESS;
4299
 
           }
4300
 
 
4301
 
           /**
4302
 
            * Check whether ramdiskId is nill
4303
 
            */
4304
 
           axis2_bool_t AXIS2_CALL
4305
 
           adb_instanceType_is_ramdiskId_nil(
4306
 
                   adb_instanceType_t* _instanceType,
4307
 
                   const axutil_env_t *env)
4308
 
           {
4309
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
4310
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
4311
 
 
4312
 
               return !_instanceType->is_valid_ramdiskId;
4313
 
           }
4314
 
 
4315
 
           /**
4316
 
            * Set ramdiskId to nill (currently the same as reset)
4317
 
            */
4318
 
           axis2_status_t AXIS2_CALL
4319
 
           adb_instanceType_set_ramdiskId_nil(
4320
 
                   adb_instanceType_t* _instanceType,
4321
 
                   const axutil_env_t *env)
4322
 
           {
4323
 
               return adb_instanceType_reset_ramdiskId(_instanceType, env);
4324
 
           }
4325
 
 
4326
 
 
4327
 
 
4328
 
            /**
4329
 
             * getter for userId.
4330
 
             */
4331
 
            axis2_char_t* AXIS2_CALL
4332
 
            adb_instanceType_get_userId(
4333
 
                    adb_instanceType_t* _instanceType,
4334
 
                    const axutil_env_t *env)
4335
 
             {
4336
 
 
4337
 
                    AXIS2_ENV_CHECK(env, NULL);
4338
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
4339
 
 
4340
 
 
4341
 
                return _instanceType->property_userId;
4342
 
             }
4343
 
 
4344
 
            /**
4345
 
             * setter for userId
4346
 
             */
4347
 
            axis2_status_t AXIS2_CALL
4348
 
            adb_instanceType_set_userId(
4349
 
                    adb_instanceType_t* _instanceType,
4350
 
                    const axutil_env_t *env,
4351
 
                    const axis2_char_t*  arg_userId)
4352
 
             {
4353
 
 
4354
 
 
4355
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4356
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4357
 
 
4358
 
                if(_instanceType->is_valid_userId &&
4359
 
                        arg_userId == _instanceType->property_userId)
4360
 
                {
4361
 
 
4362
 
                    return AXIS2_SUCCESS;
4363
 
                }
4364
 
 
4365
 
 
4366
 
                  if(NULL == arg_userId)
4367
 
                  {
4368
 
                      AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "userId is being set to NULL, but it is not a nullable element");
4369
 
                      return AXIS2_FAILURE;
4370
 
                  }
4371
 
                adb_instanceType_reset_userId(_instanceType, env);
4372
 
 
4373
 
 
4374
 
                if(NULL == arg_userId)
4375
 
                {
4376
 
                    /* We are already done */
4377
 
                    return AXIS2_SUCCESS;
4378
 
                }
4379
 
                _instanceType->property_userId = (axis2_char_t *)axutil_strdup(env, arg_userId);
4380
 
                        if(NULL == _instanceType->property_userId)
4381
 
                        {
4382
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for userId");
4383
 
                            return AXIS2_FAILURE;
4384
 
                        }
4385
 
                        _instanceType->is_valid_userId = AXIS2_TRUE;
4386
 
 
4387
 
                return AXIS2_SUCCESS;
4388
 
             }
4389
 
 
4390
 
 
4391
 
 
4392
 
           /**
4393
 
            * resetter for userId
4394
 
            */
4395
 
           axis2_status_t AXIS2_CALL
4396
 
           adb_instanceType_reset_userId(
4397
 
                   adb_instanceType_t* _instanceType,
4398
 
                   const axutil_env_t *env)
4399
 
           {
4400
 
               int i = 0;
4401
 
               int count = 0;
4402
 
               void *element = NULL;
4403
 
 
4404
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4405
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4406
 
 
4407
 
 
4408
 
 
4409
 
 
4410
 
 
4411
 
                if(_instanceType->property_userId != NULL)
4412
 
                {
4413
 
 
4414
 
 
4415
 
                        AXIS2_FREE(env-> allocator, _instanceType->property_userId);
4416
 
                     _instanceType->property_userId = NULL;
4417
 
                }
4418
 
 
4419
 
 
4420
 
 
4421
 
                _instanceType->is_valid_userId = AXIS2_FALSE;
4422
 
               return AXIS2_SUCCESS;
4423
 
           }
4424
 
 
4425
 
           /**
4426
 
            * Check whether userId is nill
4427
 
            */
4428
 
           axis2_bool_t AXIS2_CALL
4429
 
           adb_instanceType_is_userId_nil(
4430
 
                   adb_instanceType_t* _instanceType,
4431
 
                   const axutil_env_t *env)
4432
 
           {
4433
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
4434
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
4435
 
 
4436
 
               return !_instanceType->is_valid_userId;
4437
 
           }
4438
 
 
4439
 
           /**
4440
 
            * Set userId to nill (currently the same as reset)
4441
 
            */
4442
 
           axis2_status_t AXIS2_CALL
4443
 
           adb_instanceType_set_userId_nil(
4444
 
                   adb_instanceType_t* _instanceType,
4445
 
                   const axutil_env_t *env)
4446
 
           {
4447
 
               return adb_instanceType_reset_userId(_instanceType, env);
4448
 
           }
4449
 
 
4450
 
 
4451
 
 
4452
 
            /**
4453
 
             * getter for keyName.
4454
 
             */
4455
 
            axis2_char_t* AXIS2_CALL
4456
 
            adb_instanceType_get_keyName(
4457
 
                    adb_instanceType_t* _instanceType,
4458
 
                    const axutil_env_t *env)
4459
 
             {
4460
 
 
4461
 
                    AXIS2_ENV_CHECK(env, NULL);
4462
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
4463
 
 
4464
 
 
4465
 
                return _instanceType->property_keyName;
4466
 
             }
4467
 
 
4468
 
            /**
4469
 
             * setter for keyName
4470
 
             */
4471
 
            axis2_status_t AXIS2_CALL
4472
 
            adb_instanceType_set_keyName(
4473
 
                    adb_instanceType_t* _instanceType,
4474
 
                    const axutil_env_t *env,
4475
 
                    const axis2_char_t*  arg_keyName)
4476
 
             {
4477
 
 
4478
 
 
4479
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4480
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4481
 
 
4482
 
                if(_instanceType->is_valid_keyName &&
4483
 
                        arg_keyName == _instanceType->property_keyName)
4484
 
                {
4485
 
 
4486
 
                    return AXIS2_SUCCESS;
4487
 
                }
4488
 
 
4489
 
 
4490
 
                  if(NULL == arg_keyName)
4491
 
                  {
4492
 
                      AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "keyName is being set to NULL, but it is not a nullable element");
4493
 
                      return AXIS2_FAILURE;
4494
 
                  }
4495
 
                adb_instanceType_reset_keyName(_instanceType, env);
4496
 
 
4497
 
 
4498
 
                if(NULL == arg_keyName)
4499
 
                {
4500
 
                    /* We are already done */
4501
 
                    return AXIS2_SUCCESS;
4502
 
                }
4503
 
                _instanceType->property_keyName = (axis2_char_t *)axutil_strdup(env, arg_keyName);
4504
 
                        if(NULL == _instanceType->property_keyName)
4505
 
                        {
4506
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for keyName");
4507
 
                            return AXIS2_FAILURE;
4508
 
                        }
4509
 
                        _instanceType->is_valid_keyName = AXIS2_TRUE;
4510
 
 
4511
 
                return AXIS2_SUCCESS;
4512
 
             }
4513
 
 
4514
 
 
4515
 
 
4516
 
           /**
4517
 
            * resetter for keyName
4518
 
            */
4519
 
           axis2_status_t AXIS2_CALL
4520
 
           adb_instanceType_reset_keyName(
4521
 
                   adb_instanceType_t* _instanceType,
4522
 
                   const axutil_env_t *env)
4523
 
           {
4524
 
               int i = 0;
4525
 
               int count = 0;
4526
 
               void *element = NULL;
4527
 
 
4528
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4529
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4530
 
 
4531
 
 
4532
 
 
4533
 
 
4534
 
 
4535
 
                if(_instanceType->property_keyName != NULL)
4536
 
                {
4537
 
 
4538
 
 
4539
 
                        AXIS2_FREE(env-> allocator, _instanceType->property_keyName);
4540
 
                     _instanceType->property_keyName = NULL;
4541
 
                }
4542
 
 
4543
 
 
4544
 
 
4545
 
                _instanceType->is_valid_keyName = AXIS2_FALSE;
4546
 
               return AXIS2_SUCCESS;
4547
 
           }
4548
 
 
4549
 
           /**
4550
 
            * Check whether keyName is nill
4551
 
            */
4552
 
           axis2_bool_t AXIS2_CALL
4553
 
           adb_instanceType_is_keyName_nil(
4554
 
                   adb_instanceType_t* _instanceType,
4555
 
                   const axutil_env_t *env)
4556
 
           {
4557
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
4558
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
4559
 
 
4560
 
               return !_instanceType->is_valid_keyName;
4561
 
           }
4562
 
 
4563
 
           /**
4564
 
            * Set keyName to nill (currently the same as reset)
4565
 
            */
4566
 
           axis2_status_t AXIS2_CALL
4567
 
           adb_instanceType_set_keyName_nil(
4568
 
                   adb_instanceType_t* _instanceType,
4569
 
                   const axutil_env_t *env)
4570
 
           {
4571
 
               return adb_instanceType_reset_keyName(_instanceType, env);
4572
 
           }
4573
 
 
4574
 
 
4575
 
 
4576
 
            /**
4577
 
             * getter for instanceType.
4578
 
             */
4579
 
            adb_virtualMachineType_t* AXIS2_CALL
4580
 
            adb_instanceType_get_instanceType(
4581
 
                    adb_instanceType_t* _instanceType,
4582
 
                    const axutil_env_t *env)
4583
 
             {
4584
 
 
4585
 
                    AXIS2_ENV_CHECK(env, NULL);
4586
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
4587
 
 
4588
 
 
4589
 
                return _instanceType->property_instanceType;
4590
 
             }
4591
 
 
4592
 
            /**
4593
 
             * setter for instanceType
4594
 
             */
4595
 
            axis2_status_t AXIS2_CALL
4596
 
            adb_instanceType_set_instanceType(
4597
 
                    adb_instanceType_t* _instanceType,
4598
 
                    const axutil_env_t *env,
4599
 
                    adb_virtualMachineType_t*  arg_instanceType)
4600
 
             {
4601
 
 
4602
 
 
4603
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4604
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4605
 
 
4606
 
                if(_instanceType->is_valid_instanceType &&
4607
 
                        arg_instanceType == _instanceType->property_instanceType)
4608
 
                {
4609
 
 
4610
 
                    return AXIS2_SUCCESS;
4611
 
                }
4612
 
 
4613
 
 
4614
 
                  if(NULL == arg_instanceType)
4615
 
                  {
4616
 
                      AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "instanceType is being set to NULL, but it is not a nullable element");
4617
 
                      return AXIS2_FAILURE;
4618
 
                  }
4619
 
                adb_instanceType_reset_instanceType(_instanceType, env);
4620
 
 
4621
 
 
4622
 
                if(NULL == arg_instanceType)
4623
 
                {
4624
 
                    /* We are already done */
4625
 
                    return AXIS2_SUCCESS;
4626
 
                }
4627
 
                _instanceType->property_instanceType = arg_instanceType;
4628
 
                        _instanceType->is_valid_instanceType = AXIS2_TRUE;
4629
 
 
4630
 
                return AXIS2_SUCCESS;
4631
 
             }
4632
 
 
4633
 
 
4634
 
 
4635
 
           /**
4636
 
            * resetter for instanceType
4637
 
            */
4638
 
           axis2_status_t AXIS2_CALL
4639
 
           adb_instanceType_reset_instanceType(
4640
 
                   adb_instanceType_t* _instanceType,
4641
 
                   const axutil_env_t *env)
4642
 
           {
4643
 
               int i = 0;
4644
 
               int count = 0;
4645
 
               void *element = NULL;
4646
 
 
4647
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4648
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4649
 
 
4650
 
 
4651
 
 
4652
 
 
4653
 
 
4654
 
                if(_instanceType->property_instanceType != NULL)
4655
 
                {
4656
 
 
4657
 
 
4658
 
                        adb_virtualMachineType_free(_instanceType->property_instanceType, env);
4659
 
                     _instanceType->property_instanceType = NULL;
4660
 
                }
4661
 
 
4662
 
 
4663
 
 
4664
 
                _instanceType->is_valid_instanceType = AXIS2_FALSE;
4665
 
               return AXIS2_SUCCESS;
4666
 
           }
4667
 
 
4668
 
           /**
4669
 
            * Check whether instanceType is nill
4670
 
            */
4671
 
           axis2_bool_t AXIS2_CALL
4672
 
           adb_instanceType_is_instanceType_nil(
4673
 
                   adb_instanceType_t* _instanceType,
4674
 
                   const axutil_env_t *env)
4675
 
           {
4676
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
4677
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
4678
 
 
4679
 
               return !_instanceType->is_valid_instanceType;
4680
 
           }
4681
 
 
4682
 
           /**
4683
 
            * Set instanceType to nill (currently the same as reset)
4684
 
            */
4685
 
           axis2_status_t AXIS2_CALL
4686
 
           adb_instanceType_set_instanceType_nil(
4687
 
                   adb_instanceType_t* _instanceType,
4688
 
                   const axutil_env_t *env)
4689
 
           {
4690
 
               return adb_instanceType_reset_instanceType(_instanceType, env);
4691
 
           }
4692
 
 
4693
 
 
4694
 
 
4695
 
            /**
4696
 
             * getter for netParams.
4697
 
             */
4698
 
            adb_netConfigType_t* AXIS2_CALL
4699
 
            adb_instanceType_get_netParams(
4700
 
                    adb_instanceType_t* _instanceType,
4701
 
                    const axutil_env_t *env)
4702
 
             {
4703
 
 
4704
 
                    AXIS2_ENV_CHECK(env, NULL);
4705
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
4706
 
 
4707
 
 
4708
 
                return _instanceType->property_netParams;
4709
 
             }
4710
 
 
4711
 
            /**
4712
 
             * setter for netParams
4713
 
             */
4714
 
            axis2_status_t AXIS2_CALL
4715
 
            adb_instanceType_set_netParams(
4716
 
                    adb_instanceType_t* _instanceType,
4717
 
                    const axutil_env_t *env,
4718
 
                    adb_netConfigType_t*  arg_netParams)
4719
 
             {
4720
 
 
4721
 
 
4722
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4723
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4724
 
 
4725
 
                if(_instanceType->is_valid_netParams &&
4726
 
                        arg_netParams == _instanceType->property_netParams)
4727
 
                {
4728
 
 
4729
 
                    return AXIS2_SUCCESS;
4730
 
                }
4731
 
 
4732
 
                adb_instanceType_reset_netParams(_instanceType, env);
4733
 
 
4734
 
 
4735
 
                if(NULL == arg_netParams)
4736
 
                {
4737
 
                    /* We are already done */
4738
 
                    return AXIS2_SUCCESS;
4739
 
                }
4740
 
                _instanceType->property_netParams = arg_netParams;
4741
 
                        _instanceType->is_valid_netParams = AXIS2_TRUE;
4742
 
 
4743
 
                return AXIS2_SUCCESS;
4744
 
             }
4745
 
 
4746
 
 
4747
 
 
4748
 
           /**
4749
 
            * resetter for netParams
4750
 
            */
4751
 
           axis2_status_t AXIS2_CALL
4752
 
           adb_instanceType_reset_netParams(
4753
 
                   adb_instanceType_t* _instanceType,
4754
 
                   const axutil_env_t *env)
4755
 
           {
4756
 
               int i = 0;
4757
 
               int count = 0;
4758
 
               void *element = NULL;
4759
 
 
4760
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4761
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4762
 
 
4763
 
 
4764
 
 
4765
 
 
4766
 
 
4767
 
                if(_instanceType->property_netParams != NULL)
4768
 
                {
4769
 
 
4770
 
 
4771
 
                        adb_netConfigType_free(_instanceType->property_netParams, env);
4772
 
                     _instanceType->property_netParams = NULL;
4773
 
                }
4774
 
 
4775
 
 
4776
 
 
4777
 
                _instanceType->is_valid_netParams = AXIS2_FALSE;
4778
 
               return AXIS2_SUCCESS;
4779
 
           }
4780
 
 
4781
 
           /**
4782
 
            * Check whether netParams is nill
4783
 
            */
4784
 
           axis2_bool_t AXIS2_CALL
4785
 
           adb_instanceType_is_netParams_nil(
4786
 
                   adb_instanceType_t* _instanceType,
4787
 
                   const axutil_env_t *env)
4788
 
           {
4789
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
4790
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
4791
 
 
4792
 
               return !_instanceType->is_valid_netParams;
4793
 
           }
4794
 
 
4795
 
           /**
4796
 
            * Set netParams to nill (currently the same as reset)
4797
 
            */
4798
 
           axis2_status_t AXIS2_CALL
4799
 
           adb_instanceType_set_netParams_nil(
4800
 
                   adb_instanceType_t* _instanceType,
4801
 
                   const axutil_env_t *env)
4802
 
           {
4803
 
               return adb_instanceType_reset_netParams(_instanceType, env);
4804
 
           }
4805
 
 
4806
 
 
4807
 
 
4808
 
            /**
4809
 
             * getter for stateName.
4810
 
             */
4811
 
            axis2_char_t* AXIS2_CALL
4812
 
            adb_instanceType_get_stateName(
4813
 
                    adb_instanceType_t* _instanceType,
4814
 
                    const axutil_env_t *env)
4815
 
             {
4816
 
 
4817
 
                    AXIS2_ENV_CHECK(env, NULL);
4818
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
4819
 
 
4820
 
 
4821
 
                return _instanceType->property_stateName;
4822
 
             }
4823
 
 
4824
 
            /**
4825
 
             * setter for stateName
4826
 
             */
4827
 
            axis2_status_t AXIS2_CALL
4828
 
            adb_instanceType_set_stateName(
4829
 
                    adb_instanceType_t* _instanceType,
4830
 
                    const axutil_env_t *env,
4831
 
                    const axis2_char_t*  arg_stateName)
4832
 
             {
4833
 
 
4834
 
 
4835
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4836
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4837
 
 
4838
 
                if(_instanceType->is_valid_stateName &&
4839
 
                        arg_stateName == _instanceType->property_stateName)
4840
 
                {
4841
 
 
4842
 
                    return AXIS2_SUCCESS;
4843
 
                }
4844
 
 
4845
 
 
4846
 
                  if(NULL == arg_stateName)
4847
 
                  {
4848
 
                      AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "stateName is being set to NULL, but it is not a nullable element");
4849
 
                      return AXIS2_FAILURE;
4850
 
                  }
4851
 
                adb_instanceType_reset_stateName(_instanceType, env);
4852
 
 
4853
 
 
4854
 
                if(NULL == arg_stateName)
4855
 
                {
4856
 
                    /* We are already done */
4857
 
                    return AXIS2_SUCCESS;
4858
 
                }
4859
 
                _instanceType->property_stateName = (axis2_char_t *)axutil_strdup(env, arg_stateName);
4860
 
                        if(NULL == _instanceType->property_stateName)
4861
 
                        {
4862
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for stateName");
4863
 
                            return AXIS2_FAILURE;
4864
 
                        }
4865
 
                        _instanceType->is_valid_stateName = AXIS2_TRUE;
4866
 
 
4867
 
                return AXIS2_SUCCESS;
4868
 
             }
4869
 
 
4870
 
 
4871
 
 
4872
 
           /**
4873
 
            * resetter for stateName
4874
 
            */
4875
 
           axis2_status_t AXIS2_CALL
4876
 
           adb_instanceType_reset_stateName(
4877
 
                   adb_instanceType_t* _instanceType,
4878
 
                   const axutil_env_t *env)
4879
 
           {
4880
 
               int i = 0;
4881
 
               int count = 0;
4882
 
               void *element = NULL;
4883
 
 
4884
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4885
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4886
 
 
4887
 
 
4888
 
 
4889
 
 
4890
 
 
4891
 
                if(_instanceType->property_stateName != NULL)
4892
 
                {
4893
 
 
4894
 
 
4895
 
                        AXIS2_FREE(env-> allocator, _instanceType->property_stateName);
4896
 
                     _instanceType->property_stateName = NULL;
4897
 
                }
4898
 
 
4899
 
 
4900
 
 
4901
 
                _instanceType->is_valid_stateName = AXIS2_FALSE;
4902
 
               return AXIS2_SUCCESS;
4903
 
           }
4904
 
 
4905
 
           /**
4906
 
            * Check whether stateName is nill
4907
 
            */
4908
 
           axis2_bool_t AXIS2_CALL
4909
 
           adb_instanceType_is_stateName_nil(
4910
 
                   adb_instanceType_t* _instanceType,
4911
 
                   const axutil_env_t *env)
4912
 
           {
4913
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
4914
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
4915
 
 
4916
 
               return !_instanceType->is_valid_stateName;
4917
 
           }
4918
 
 
4919
 
           /**
4920
 
            * Set stateName to nill (currently the same as reset)
4921
 
            */
4922
 
           axis2_status_t AXIS2_CALL
4923
 
           adb_instanceType_set_stateName_nil(
4924
 
                   adb_instanceType_t* _instanceType,
4925
 
                   const axutil_env_t *env)
4926
 
           {
4927
 
               return adb_instanceType_reset_stateName(_instanceType, env);
4928
 
           }
4929
 
 
4930
 
 
4931
 
 
4932
 
            /**
4933
 
             * getter for launchTime.
4934
 
             */
4935
 
            axutil_date_time_t* AXIS2_CALL
4936
 
            adb_instanceType_get_launchTime(
4937
 
                    adb_instanceType_t* _instanceType,
4938
 
                    const axutil_env_t *env)
4939
 
             {
4940
 
 
4941
 
                    AXIS2_ENV_CHECK(env, NULL);
4942
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
4943
 
 
4944
 
 
4945
 
                return _instanceType->property_launchTime;
4946
 
             }
4947
 
 
4948
 
            /**
4949
 
             * setter for launchTime
4950
 
             */
4951
 
            axis2_status_t AXIS2_CALL
4952
 
            adb_instanceType_set_launchTime(
4953
 
                    adb_instanceType_t* _instanceType,
4954
 
                    const axutil_env_t *env,
4955
 
                    axutil_date_time_t*  arg_launchTime)
4956
 
             {
4957
 
 
4958
 
 
4959
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4960
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4961
 
 
4962
 
                if(_instanceType->is_valid_launchTime &&
4963
 
                        arg_launchTime == _instanceType->property_launchTime)
4964
 
                {
4965
 
 
4966
 
                    return AXIS2_SUCCESS;
4967
 
                }
4968
 
 
4969
 
                adb_instanceType_reset_launchTime(_instanceType, env);
4970
 
 
4971
 
 
4972
 
                if(NULL == arg_launchTime)
4973
 
                {
4974
 
                    /* We are already done */
4975
 
                    return AXIS2_SUCCESS;
4976
 
                }
4977
 
                _instanceType->property_launchTime = arg_launchTime;
4978
 
                        _instanceType->is_valid_launchTime = AXIS2_TRUE;
4979
 
 
4980
 
                return AXIS2_SUCCESS;
4981
 
             }
4982
 
 
4983
 
 
4984
 
 
4985
 
           /**
4986
 
            * resetter for launchTime
4987
 
            */
4988
 
           axis2_status_t AXIS2_CALL
4989
 
           adb_instanceType_reset_launchTime(
4990
 
                   adb_instanceType_t* _instanceType,
4991
 
                   const axutil_env_t *env)
4992
 
           {
4993
 
               int i = 0;
4994
 
               int count = 0;
4995
 
               void *element = NULL;
4996
 
 
4997
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
4998
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
4999
 
 
5000
 
 
5001
 
 
5002
 
 
5003
 
 
5004
 
                if(_instanceType->property_launchTime != NULL)
5005
 
                {
5006
 
 
5007
 
 
5008
 
                      axutil_date_time_free(_instanceType->property_launchTime, env);
5009
 
                     _instanceType->property_launchTime = NULL;
5010
 
                }
5011
 
 
5012
 
 
5013
 
 
5014
 
                _instanceType->is_valid_launchTime = AXIS2_FALSE;
5015
 
               return AXIS2_SUCCESS;
5016
 
           }
5017
 
 
5018
 
           /**
5019
 
            * Check whether launchTime is nill
5020
 
            */
5021
 
           axis2_bool_t AXIS2_CALL
5022
 
           adb_instanceType_is_launchTime_nil(
5023
 
                   adb_instanceType_t* _instanceType,
5024
 
                   const axutil_env_t *env)
5025
 
           {
5026
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
5027
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
5028
 
 
5029
 
               return !_instanceType->is_valid_launchTime;
5030
 
           }
5031
 
 
5032
 
           /**
5033
 
            * Set launchTime to nill (currently the same as reset)
5034
 
            */
5035
 
           axis2_status_t AXIS2_CALL
5036
 
           adb_instanceType_set_launchTime_nil(
5037
 
                   adb_instanceType_t* _instanceType,
5038
 
                   const axutil_env_t *env)
5039
 
           {
5040
 
               return adb_instanceType_reset_launchTime(_instanceType, env);
5041
 
           }
5042
 
 
5043
 
 
5044
 
 
5045
 
            /**
5046
 
             * getter for userData.
5047
 
             */
5048
 
            axis2_char_t* AXIS2_CALL
5049
 
            adb_instanceType_get_userData(
5050
 
                    adb_instanceType_t* _instanceType,
5051
 
                    const axutil_env_t *env)
5052
 
             {
5053
 
 
5054
 
                    AXIS2_ENV_CHECK(env, NULL);
5055
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
5056
 
 
5057
 
 
5058
 
                return _instanceType->property_userData;
5059
 
             }
5060
 
 
5061
 
            /**
5062
 
             * setter for userData
5063
 
             */
5064
 
            axis2_status_t AXIS2_CALL
5065
 
            adb_instanceType_set_userData(
5066
 
                    adb_instanceType_t* _instanceType,
5067
 
                    const axutil_env_t *env,
5068
 
                    const axis2_char_t*  arg_userData)
5069
 
             {
5070
 
 
5071
 
 
5072
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
5073
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
5074
 
 
5075
 
                if(_instanceType->is_valid_userData &&
5076
 
                        arg_userData == _instanceType->property_userData)
5077
 
                {
5078
 
 
5079
 
                    return AXIS2_SUCCESS;
5080
 
                }
5081
 
 
5082
 
                adb_instanceType_reset_userData(_instanceType, env);
5083
 
 
5084
 
 
5085
 
                if(NULL == arg_userData)
5086
 
                {
5087
 
                    /* We are already done */
5088
 
                    return AXIS2_SUCCESS;
5089
 
                }
5090
 
                _instanceType->property_userData = (axis2_char_t *)axutil_strdup(env, arg_userData);
5091
 
                        if(NULL == _instanceType->property_userData)
5092
 
                        {
5093
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for userData");
5094
 
                            return AXIS2_FAILURE;
5095
 
                        }
5096
 
                        _instanceType->is_valid_userData = AXIS2_TRUE;
5097
 
 
5098
 
                return AXIS2_SUCCESS;
5099
 
             }
5100
 
 
5101
 
 
5102
 
 
5103
 
           /**
5104
 
            * resetter for userData
5105
 
            */
5106
 
           axis2_status_t AXIS2_CALL
5107
 
           adb_instanceType_reset_userData(
5108
 
                   adb_instanceType_t* _instanceType,
5109
 
                   const axutil_env_t *env)
5110
 
           {
5111
 
               int i = 0;
5112
 
               int count = 0;
5113
 
               void *element = NULL;
5114
 
 
5115
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
5116
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
5117
 
 
5118
 
 
5119
 
 
5120
 
 
5121
 
 
5122
 
                if(_instanceType->property_userData != NULL)
5123
 
                {
5124
 
 
5125
 
 
5126
 
                        AXIS2_FREE(env-> allocator, _instanceType->property_userData);
5127
 
                     _instanceType->property_userData = NULL;
5128
 
                }
5129
 
 
5130
 
 
5131
 
 
5132
 
                _instanceType->is_valid_userData = AXIS2_FALSE;
5133
 
               return AXIS2_SUCCESS;
5134
 
           }
5135
 
 
5136
 
           /**
5137
 
            * Check whether userData is nill
5138
 
            */
5139
 
           axis2_bool_t AXIS2_CALL
5140
 
           adb_instanceType_is_userData_nil(
5141
 
                   adb_instanceType_t* _instanceType,
5142
 
                   const axutil_env_t *env)
5143
 
           {
5144
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
5145
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
5146
 
 
5147
 
               return !_instanceType->is_valid_userData;
5148
 
           }
5149
 
 
5150
 
           /**
5151
 
            * Set userData to nill (currently the same as reset)
5152
 
            */
5153
 
           axis2_status_t AXIS2_CALL
5154
 
           adb_instanceType_set_userData_nil(
5155
 
                   adb_instanceType_t* _instanceType,
5156
 
                   const axutil_env_t *env)
5157
 
           {
5158
 
               return adb_instanceType_reset_userData(_instanceType, env);
5159
 
           }
5160
 
 
5161
 
 
5162
 
 
5163
 
            /**
5164
 
             * getter for launchIndex.
5165
 
             */
5166
 
            axis2_char_t* AXIS2_CALL
5167
 
            adb_instanceType_get_launchIndex(
5168
 
                    adb_instanceType_t* _instanceType,
5169
 
                    const axutil_env_t *env)
5170
 
             {
5171
 
 
5172
 
                    AXIS2_ENV_CHECK(env, NULL);
5173
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
5174
 
 
5175
 
 
5176
 
                return _instanceType->property_launchIndex;
5177
 
             }
5178
 
 
5179
 
            /**
5180
 
             * setter for launchIndex
5181
 
             */
5182
 
            axis2_status_t AXIS2_CALL
5183
 
            adb_instanceType_set_launchIndex(
5184
 
                    adb_instanceType_t* _instanceType,
5185
 
                    const axutil_env_t *env,
5186
 
                    const axis2_char_t*  arg_launchIndex)
5187
 
             {
5188
 
 
5189
 
 
5190
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
5191
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
5192
 
 
5193
 
                if(_instanceType->is_valid_launchIndex &&
5194
 
                        arg_launchIndex == _instanceType->property_launchIndex)
5195
 
                {
5196
 
 
5197
 
                    return AXIS2_SUCCESS;
5198
 
                }
5199
 
 
5200
 
                adb_instanceType_reset_launchIndex(_instanceType, env);
5201
 
 
5202
 
 
5203
 
                if(NULL == arg_launchIndex)
5204
 
                {
5205
 
                    /* We are already done */
5206
 
                    return AXIS2_SUCCESS;
5207
 
                }
5208
 
                _instanceType->property_launchIndex = (axis2_char_t *)axutil_strdup(env, arg_launchIndex);
5209
 
                        if(NULL == _instanceType->property_launchIndex)
5210
 
                        {
5211
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for launchIndex");
5212
 
                            return AXIS2_FAILURE;
5213
 
                        }
5214
 
                        _instanceType->is_valid_launchIndex = AXIS2_TRUE;
5215
 
 
5216
 
                return AXIS2_SUCCESS;
5217
 
             }
5218
 
 
5219
 
 
5220
 
 
5221
 
           /**
5222
 
            * resetter for launchIndex
5223
 
            */
5224
 
           axis2_status_t AXIS2_CALL
5225
 
           adb_instanceType_reset_launchIndex(
5226
 
                   adb_instanceType_t* _instanceType,
5227
 
                   const axutil_env_t *env)
5228
 
           {
5229
 
               int i = 0;
5230
 
               int count = 0;
5231
 
               void *element = NULL;
5232
 
 
5233
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
5234
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
5235
 
 
5236
 
 
5237
 
 
5238
 
 
5239
 
 
5240
 
                if(_instanceType->property_launchIndex != NULL)
5241
 
                {
5242
 
 
5243
 
 
5244
 
                        AXIS2_FREE(env-> allocator, _instanceType->property_launchIndex);
5245
 
                     _instanceType->property_launchIndex = NULL;
5246
 
                }
5247
 
 
5248
 
 
5249
 
 
5250
 
                _instanceType->is_valid_launchIndex = AXIS2_FALSE;
5251
 
               return AXIS2_SUCCESS;
5252
 
           }
5253
 
 
5254
 
           /**
5255
 
            * Check whether launchIndex is nill
5256
 
            */
5257
 
           axis2_bool_t AXIS2_CALL
5258
 
           adb_instanceType_is_launchIndex_nil(
5259
 
                   adb_instanceType_t* _instanceType,
5260
 
                   const axutil_env_t *env)
5261
 
           {
5262
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
5263
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
5264
 
 
5265
 
               return !_instanceType->is_valid_launchIndex;
5266
 
           }
5267
 
 
5268
 
           /**
5269
 
            * Set launchIndex to nill (currently the same as reset)
5270
 
            */
5271
 
           axis2_status_t AXIS2_CALL
5272
 
           adb_instanceType_set_launchIndex_nil(
5273
 
                   adb_instanceType_t* _instanceType,
5274
 
                   const axutil_env_t *env)
5275
 
           {
5276
 
               return adb_instanceType_reset_launchIndex(_instanceType, env);
5277
 
           }
5278
 
 
5279
 
 
5280
 
 
5281
 
            /**
5282
 
             * getter for groupNames.
5283
 
             */
5284
 
            axutil_array_list_t* AXIS2_CALL
5285
 
            adb_instanceType_get_groupNames(
5286
 
                    adb_instanceType_t* _instanceType,
5287
 
                    const axutil_env_t *env)
5288
 
             {
5289
 
 
5290
 
                    AXIS2_ENV_CHECK(env, NULL);
5291
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
5292
 
 
5293
 
 
5294
 
                return _instanceType->property_groupNames;
5295
 
             }
5296
 
 
5297
 
            /**
5298
 
             * setter for groupNames
5299
 
             */
5300
 
            axis2_status_t AXIS2_CALL
5301
 
            adb_instanceType_set_groupNames(
5302
 
                    adb_instanceType_t* _instanceType,
5303
 
                    const axutil_env_t *env,
5304
 
                    axutil_array_list_t*  arg_groupNames)
5305
 
             {
5306
 
 
5307
 
                 int size = 0;
5308
 
                 int i = 0;
5309
 
                 axis2_bool_t non_nil_exists = AXIS2_FALSE;
5310
 
 
5311
 
 
5312
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
5313
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
5314
 
 
5315
 
                if(_instanceType->is_valid_groupNames &&
5316
 
                        arg_groupNames == _instanceType->property_groupNames)
5317
 
                {
5318
 
 
5319
 
                    return AXIS2_SUCCESS;
5320
 
                }
5321
 
 
5322
 
 
5323
 
                 size = axutil_array_list_size(arg_groupNames, env);
5324
 
 
5325
 
                     if (size > 64)
5326
 
                     {
5327
 
                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "groupNames has exceed the maxOccurs(64)");
5328
 
                         return AXIS2_FAILURE;
5329
 
                     }
5330
 
 
5331
 
                 if (size < 0)
5332
 
                 {
5333
 
                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "groupNames has less than minOccurs(0)");
5334
 
                     return AXIS2_FAILURE;
5335
 
                 }
5336
 
                 for(i = 0; i < size; i ++ )
5337
 
                 {
5338
 
                     if(NULL != axutil_array_list_get(arg_groupNames, env, i))
5339
 
                     {
5340
 
                         non_nil_exists = AXIS2_TRUE;
5341
 
                         break;
5342
 
                     }
5343
 
                 }
5344
 
 
5345
 
                 adb_instanceType_reset_groupNames(_instanceType, env);
5346
 
 
5347
 
 
5348
 
                if(NULL == arg_groupNames)
5349
 
                {
5350
 
                    /* We are already done */
5351
 
                    return AXIS2_SUCCESS;
5352
 
                }
5353
 
                _instanceType->property_groupNames = arg_groupNames;
5354
 
                        if(non_nil_exists)
5355
 
                        {
5356
 
                            _instanceType->is_valid_groupNames = AXIS2_TRUE;
5357
 
                        }
5358
 
 
5359
 
 
5360
 
                return AXIS2_SUCCESS;
5361
 
             }
5362
 
 
5363
 
 
5364
 
            /**
5365
 
             * Get ith element of groupNames.
5366
 
             */
5367
 
            axis2_char_t* AXIS2_CALL
5368
 
            adb_instanceType_get_groupNames_at(
5369
 
                    adb_instanceType_t* _instanceType,
5370
 
                    const axutil_env_t *env, int i)
5371
 
            {
5372
 
                axis2_char_t* ret_val;
5373
 
 
5374
 
 
5375
 
                    AXIS2_ENV_CHECK(env, NULL);
5376
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
5377
 
 
5378
 
 
5379
 
                if(_instanceType->property_groupNames == NULL)
5380
 
                {
5381
 
                    return (axis2_char_t*)0;
5382
 
                }
5383
 
                ret_val = (axis2_char_t*)axutil_array_list_get(_instanceType->property_groupNames, env, i);
5384
 
 
5385
 
                    return ret_val;
5386
 
 
5387
 
            }
5388
 
 
5389
 
            /**
5390
 
             * Set the ith element of groupNames.
5391
 
             */
5392
 
            axis2_status_t AXIS2_CALL
5393
 
            adb_instanceType_set_groupNames_at(
5394
 
                    adb_instanceType_t* _instanceType,
5395
 
                    const axutil_env_t *env, int i,
5396
 
                    const axis2_char_t* arg_groupNames)
5397
 
            {
5398
 
                void *element = NULL;
5399
 
                int size = 0;
5400
 
                int j;
5401
 
                int k;
5402
 
                axis2_bool_t non_nil_exists = AXIS2_FALSE;
5403
 
 
5404
 
 
5405
 
 
5406
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
5407
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
5408
 
 
5409
 
                if( _instanceType->is_valid_groupNames &&
5410
 
                    _instanceType->property_groupNames &&
5411
 
 
5412
 
                    arg_groupNames == (axis2_char_t*)axutil_array_list_get(_instanceType->property_groupNames, env, i))
5413
 
 
5414
 
                {
5415
 
 
5416
 
                    return AXIS2_SUCCESS;
5417
 
                }
5418
 
 
5419
 
 
5420
 
                    if(NULL == arg_groupNames)
5421
 
                    {
5422
 
                        if(_instanceType->property_groupNames != NULL)
5423
 
                        {
5424
 
                            size = axutil_array_list_size(_instanceType->property_groupNames, env);
5425
 
                            for(j = 0, k = 0; j < size; j ++ )
5426
 
                            {
5427
 
                                if(i == j) continue;
5428
 
                                if(NULL != axutil_array_list_get(_instanceType->property_groupNames, env, i))
5429
 
                                {
5430
 
                                    k ++;
5431
 
                                    non_nil_exists = AXIS2_TRUE;
5432
 
                                    if(k >= 0)
5433
 
                                    {
5434
 
                                        break;
5435
 
                                    }
5436
 
                                }
5437
 
                            }
5438
 
                        }
5439
 
                    }
5440
 
                    else
5441
 
                    {
5442
 
                        non_nil_exists = AXIS2_TRUE;
5443
 
                    }
5444
 
 
5445
 
                if( k < 0)
5446
 
                {
5447
 
                       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Size of the array of groupNames is beinng set to be smaller than the specificed number of minOccurs(0)");
5448
 
                       return AXIS2_FAILURE;
5449
 
                }
5450
 
 
5451
 
                if(_instanceType->property_groupNames == NULL)
5452
 
                {
5453
 
                    _instanceType->property_groupNames = axutil_array_list_create(env, 10);
5454
 
                }
5455
 
 
5456
 
                /* check whether there already exist an element */
5457
 
                element = axutil_array_list_get(_instanceType->property_groupNames, env, i);
5458
 
                if(NULL != element)
5459
 
                {
5460
 
 
5461
 
 
5462
 
 
5463
 
                       /* This is an unknown type or a primitive. Please free this manually*/
5464
 
 
5465
 
                }
5466
 
 
5467
 
 
5468
 
                    if(!non_nil_exists)
5469
 
                    {
5470
 
 
5471
 
                        _instanceType->is_valid_groupNames = AXIS2_FALSE;
5472
 
                        axutil_array_list_set(_instanceType->property_groupNames , env, i, NULL);
5473
 
 
5474
 
                        return AXIS2_SUCCESS;
5475
 
                    }
5476
 
 
5477
 
                   axutil_array_list_set(_instanceType->property_groupNames , env, i, axutil_strdup(env, arg_groupNames));
5478
 
                  _instanceType->is_valid_groupNames = AXIS2_TRUE;
5479
 
 
5480
 
                return AXIS2_SUCCESS;
5481
 
            }
5482
 
 
5483
 
            /**
5484
 
             * Add to groupNames.
5485
 
             */
5486
 
            axis2_status_t AXIS2_CALL
5487
 
            adb_instanceType_add_groupNames(
5488
 
                    adb_instanceType_t* _instanceType,
5489
 
                    const axutil_env_t *env,
5490
 
                    const axis2_char_t* arg_groupNames)
5491
 
             {
5492
 
 
5493
 
 
5494
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
5495
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
5496
 
 
5497
 
 
5498
 
                    if(NULL == arg_groupNames)
5499
 
                    {
5500
 
 
5501
 
                           return AXIS2_SUCCESS;
5502
 
 
5503
 
                    }
5504
 
 
5505
 
 
5506
 
                if(_instanceType->property_groupNames == NULL)
5507
 
                {
5508
 
                    _instanceType->property_groupNames = axutil_array_list_create(env, 10);
5509
 
                }
5510
 
                if(_instanceType->property_groupNames == NULL)
5511
 
                {
5512
 
                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in allocatting memory for groupNames");
5513
 
                    return AXIS2_FAILURE;
5514
 
 
5515
 
                }
5516
 
 
5517
 
                   axutil_array_list_add(_instanceType->property_groupNames , env, axutil_strdup(env, arg_groupNames));
5518
 
                  _instanceType->is_valid_groupNames = AXIS2_TRUE;
5519
 
                return AXIS2_SUCCESS;
5520
 
             }
5521
 
 
5522
 
            /**
5523
 
             * Get the size of the groupNames array.
5524
 
             */
5525
 
            int AXIS2_CALL
5526
 
            adb_instanceType_sizeof_groupNames(
5527
 
                    adb_instanceType_t* _instanceType,
5528
 
                    const axutil_env_t *env)
5529
 
            {
5530
 
                AXIS2_ENV_CHECK(env, -1);
5531
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, -1);
5532
 
                if(_instanceType->property_groupNames == NULL)
5533
 
                {
5534
 
                    return 0;
5535
 
                }
5536
 
                return axutil_array_list_size(_instanceType->property_groupNames, env);
5537
 
            }
5538
 
 
5539
 
            /**
5540
 
             * remove the ith element, same as set_nil_at.
5541
 
             */
5542
 
            axis2_status_t AXIS2_CALL
5543
 
            adb_instanceType_remove_groupNames_at(
5544
 
                    adb_instanceType_t* _instanceType,
5545
 
                    const axutil_env_t *env, int i)
5546
 
            {
5547
 
                return adb_instanceType_set_groupNames_nil_at(_instanceType, env, i);
5548
 
            }
5549
 
 
5550
 
 
5551
 
 
5552
 
           /**
5553
 
            * resetter for groupNames
5554
 
            */
5555
 
           axis2_status_t AXIS2_CALL
5556
 
           adb_instanceType_reset_groupNames(
5557
 
                   adb_instanceType_t* _instanceType,
5558
 
                   const axutil_env_t *env)
5559
 
           {
5560
 
               int i = 0;
5561
 
               int count = 0;
5562
 
               void *element = NULL;
5563
 
 
5564
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
5565
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
5566
 
 
5567
 
 
5568
 
 
5569
 
                  if (_instanceType->property_groupNames != NULL)
5570
 
                  {
5571
 
                      count = axutil_array_list_size(_instanceType->property_groupNames, env);
5572
 
                      for(i = 0; i < count; i ++)
5573
 
                      {
5574
 
                         element = axutil_array_list_get(_instanceType->property_groupNames, env, i);
5575
 
 
5576
 
 
5577
 
 
5578
 
                if(element != NULL)
5579
 
                {
5580
 
 
5581
 
 
5582
 
                        AXIS2_FREE(env-> allocator, (axis2_char_t*)element);
5583
 
                     element = NULL;
5584
 
                }
5585
 
 
5586
 
 
5587
 
 
5588
 
 
5589
 
                      }
5590
 
                      axutil_array_list_free(_instanceType->property_groupNames, env);
5591
 
                  }
5592
 
                _instanceType->is_valid_groupNames = AXIS2_FALSE;
5593
 
               return AXIS2_SUCCESS;
5594
 
           }
5595
 
 
5596
 
           /**
5597
 
            * Check whether groupNames is nill
5598
 
            */
5599
 
           axis2_bool_t AXIS2_CALL
5600
 
           adb_instanceType_is_groupNames_nil(
5601
 
                   adb_instanceType_t* _instanceType,
5602
 
                   const axutil_env_t *env)
5603
 
           {
5604
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
5605
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
5606
 
 
5607
 
               return !_instanceType->is_valid_groupNames;
5608
 
           }
5609
 
 
5610
 
           /**
5611
 
            * Set groupNames to nill (currently the same as reset)
5612
 
            */
5613
 
           axis2_status_t AXIS2_CALL
5614
 
           adb_instanceType_set_groupNames_nil(
5615
 
                   adb_instanceType_t* _instanceType,
5616
 
                   const axutil_env_t *env)
5617
 
           {
5618
 
               return adb_instanceType_reset_groupNames(_instanceType, env);
5619
 
           }
5620
 
 
5621
 
 
5622
 
           /**
5623
 
            * Check whether groupNames is nill at i
5624
 
            */
5625
 
           axis2_bool_t AXIS2_CALL
5626
 
           adb_instanceType_is_groupNames_nil_at(
5627
 
                   adb_instanceType_t* _instanceType,
5628
 
                   const axutil_env_t *env, int i)
5629
 
           {
5630
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
5631
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
5632
 
 
5633
 
               return (_instanceType->is_valid_groupNames == AXIS2_FALSE ||
5634
 
                        NULL == _instanceType->property_groupNames ||
5635
 
                        NULL == axutil_array_list_get(_instanceType->property_groupNames, env, i));
5636
 
           }
5637
 
 
5638
 
           /**
5639
 
            * Set groupNames to nill at i
5640
 
            */
5641
 
           axis2_status_t AXIS2_CALL
5642
 
           adb_instanceType_set_groupNames_nil_at(
5643
 
                   adb_instanceType_t* _instanceType,
5644
 
                   const axutil_env_t *env, int i)
5645
 
           {
5646
 
                void *element = NULL;
5647
 
                int size = 0;
5648
 
                int j;
5649
 
                axis2_bool_t non_nil_exists = AXIS2_FALSE;
5650
 
 
5651
 
                int k = 0;
5652
 
 
5653
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
5654
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
5655
 
 
5656
 
                if(_instanceType->property_groupNames == NULL ||
5657
 
                            _instanceType->is_valid_groupNames == AXIS2_FALSE)
5658
 
                {
5659
 
 
5660
 
                    non_nil_exists = AXIS2_FALSE;
5661
 
                }
5662
 
                else
5663
 
                {
5664
 
                    size = axutil_array_list_size(_instanceType->property_groupNames, env);
5665
 
                    for(j = 0, k = 0; j < size; j ++ )
5666
 
                    {
5667
 
                        if(i == j) continue;
5668
 
                        if(NULL != axutil_array_list_get(_instanceType->property_groupNames, env, i))
5669
 
                        {
5670
 
                            k ++;
5671
 
                            non_nil_exists = AXIS2_TRUE;
5672
 
                            if( k >= 0)
5673
 
                            {
5674
 
                                break;
5675
 
                            }
5676
 
                        }
5677
 
                    }
5678
 
                }
5679
 
 
5680
 
 
5681
 
                if( k < 0)
5682
 
                {
5683
 
                       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Size of the array of groupNames is beinng set to be smaller than the specificed number of minOccurs(0)");
5684
 
                       return AXIS2_FAILURE;
5685
 
                }
5686
 
 
5687
 
                if(_instanceType->property_groupNames == NULL)
5688
 
                {
5689
 
                    _instanceType->is_valid_groupNames = AXIS2_FALSE;
5690
 
 
5691
 
                    return AXIS2_SUCCESS;
5692
 
                }
5693
 
 
5694
 
                /* check whether there already exist an element */
5695
 
                element = axutil_array_list_get(_instanceType->property_groupNames, env, i);
5696
 
                if(NULL != element)
5697
 
                {
5698
 
 
5699
 
 
5700
 
 
5701
 
                       /* This is an unknown type or a primitive. Please free this manually*/
5702
 
 
5703
 
                }
5704
 
 
5705
 
 
5706
 
                    if(!non_nil_exists)
5707
 
                    {
5708
 
 
5709
 
                        _instanceType->is_valid_groupNames = AXIS2_FALSE;
5710
 
                        axutil_array_list_set(_instanceType->property_groupNames , env, i, NULL);
5711
 
                        return AXIS2_SUCCESS;
5712
 
                    }
5713
 
 
5714
 
 
5715
 
 
5716
 
                axutil_array_list_set(_instanceType->property_groupNames , env, i, NULL);
5717
 
 
5718
 
                return AXIS2_SUCCESS;
5719
 
 
5720
 
           }
5721
 
 
5722
 
 
5723
 
 
5724
 
            /**
5725
 
             * getter for volumes.
5726
 
             */
5727
 
            axutil_array_list_t* AXIS2_CALL
5728
 
            adb_instanceType_get_volumes(
5729
 
                    adb_instanceType_t* _instanceType,
5730
 
                    const axutil_env_t *env)
5731
 
             {
5732
 
 
5733
 
                    AXIS2_ENV_CHECK(env, NULL);
5734
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
5735
 
 
5736
 
 
5737
 
                return _instanceType->property_volumes;
5738
 
             }
5739
 
 
5740
 
            /**
5741
 
             * setter for volumes
5742
 
             */
5743
 
            axis2_status_t AXIS2_CALL
5744
 
            adb_instanceType_set_volumes(
5745
 
                    adb_instanceType_t* _instanceType,
5746
 
                    const axutil_env_t *env,
5747
 
                    axutil_array_list_t*  arg_volumes)
5748
 
             {
5749
 
 
5750
 
                 int size = 0;
5751
 
                 int i = 0;
5752
 
                 axis2_bool_t non_nil_exists = AXIS2_FALSE;
5753
 
 
5754
 
 
5755
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
5756
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
5757
 
 
5758
 
                if(_instanceType->is_valid_volumes &&
5759
 
                        arg_volumes == _instanceType->property_volumes)
5760
 
                {
5761
 
 
5762
 
                    return AXIS2_SUCCESS;
5763
 
                }
5764
 
 
5765
 
 
5766
 
                 size = axutil_array_list_size(arg_volumes, env);
5767
 
 
5768
 
                     if (size > 64)
5769
 
                     {
5770
 
                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "volumes has exceed the maxOccurs(64)");
5771
 
                         return AXIS2_FAILURE;
5772
 
                     }
5773
 
 
5774
 
                 if (size < 0)
5775
 
                 {
5776
 
                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "volumes has less than minOccurs(0)");
5777
 
                     return AXIS2_FAILURE;
5778
 
                 }
5779
 
                 for(i = 0; i < size; i ++ )
5780
 
                 {
5781
 
                     if(NULL != axutil_array_list_get(arg_volumes, env, i))
5782
 
                     {
5783
 
                         non_nil_exists = AXIS2_TRUE;
5784
 
                         break;
5785
 
                     }
5786
 
                 }
5787
 
 
5788
 
                 adb_instanceType_reset_volumes(_instanceType, env);
5789
 
 
5790
 
 
5791
 
                if(NULL == arg_volumes)
5792
 
                {
5793
 
                    /* We are already done */
5794
 
                    return AXIS2_SUCCESS;
5795
 
                }
5796
 
                _instanceType->property_volumes = arg_volumes;
5797
 
                        if(non_nil_exists)
5798
 
                        {
5799
 
                            _instanceType->is_valid_volumes = AXIS2_TRUE;
5800
 
                        }
5801
 
 
5802
 
 
5803
 
                return AXIS2_SUCCESS;
5804
 
             }
5805
 
 
5806
 
 
5807
 
            /**
5808
 
             * Get ith element of volumes.
5809
 
             */
5810
 
            adb_volumeType_t* AXIS2_CALL
5811
 
            adb_instanceType_get_volumes_at(
5812
 
                    adb_instanceType_t* _instanceType,
5813
 
                    const axutil_env_t *env, int i)
5814
 
            {
5815
 
                adb_volumeType_t* ret_val;
5816
 
 
5817
 
 
5818
 
                    AXIS2_ENV_CHECK(env, NULL);
5819
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
5820
 
 
5821
 
 
5822
 
                if(_instanceType->property_volumes == NULL)
5823
 
                {
5824
 
                    return (adb_volumeType_t*)0;
5825
 
                }
5826
 
                ret_val = (adb_volumeType_t*)axutil_array_list_get(_instanceType->property_volumes, env, i);
5827
 
 
5828
 
                    return ret_val;
5829
 
 
5830
 
            }
5831
 
 
5832
 
            /**
5833
 
             * Set the ith element of volumes.
5834
 
             */
5835
 
            axis2_status_t AXIS2_CALL
5836
 
            adb_instanceType_set_volumes_at(
5837
 
                    adb_instanceType_t* _instanceType,
5838
 
                    const axutil_env_t *env, int i,
5839
 
                    adb_volumeType_t* arg_volumes)
5840
 
            {
5841
 
                void *element = NULL;
5842
 
                int size = 0;
5843
 
                int j;
5844
 
                int k;
5845
 
                axis2_bool_t non_nil_exists = AXIS2_FALSE;
5846
 
 
5847
 
 
5848
 
 
5849
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
5850
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
5851
 
 
5852
 
                if( _instanceType->is_valid_volumes &&
5853
 
                    _instanceType->property_volumes &&
5854
 
 
5855
 
                    arg_volumes == (adb_volumeType_t*)axutil_array_list_get(_instanceType->property_volumes, env, i))
5856
 
 
5857
 
                {
5858
 
 
5859
 
                    return AXIS2_SUCCESS;
5860
 
                }
5861
 
 
5862
 
 
5863
 
                    if(NULL == arg_volumes)
5864
 
                    {
5865
 
                        if(_instanceType->property_volumes != NULL)
5866
 
                        {
5867
 
                            size = axutil_array_list_size(_instanceType->property_volumes, env);
5868
 
                            for(j = 0, k = 0; j < size; j ++ )
5869
 
                            {
5870
 
                                if(i == j) continue;
5871
 
                                if(NULL != axutil_array_list_get(_instanceType->property_volumes, env, i))
5872
 
                                {
5873
 
                                    k ++;
5874
 
                                    non_nil_exists = AXIS2_TRUE;
5875
 
                                    if(k >= 0)
5876
 
                                    {
5877
 
                                        break;
5878
 
                                    }
5879
 
                                }
5880
 
                            }
5881
 
                        }
5882
 
                    }
5883
 
                    else
5884
 
                    {
5885
 
                        non_nil_exists = AXIS2_TRUE;
5886
 
                    }
5887
 
 
5888
 
                if( k < 0)
5889
 
                {
5890
 
                       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Size of the array of volumes is beinng set to be smaller than the specificed number of minOccurs(0)");
5891
 
                       return AXIS2_FAILURE;
5892
 
                }
5893
 
 
5894
 
                if(_instanceType->property_volumes == NULL)
5895
 
                {
5896
 
                    _instanceType->property_volumes = axutil_array_list_create(env, 10);
5897
 
                }
5898
 
 
5899
 
                /* check whether there already exist an element */
5900
 
                element = axutil_array_list_get(_instanceType->property_volumes, env, i);
5901
 
                if(NULL != element)
5902
 
                {
5903
 
 
5904
 
 
5905
 
 
5906
 
                        adb_volumeType_free((adb_volumeType_t*)element, env);
5907
 
 
5908
 
                }
5909
 
 
5910
 
 
5911
 
                    if(!non_nil_exists)
5912
 
                    {
5913
 
 
5914
 
                        _instanceType->is_valid_volumes = AXIS2_FALSE;
5915
 
                        axutil_array_list_set(_instanceType->property_volumes , env, i, NULL);
5916
 
 
5917
 
                        return AXIS2_SUCCESS;
5918
 
                    }
5919
 
 
5920
 
                   axutil_array_list_set(_instanceType->property_volumes , env, i, arg_volumes);
5921
 
                  _instanceType->is_valid_volumes = AXIS2_TRUE;
5922
 
 
5923
 
                return AXIS2_SUCCESS;
5924
 
            }
5925
 
 
5926
 
            /**
5927
 
             * Add to volumes.
5928
 
             */
5929
 
            axis2_status_t AXIS2_CALL
5930
 
            adb_instanceType_add_volumes(
5931
 
                    adb_instanceType_t* _instanceType,
5932
 
                    const axutil_env_t *env,
5933
 
                    adb_volumeType_t* arg_volumes)
5934
 
             {
5935
 
 
5936
 
 
5937
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
5938
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
5939
 
 
5940
 
 
5941
 
                    if(NULL == arg_volumes)
5942
 
                    {
5943
 
 
5944
 
                           return AXIS2_SUCCESS;
5945
 
 
5946
 
                    }
5947
 
 
5948
 
 
5949
 
                if(_instanceType->property_volumes == NULL)
5950
 
                {
5951
 
                    _instanceType->property_volumes = axutil_array_list_create(env, 10);
5952
 
                }
5953
 
                if(_instanceType->property_volumes == NULL)
5954
 
                {
5955
 
                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Failed in allocatting memory for volumes");
5956
 
                    return AXIS2_FAILURE;
5957
 
 
5958
 
                }
5959
 
 
5960
 
                   axutil_array_list_add(_instanceType->property_volumes , env, arg_volumes);
5961
 
                  _instanceType->is_valid_volumes = AXIS2_TRUE;
5962
 
                return AXIS2_SUCCESS;
5963
 
             }
5964
 
 
5965
 
            /**
5966
 
             * Get the size of the volumes array.
5967
 
             */
5968
 
            int AXIS2_CALL
5969
 
            adb_instanceType_sizeof_volumes(
5970
 
                    adb_instanceType_t* _instanceType,
5971
 
                    const axutil_env_t *env)
5972
 
            {
5973
 
                AXIS2_ENV_CHECK(env, -1);
5974
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, -1);
5975
 
                if(_instanceType->property_volumes == NULL)
5976
 
                {
5977
 
                    return 0;
5978
 
                }
5979
 
                return axutil_array_list_size(_instanceType->property_volumes, env);
5980
 
            }
5981
 
 
5982
 
            /**
5983
 
             * remove the ith element, same as set_nil_at.
5984
 
             */
5985
 
            axis2_status_t AXIS2_CALL
5986
 
            adb_instanceType_remove_volumes_at(
5987
 
                    adb_instanceType_t* _instanceType,
5988
 
                    const axutil_env_t *env, int i)
5989
 
            {
5990
 
                return adb_instanceType_set_volumes_nil_at(_instanceType, env, i);
5991
 
            }
5992
 
 
5993
 
 
5994
 
 
5995
 
           /**
5996
 
            * resetter for volumes
5997
 
            */
5998
 
           axis2_status_t AXIS2_CALL
5999
 
           adb_instanceType_reset_volumes(
6000
 
                   adb_instanceType_t* _instanceType,
6001
 
                   const axutil_env_t *env)
6002
 
           {
6003
 
               int i = 0;
6004
 
               int count = 0;
6005
 
               void *element = NULL;
6006
 
 
6007
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
6008
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
6009
 
 
6010
 
 
6011
 
 
6012
 
                  if (_instanceType->property_volumes != NULL)
6013
 
                  {
6014
 
                      count = axutil_array_list_size(_instanceType->property_volumes, env);
6015
 
                      for(i = 0; i < count; i ++)
6016
 
                      {
6017
 
                         element = axutil_array_list_get(_instanceType->property_volumes, env, i);
6018
 
 
6019
 
 
6020
 
 
6021
 
                if(element != NULL)
6022
 
                {
6023
 
 
6024
 
 
6025
 
                        adb_volumeType_free((adb_volumeType_t*)element, env);
6026
 
                     element = NULL;
6027
 
                }
6028
 
 
6029
 
 
6030
 
 
6031
 
 
6032
 
                      }
6033
 
                      axutil_array_list_free(_instanceType->property_volumes, env);
6034
 
                  }
6035
 
                _instanceType->is_valid_volumes = AXIS2_FALSE;
6036
 
               return AXIS2_SUCCESS;
6037
 
           }
6038
 
 
6039
 
           /**
6040
 
            * Check whether volumes is nill
6041
 
            */
6042
 
           axis2_bool_t AXIS2_CALL
6043
 
           adb_instanceType_is_volumes_nil(
6044
 
                   adb_instanceType_t* _instanceType,
6045
 
                   const axutil_env_t *env)
6046
 
           {
6047
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
6048
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
6049
 
 
6050
 
               return !_instanceType->is_valid_volumes;
6051
 
           }
6052
 
 
6053
 
           /**
6054
 
            * Set volumes to nill (currently the same as reset)
6055
 
            */
6056
 
           axis2_status_t AXIS2_CALL
6057
 
           adb_instanceType_set_volumes_nil(
6058
 
                   adb_instanceType_t* _instanceType,
6059
 
                   const axutil_env_t *env)
6060
 
           {
6061
 
               return adb_instanceType_reset_volumes(_instanceType, env);
6062
 
           }
6063
 
 
6064
 
 
6065
 
           /**
6066
 
            * Check whether volumes is nill at i
6067
 
            */
6068
 
           axis2_bool_t AXIS2_CALL
6069
 
           adb_instanceType_is_volumes_nil_at(
6070
 
                   adb_instanceType_t* _instanceType,
6071
 
                   const axutil_env_t *env, int i)
6072
 
           {
6073
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
6074
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
6075
 
 
6076
 
               return (_instanceType->is_valid_volumes == AXIS2_FALSE ||
6077
 
                        NULL == _instanceType->property_volumes ||
6078
 
                        NULL == axutil_array_list_get(_instanceType->property_volumes, env, i));
6079
 
           }
6080
 
 
6081
 
           /**
6082
 
            * Set volumes to nill at i
6083
 
            */
6084
 
           axis2_status_t AXIS2_CALL
6085
 
           adb_instanceType_set_volumes_nil_at(
6086
 
                   adb_instanceType_t* _instanceType,
6087
 
                   const axutil_env_t *env, int i)
6088
 
           {
6089
 
                void *element = NULL;
6090
 
                int size = 0;
6091
 
                int j;
6092
 
                axis2_bool_t non_nil_exists = AXIS2_FALSE;
6093
 
 
6094
 
                int k = 0;
6095
 
 
6096
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
6097
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
6098
 
 
6099
 
                if(_instanceType->property_volumes == NULL ||
6100
 
                            _instanceType->is_valid_volumes == AXIS2_FALSE)
6101
 
                {
6102
 
 
6103
 
                    non_nil_exists = AXIS2_FALSE;
6104
 
                }
6105
 
                else
6106
 
                {
6107
 
                    size = axutil_array_list_size(_instanceType->property_volumes, env);
6108
 
                    for(j = 0, k = 0; j < size; j ++ )
6109
 
                    {
6110
 
                        if(i == j) continue;
6111
 
                        if(NULL != axutil_array_list_get(_instanceType->property_volumes, env, i))
6112
 
                        {
6113
 
                            k ++;
6114
 
                            non_nil_exists = AXIS2_TRUE;
6115
 
                            if( k >= 0)
6116
 
                            {
6117
 
                                break;
6118
 
                            }
6119
 
                        }
6120
 
                    }
6121
 
                }
6122
 
 
6123
 
 
6124
 
                if( k < 0)
6125
 
                {
6126
 
                       AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Size of the array of volumes is beinng set to be smaller than the specificed number of minOccurs(0)");
6127
 
                       return AXIS2_FAILURE;
6128
 
                }
6129
 
 
6130
 
                if(_instanceType->property_volumes == NULL)
6131
 
                {
6132
 
                    _instanceType->is_valid_volumes = AXIS2_FALSE;
6133
 
 
6134
 
                    return AXIS2_SUCCESS;
6135
 
                }
6136
 
 
6137
 
                /* check whether there already exist an element */
6138
 
                element = axutil_array_list_get(_instanceType->property_volumes, env, i);
6139
 
                if(NULL != element)
6140
 
                {
6141
 
 
6142
 
 
6143
 
 
6144
 
                        adb_volumeType_free((adb_volumeType_t*)element, env);
6145
 
 
6146
 
                }
6147
 
 
6148
 
 
6149
 
                    if(!non_nil_exists)
6150
 
                    {
6151
 
 
6152
 
                        _instanceType->is_valid_volumes = AXIS2_FALSE;
6153
 
                        axutil_array_list_set(_instanceType->property_volumes , env, i, NULL);
6154
 
                        return AXIS2_SUCCESS;
6155
 
                    }
6156
 
 
6157
 
 
6158
 
 
6159
 
                axutil_array_list_set(_instanceType->property_volumes , env, i, NULL);
6160
 
 
6161
 
                return AXIS2_SUCCESS;
6162
 
 
6163
 
           }
6164
 
 
6165
 
 
6166
 
 
6167
 
            /**
6168
 
             * getter for serviceTag.
6169
 
             */
6170
 
            axis2_char_t* AXIS2_CALL
6171
 
            adb_instanceType_get_serviceTag(
6172
 
                    adb_instanceType_t* _instanceType,
6173
 
                    const axutil_env_t *env)
6174
 
             {
6175
 
 
6176
 
                    AXIS2_ENV_CHECK(env, NULL);
6177
 
                    AXIS2_PARAM_CHECK(env->error, _instanceType, NULL);
6178
 
 
6179
 
 
6180
 
                return _instanceType->property_serviceTag;
6181
 
             }
6182
 
 
6183
 
            /**
6184
 
             * setter for serviceTag
6185
 
             */
6186
 
            axis2_status_t AXIS2_CALL
6187
 
            adb_instanceType_set_serviceTag(
6188
 
                    adb_instanceType_t* _instanceType,
6189
 
                    const axutil_env_t *env,
6190
 
                    const axis2_char_t*  arg_serviceTag)
6191
 
             {
6192
 
 
6193
 
 
6194
 
                AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
6195
 
                AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
6196
 
 
6197
 
                if(_instanceType->is_valid_serviceTag &&
6198
 
                        arg_serviceTag == _instanceType->property_serviceTag)
6199
 
                {
6200
 
 
6201
 
                    return AXIS2_SUCCESS;
6202
 
                }
6203
 
 
6204
 
                adb_instanceType_reset_serviceTag(_instanceType, env);
6205
 
 
6206
 
 
6207
 
                if(NULL == arg_serviceTag)
6208
 
                {
6209
 
                    /* We are already done */
6210
 
                    return AXIS2_SUCCESS;
6211
 
                }
6212
 
                _instanceType->property_serviceTag = (axis2_char_t *)axutil_strdup(env, arg_serviceTag);
6213
 
                        if(NULL == _instanceType->property_serviceTag)
6214
 
                        {
6215
 
                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error allocating memeory for serviceTag");
6216
 
                            return AXIS2_FAILURE;
6217
 
                        }
6218
 
                        _instanceType->is_valid_serviceTag = AXIS2_TRUE;
6219
 
 
6220
 
                return AXIS2_SUCCESS;
6221
 
             }
6222
 
 
6223
 
 
6224
 
 
6225
 
           /**
6226
 
            * resetter for serviceTag
6227
 
            */
6228
 
           axis2_status_t AXIS2_CALL
6229
 
           adb_instanceType_reset_serviceTag(
6230
 
                   adb_instanceType_t* _instanceType,
6231
 
                   const axutil_env_t *env)
6232
 
           {
6233
 
               int i = 0;
6234
 
               int count = 0;
6235
 
               void *element = NULL;
6236
 
 
6237
 
               AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
6238
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_FAILURE);
6239
 
 
6240
 
 
6241
 
 
6242
 
 
6243
 
 
6244
 
                if(_instanceType->property_serviceTag != NULL)
6245
 
                {
6246
 
 
6247
 
 
6248
 
                        AXIS2_FREE(env-> allocator, _instanceType->property_serviceTag);
6249
 
                     _instanceType->property_serviceTag = NULL;
6250
 
                }
6251
 
 
6252
 
 
6253
 
 
6254
 
                _instanceType->is_valid_serviceTag = AXIS2_FALSE;
6255
 
               return AXIS2_SUCCESS;
6256
 
           }
6257
 
 
6258
 
           /**
6259
 
            * Check whether serviceTag is nill
6260
 
            */
6261
 
           axis2_bool_t AXIS2_CALL
6262
 
           adb_instanceType_is_serviceTag_nil(
6263
 
                   adb_instanceType_t* _instanceType,
6264
 
                   const axutil_env_t *env)
6265
 
           {
6266
 
               AXIS2_ENV_CHECK(env, AXIS2_TRUE);
6267
 
               AXIS2_PARAM_CHECK(env->error, _instanceType, AXIS2_TRUE);
6268
 
 
6269
 
               return !_instanceType->is_valid_serviceTag;
6270
 
           }
6271
 
 
6272
 
           /**
6273
 
            * Set serviceTag to nill (currently the same as reset)
6274
 
            */
6275
 
           axis2_status_t AXIS2_CALL
6276
 
           adb_instanceType_set_serviceTag_nil(
6277
 
                   adb_instanceType_t* _instanceType,
6278
 
                   const axutil_env_t *env)
6279
 
           {
6280
 
               return adb_instanceType_reset_serviceTag(_instanceType, env);
6281
 
           }
6282
 
 
6283
 
 
6284