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

« back to all changes in this revision

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