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

« back to all changes in this revision

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