| 1 | /* | |
| 2 | * Copyright 1999-2006 University of Chicago | |
| 3 | * | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | ||
| 17 | ||
| 18 | /* | |
| 19 | * This file is automatically generated by the Globus WSDLtoC converter | |
| 20 | */ | |
| 21 | ||
| 22 | #include "xsd_QName.h" | |
| 23 | #include "globus_soap_message.h" | |
| 24 | #include "globus_xsd_type_info.h" | |
| 25 | #include "nptest_ExpectNotificationTestType.h" | |
| 26 | ||
| 27 | #ifndef GLOBUS_DONT_DOCUMENT_INTERNAL | |
| 28 | xsd_QName nptest_ExpectNotificationTestType_qname = | |
| 29 | { | |
| 30 | NPTEST_EXPECTNOTIFICATIONTESTTYPE_NS, | |
| 31 | NPTEST_EXPECTNOTIFICATIONTESTTYPE_LOCAL | |
| 32 | }; | |
| 33 | #endif /* GLOBUS_DONT_DOCUMENT_INTERNAL */ | |
| 34 | ||
| 35 | globus_result_t | |
| 36 | nptest_ExpectNotificationTestType_serialize_wrapper( | |
| 37 | const xsd_QName * element_qname, | |
| 38 | const void * instance, | |
| 39 | globus_soap_message_handle_t message_handle, | |
| 40 | globus_xsd_element_options_t options) | |
| 41 | 0 | { |
| 42 | 0 | return nptest_ExpectNotificationTestType_serialize( |
| 43 | element_qname, | |
| 44 | (const nptest_ExpectNotificationTestType *) instance, | |
| 45 | message_handle, options); | |
| 46 | } | |
| 47 | ||
| 48 | globus_result_t | |
| 49 | nptest_ExpectNotificationTestType_deserialize_pointer_wrapper( | |
| 50 | const xsd_QName * element_qname, | |
| 51 | void ** ip, | |
| 52 | globus_soap_message_handle_t message_handle, | |
| 53 | globus_xsd_element_options_t options) | |
| 54 | 0 | { |
| 55 | 0 | return nptest_ExpectNotificationTestType_deserialize_pointer( |
| 56 | element_qname, | |
| 57 | (nptest_ExpectNotificationTestType **) ip, | |
| 58 | message_handle, options); | |
| 59 | } | |
| 60 | ||
| 61 | globus_result_t | |
| 62 | nptest_ExpectNotificationTestType_init_wrapper(void **object) | |
| 63 | 0 | { |
| 64 | 0 | return nptest_ExpectNotificationTestType_init( |
| 65 | (nptest_ExpectNotificationTestType **) object); | |
| 66 | } | |
| 67 | ||
| 68 | void | |
| 69 | nptest_ExpectNotificationTestType_destroy_wrapper( | |
| 70 | void * object) | |
| 71 | 0 | { |
| 72 | 0 | nptest_ExpectNotificationTestType_destroy( |
| 73 | (nptest_ExpectNotificationTestType *) object); | |
| 74 | } | |
| 75 | ||
| 76 | globus_result_t | |
| 77 | nptest_ExpectNotificationTestType_copy_wrapper( | |
| 78 | void ** dest_obj, | |
| 79 | const void * src_obj) | |
| 80 | 0 | { |
| 81 | 0 | return nptest_ExpectNotificationTestType_copy( |
| 82 | (nptest_ExpectNotificationTestType **) dest_obj, | |
| 83 | (nptest_ExpectNotificationTestType *) src_obj); | |
| 84 | } | |
| 85 | ||
| 86 | globus_result_t | |
| 87 | nptest_ExpectNotificationTestType_init_contents_wrapper(void *object) | |
| 88 | 0 | { |
| 89 | 0 | return nptest_ExpectNotificationTestType_init_contents( |
| 90 | (nptest_ExpectNotificationTestType *) object); | |
| 91 | } | |
| 92 | ||
| 93 | void | |
| 94 | nptest_ExpectNotificationTestType_destroy_contents_wrapper( | |
| 95 | void * object) | |
| 96 | 0 | { |
| 97 | 0 | nptest_ExpectNotificationTestType_destroy_contents( |
| 98 | (nptest_ExpectNotificationTestType *) object); | |
| 99 | } | |
| 100 | ||
| 101 | globus_result_t | |
| 102 | nptest_ExpectNotificationTestType_copy_contents_wrapper( | |
| 103 | void * dest_obj, | |
| 104 | const void * src_obj) | |
| 105 | 0 | { |
| 106 | 0 | return nptest_ExpectNotificationTestType_copy_contents( |
| 107 | (nptest_ExpectNotificationTestType *) dest_obj, | |
| 108 | (const nptest_ExpectNotificationTestType *) src_obj); | |
| 109 | } | |
| 110 | ||
| 111 | globus_result_t | |
| 112 | nptest_ExpectNotificationTestType_serialize_contents_wrapper( | |
| 113 | const xsd_QName * element_qname, | |
| 114 | const void * instance, | |
| 115 | globus_soap_message_handle_t message_handle, | |
| 116 | globus_xsd_element_options_t options) | |
| 117 | 0 | { |
| 118 | 0 | return nptest_ExpectNotificationTestType_serialize_contents( |
| 119 | element_qname, | |
| 120 | (nptest_ExpectNotificationTestType *) instance, | |
| 121 | message_handle, options); | |
| 122 | } | |
| 123 | ||
| 124 | globus_result_t | |
| 125 | nptest_ExpectNotificationTestType_deserialize_contents_wrapper( | |
| 126 | const xsd_QName * element_qname, | |
| 127 | void ** instance, | |
| 128 | globus_soap_message_handle_t message_handle, | |
| 129 | globus_xsd_element_options_t options) | |
| 130 | 0 | { |
| 131 | 0 | globus_result_t result; |
| 132 | 0 | GlobusFuncName(nptest_ExpectNotificationTestType_deserialize_contents_wrapper); |
| 133 | 0 | GlobusSoapMessageDebugEnter(); |
| 134 | ||
| 135 | 0 | if(!*instance) |
| 136 | { | |
| 137 | 0 | result = nptest_ExpectNotificationTestType_init( |
| 138 | (nptest_ExpectNotificationTestType **)instance); | |
| 139 | 0 | if(result != GLOBUS_SUCCESS) |
| 140 | { | |
| 141 | 0 | goto error; |
| 142 | } | |
| 143 | } | |
| 144 | ||
| 145 | 0 | result = nptest_ExpectNotificationTestType_deserialize_contents( |
| 146 | element_qname, | |
| 147 | *(nptest_ExpectNotificationTestType **)instance, | |
| 148 | message_handle, options); | |
| 149 | error: | |
| 150 | 0 | GlobusSoapMessageDebugExit(); |
| 151 | 0 | return result; |
| 152 | } | |
| 153 | ||
| 154 | globus_result_t | |
| 155 | nptest_ExpectNotificationTestType_array_serialize_wrapper( | |
| 156 | const xsd_QName * element, | |
| 157 | const void * instance, | |
| 158 | globus_soap_message_handle_t message, | |
| 159 | globus_xsd_element_options_t options) | |
| 160 | 0 | { |
| 161 | 0 | return nptest_ExpectNotificationTestType_array_serialize( |
| 162 | element, | |
| 163 | (nptest_ExpectNotificationTestType_array *) instance, | |
| 164 | message, options); | |
| 165 | } | |
| 166 | ||
| 167 | globus_result_t | |
| 168 | nptest_ExpectNotificationTestType_array_deserialize_wrapper( | |
| 169 | const xsd_QName * element_qname, | |
| 170 | void ** inst, | |
| 171 | globus_soap_message_handle_t message, | |
| 172 | globus_xsd_element_options_t options) | |
| 173 | 0 | { |
| 174 | 0 | if(!*inst) |
| 175 | { | |
| 176 | 0 | globus_result_t result; |
| 177 | ||
| 178 | 0 | result = nptest_ExpectNotificationTestType_array_init( |
| 179 | (nptest_ExpectNotificationTestType_array **)inst); | |
| 180 | 0 | if(result != GLOBUS_SUCCESS) |
| 181 | { | |
| 182 | 0 | return result; |
| 183 | } | |
| 184 | } | |
| 185 | ||
| 186 | 0 | return nptest_ExpectNotificationTestType_array_deserialize( |
| 187 | element_qname, | |
| 188 | *(nptest_ExpectNotificationTestType_array **) inst, | |
| 189 | message, options); | |
| 190 | } | |
| 191 | ||
| 192 | globus_result_t | |
| 193 | nptest_ExpectNotificationTestType_array_init_wrapper( | |
| 194 | void ** arr) | |
| 195 | 0 | { |
| 196 | 0 | return nptest_ExpectNotificationTestType_array_init( |
| 197 | (nptest_ExpectNotificationTestType_array **) arr); | |
| 198 | } | |
| 199 | ||
| 200 | void | |
| 201 | nptest_ExpectNotificationTestType_array_destroy_wrapper( | |
| 202 | void * arr) | |
| 203 | 0 | { |
| 204 | 0 | nptest_ExpectNotificationTestType_array_destroy( |
| 205 | (nptest_ExpectNotificationTestType_array *) arr); | |
| 206 | } | |
| 207 | ||
| 208 | globus_result_t | |
| 209 | nptest_ExpectNotificationTestType_array_copy_wrapper( | |
| 210 | void ** dest_arr, | |
| 211 | const void * src_arr) | |
| 212 | 0 | { |
| 213 | 0 | return nptest_ExpectNotificationTestType_array_copy( |
| 214 | (nptest_ExpectNotificationTestType_array **) dest_arr, | |
| 215 | (const nptest_ExpectNotificationTestType_array *) src_arr); | |
| 216 | } | |
| 217 | ||
| 218 | globus_result_t | |
| 219 | nptest_ExpectNotificationTestType_array_init_contents_wrapper( | |
| 220 | void * arr) | |
| 221 | 0 | { |
| 222 | 0 | return nptest_ExpectNotificationTestType_array_init_contents( |
| 223 | (nptest_ExpectNotificationTestType_array *) arr); | |
| 224 | } | |
| 225 | ||
| 226 | void | |
| 227 | nptest_ExpectNotificationTestType_array_destroy_contents_wrapper( | |
| 228 | void * arr) | |
| 229 | 0 | { |
| 230 | 0 | nptest_ExpectNotificationTestType_array_destroy_contents( |
| 231 | (nptest_ExpectNotificationTestType_array *) arr); | |
| 232 | } | |
| 233 | ||
| 234 | globus_result_t | |
| 235 | nptest_ExpectNotificationTestType_array_copy_contents_wrapper( | |
| 236 | void * dest_arr, | |
| 237 | const void * src_arr) | |
| 238 | 0 | { |
| 239 | 0 | return nptest_ExpectNotificationTestType_array_copy_contents( |
| 240 | (nptest_ExpectNotificationTestType_array *) dest_arr, | |
| 241 | (const nptest_ExpectNotificationTestType_array *) src_arr); | |
| 242 | } | |
| 243 | ||
| 244 | struct globus_xsd_type_info_s nptest_ExpectNotificationTestType_contents_info = | |
| 245 | { | |
| 246 | &nptest_ExpectNotificationTestType_qname, | |
| 247 | nptest_ExpectNotificationTestType_serialize_contents_wrapper, | |
| 248 | nptest_ExpectNotificationTestType_deserialize_contents_wrapper, | |
| 249 | nptest_ExpectNotificationTestType_init_wrapper, | |
| 250 | nptest_ExpectNotificationTestType_destroy_wrapper, | |
| 251 | nptest_ExpectNotificationTestType_copy_wrapper, | |
| 252 | nptest_ExpectNotificationTestType_init_contents_wrapper, | |
| 253 | nptest_ExpectNotificationTestType_destroy_contents_wrapper, | |
| 254 | nptest_ExpectNotificationTestType_copy_contents_wrapper, | |
| 255 | sizeof(nptest_ExpectNotificationTestType), | |
| 256 | NULL, | |
| 257 | NULL, | |
| 258 | NULL | |
| 259 | }; | |
| 260 | ||
| 261 | struct globus_xsd_type_info_s nptest_ExpectNotificationTestType_array_info = | |
| 262 | { | |
| 263 | &nptest_ExpectNotificationTestType_qname, | |
| 264 | nptest_ExpectNotificationTestType_array_serialize_wrapper, | |
| 265 | nptest_ExpectNotificationTestType_array_deserialize_wrapper, | |
| 266 | nptest_ExpectNotificationTestType_array_init_wrapper, | |
| 267 | nptest_ExpectNotificationTestType_array_destroy_wrapper, | |
| 268 | nptest_ExpectNotificationTestType_array_copy_wrapper, | |
| 269 | nptest_ExpectNotificationTestType_array_init_contents_wrapper, | |
| 270 | nptest_ExpectNotificationTestType_array_destroy_contents_wrapper, | |
| 271 | nptest_ExpectNotificationTestType_array_copy_contents_wrapper, | |
| 272 | sizeof(nptest_ExpectNotificationTestType), | |
| 273 | nptest_ExpectNotificationTestType_array_push_wrapper, | |
| 274 | NULL, | |
| 275 | NULL | |
| 276 | }; | |
| 277 | ||
| 278 | struct globus_xsd_type_info_s nptest_ExpectNotificationTestType_info = | |
| 279 | { | |
| 280 | &nptest_ExpectNotificationTestType_qname, | |
| 281 | nptest_ExpectNotificationTestType_serialize_wrapper, | |
| 282 | nptest_ExpectNotificationTestType_deserialize_pointer_wrapper, | |
| 283 | nptest_ExpectNotificationTestType_init_wrapper, | |
| 284 | nptest_ExpectNotificationTestType_destroy_wrapper, | |
| 285 | nptest_ExpectNotificationTestType_copy_wrapper, | |
| 286 | nptest_ExpectNotificationTestType_init_contents_wrapper, | |
| 287 | nptest_ExpectNotificationTestType_destroy_contents_wrapper, | |
| 288 | nptest_ExpectNotificationTestType_copy_contents_wrapper, | |
| 289 | sizeof(nptest_ExpectNotificationTestType), | |
| 290 | NULL, | |
| 291 | &nptest_ExpectNotificationTestType_contents_info, | |
| 292 | &nptest_ExpectNotificationTestType_array_info | |
| 293 | }; | |
| 294 | ||
| 295 | globus_result_t | |
| 296 | nptest_ExpectNotificationTestType_init_contents( | |
| 297 | nptest_ExpectNotificationTestType * instance) | |
| 298 | 0 | { |
| 299 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 300 | 0 | GlobusFuncName(nptest_ExpectNotificationTestType_init_contents); |
| 301 | 0 | GlobusSoapMessageDebugEnter(); |
| 302 | ||
| 303 | 0 | memset(instance, 0, sizeof(nptest_ExpectNotificationTestType)); |
| 304 | ||
| 305 | 0 | GlobusSoapMessageDebugExit(); |
| 306 | 0 | return result; |
| 307 | } | |
| 308 | ||
| 309 | globus_result_t | |
| 310 | nptest_ExpectNotificationTestType_init( | |
| 311 | nptest_ExpectNotificationTestType ** object) | |
| 312 | 0 | { |
| 313 | 0 | nptest_ExpectNotificationTestType * instance; |
| 314 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 315 | 0 | GlobusFuncName(nptest_ExpectNotificationTestType_init); |
| 316 | 0 | GlobusSoapMessageDebugEnter(); |
| 317 | ||
| 318 | 0 | instance = globus_malloc(sizeof(nptest_ExpectNotificationTestType)); |
| 319 | 0 | if(!instance) |
| 320 | { | |
| 321 | 0 | result = GlobusSoapMessageErrorOutOfMemory; |
| 322 | 0 | goto exit; |
| 323 | } | |
| 324 | ||
| 325 | 0 | memset(instance, 0, sizeof(nptest_ExpectNotificationTestType)); |
| 326 | ||
| 327 | 0 | *object = instance; |
| 328 | ||
| 329 | exit: | |
| 330 | 0 | GlobusSoapMessageDebugExit(); |
| 331 | 0 | return result; |
| 332 | } | |
| 333 | ||
| 334 | void | |
| 335 | nptest_ExpectNotificationTestType_destroy( | |
| 336 | nptest_ExpectNotificationTestType * instance) | |
| 337 | 0 | { |
| 338 | 0 | GlobusFuncName(nptest_ExpectNotificationTestType_destroy); |
| 339 | 0 | GlobusSoapMessageDebugEnter(); |
| 340 | ||
| 341 | 0 | if(!instance) |
| 342 | { | |
| 343 | 0 | goto exit; |
| 344 | } | |
| 345 | ||
| 346 | 0 | nptest_ExpectNotificationTestType_destroy_contents(instance); |
| 347 | 0 | globus_free(instance); |
| 348 | ||
| 349 | exit: | |
| 350 | ||
| 351 | 0 | GlobusSoapMessageDebugExit(); |
| 352 | } | |
| 353 | ||
| 354 | ||
| 355 | void | |
| 356 | nptest_ExpectNotificationTestType_destroy_contents( | |
| 357 | nptest_ExpectNotificationTestType * instance) | |
| 358 | 10 | { |
| 359 | 10 | GlobusFuncName(nptest_ExpectNotificationTestType_destroy_contents); |
| 360 | 10 | GlobusSoapMessageDebugEnter(); |
| 361 | ||
| 362 | 10 | if(instance) |
| 363 | { | |
| 364 | ||
| 365 | ||
| 366 | 10 | wsnt_TopicExpressionType_destroy_contents( |
| 367 | &instance->TopicExpression); | |
| 368 | ||
| 369 | 10 | xsd_string_array_destroy_contents(&instance->ConsumerTag); |
| 370 | ||
| 371 | 10 | xsd_anyType_destroy_contents( |
| 372 | &instance->TopicValue); | |
| 373 | ||
| 374 | } | |
| 375 | ||
| 376 | 10 | GlobusSoapMessageDebugExit(); |
| 377 | } | |
| 378 | ||
| 379 | ||
| 380 | globus_result_t | |
| 381 | nptest_ExpectNotificationTestType_copy( | |
| 382 | nptest_ExpectNotificationTestType ** dest_obj, | |
| 383 | const nptest_ExpectNotificationTestType * src_obj) | |
| 384 | 0 | { |
| 385 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 386 | 0 | nptest_ExpectNotificationTestType * instance; |
| 387 | 0 | GlobusFuncName(nptest_ExpectNotificationTestType_copy); |
| 388 | ||
| 389 | 0 | GlobusSoapMessageDebugEnter(); |
| 390 | ||
| 391 | 0 | instance = calloc(1, sizeof(nptest_ExpectNotificationTestType)); |
| 392 | 0 | if (instance == NULL) |
| 393 | { | |
| 394 | 0 | GlobusSoapMessageDebugExit(); |
| 395 | 0 | return GlobusSoapMessageErrorOutOfMemory; |
| 396 | } | |
| 397 | ||
| 398 | 0 | result = nptest_ExpectNotificationTestType_copy_contents(instance, src_obj); |
| 399 | 0 | if(result != GLOBUS_SUCCESS) |
| 400 | { | |
| 401 | 0 | globus_free(instance); |
| 402 | 0 | GlobusSoapMessageDebugExit(); |
| 403 | 0 | return GlobusSoapMessageErrorOutOfMemory; |
| 404 | } | |
| 405 | ||
| 406 | 0 | *dest_obj = instance; |
| 407 | 0 | GlobusSoapMessageDebugExit(); |
| 408 | 0 | return result; |
| 409 | } | |
| 410 | ||
| 411 | globus_result_t | |
| 412 | nptest_ExpectNotificationTestType_copy_contents( | |
| 413 | nptest_ExpectNotificationTestType * instance, | |
| 414 | const nptest_ExpectNotificationTestType * src_obj) | |
| 415 | 10 | { |
| 416 | 10 | globus_result_t result = GLOBUS_SUCCESS; |
| 417 | 10 | GlobusFuncName(nptest_ExpectNotificationTestType_copy_contents); |
| 418 | ||
| 419 | 10 | GlobusSoapMessageDebugEnter(); |
| 420 | ||
| 421 | 10 | result = wsnt_TopicExpressionType_copy_contents( |
| 422 | &instance->TopicExpression, | |
| 423 | &src_obj->TopicExpression); | |
| 424 | 10 | if(result != GLOBUS_SUCCESS) |
| 425 | { | |
| 426 | 0 | result = GlobusSoapMessageErrorCopyFailed( |
| 427 | result, NULL, &wsnt_TopicExpressionType_qname); | |
| 428 | 0 | goto TopicExpression_destroy; |
| 429 | } | |
| 430 | ||
| 431 | 10 | result = xsd_string_array_copy_contents( |
| 432 | &instance->ConsumerTag, | |
| 433 | &src_obj->ConsumerTag); | |
| 434 | 10 | if(result != GLOBUS_SUCCESS) |
| 435 | { | |
| 436 | 0 | result = GlobusSoapMessageErrorCopyFailed( |
| 437 | result, NULL, &xsd_string_qname); | |
| 438 | 0 | goto ConsumerTag_destroy_array; |
| 439 | } | |
| 440 | ||
| 441 | 10 | result = xsd_anyType_copy_contents( |
| 442 | &instance->TopicValue, | |
| 443 | &src_obj->TopicValue); | |
| 444 | 10 | if(result != GLOBUS_SUCCESS) |
| 445 | { | |
| 446 | 0 | result = GlobusSoapMessageErrorCopyFailed( |
| 447 | result, NULL, &xsd_anyType_qname); | |
| 448 | goto TopicValue_destroy; | |
| 449 | } | |
| 450 | ||
| 451 | 0 | goto exit; |
| 452 | ||
| 453 | fail_deserialize: | |
| 454 | 0 | xsd_anyType_destroy_contents( |
| 455 | &instance->TopicValue); | |
| 456 | ||
| 457 | TopicValue_destroy: | |
| 458 | 0 | xsd_string_array_destroy_contents( |
| 459 | &instance->ConsumerTag); | |
| 460 | ||
| 461 | ConsumerTag_destroy_array: | |
| 462 | 0 | wsnt_TopicExpressionType_destroy_contents( |
| 463 | &instance->TopicExpression); | |
| 464 | ||
| 465 | TopicExpression_destroy: | |
| 466 | ||
| 467 | ||
| 468 | exit: | |
| 469 | ||
| 470 | 10 | GlobusSoapMessageDebugExit(); |
| 471 | 10 | return result; |
| 472 | } | |
| 473 | ||
| 474 | ||
| 475 | ||
| 476 | globus_result_t | |
| 477 | nptest_ExpectNotificationTestType_serialize_contents( | |
| 478 | const xsd_QName * element_qname, /* ignored */ | |
| 479 | const nptest_ExpectNotificationTestType * inst, | |
| 480 | globus_soap_message_handle_t message_handle, | |
| 481 | globus_xsd_element_options_t options) | |
| 482 | 0 | { |
| 483 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 484 | 0 | GlobusFuncName(nptest_ExpectNotificationTestType_serialize_contents); |
| 485 | 0 | GlobusSoapMessageDebugEnter(); |
| 486 | ||
| 487 | 0 | result = nptest_ExpectNotificationTestType_serialize( |
| 488 | NULL, | |
| 489 | inst, | |
| 490 | message_handle, | |
| 491 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 492 | 0 | if(result != GLOBUS_SUCCESS) |
| 493 | { | |
| 494 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 495 | result, NULL, element_qname); | |
| 496 | goto exit; | |
| 497 | } | |
| 498 | ||
| 499 | exit: | |
| 500 | ||
| 501 | 0 | GlobusSoapMessageDebugExit(); |
| 502 | 0 | return result; |
| 503 | } | |
| 504 | ||
| 505 | ||
| 506 | ||
| 507 | globus_result_t | |
| 508 | nptest_ExpectNotificationTestType_serialize( | |
| 509 | const xsd_QName * element_qname, | |
| 510 | const nptest_ExpectNotificationTestType * instance, | |
| 511 | globus_soap_message_handle_t message_handle, | |
| 512 | globus_xsd_element_options_t options) | |
| 513 | 0 | { |
| 514 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 515 | 0 | xsd_QName subelement; |
| 516 | 0 | globus_list_t * any_attr_keys = NULL; |
| 517 | 0 | globus_list_t * any_attr_keys_iterator = NULL; |
| 518 | 0 | xsd_QName * type_attr = NULL; |
| 519 | ||
| 520 | 0 | char * prefix = NULL; |
| 521 | 0 | int prefix_created; |
| 522 | 0 | int define_prefix = 0; |
| 523 | 0 | int save_options = options; |
| 524 | ||
| 525 | 0 | GlobusFuncName(nptest_ExpectNotificationTestType_serialize); |
| 526 | 0 | GlobusSoapMessageDebugEnter(); |
| 527 | ||
| 528 | ||
| 529 | 0 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 530 | { | |
| 531 | /* serialize nptest_ExpectNotificationTestType element */ | |
| 532 | 0 | result = globus_soap_message_element_ns_set( |
| 533 | message_handle, | |
| 534 | element_qname, | |
| 535 | element_qname->Namespace, | |
| 536 | &options); | |
| 537 | 0 | if(result != GLOBUS_SUCCESS) |
| 538 | { | |
| 539 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 540 | result, NULL, element_qname); | |
| 541 | 0 | goto exit; |
| 542 | } | |
| 543 | ||
| 544 | 0 | if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 545 | !globus_soap_message_serialize_is_c14n_subset(message_handle))) | |
| 546 | { | |
| 547 | 0 | result = globus_soap_message_attribute_ns_set( |
| 548 | message_handle, | |
| 549 | element_qname, | |
| 550 | "http://www.w3.org/2001/XMLSchema-instance", | |
| 551 | &options); | |
| 552 | 0 | if(result != GLOBUS_SUCCESS) |
| 553 | { | |
| 554 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 555 | result, NULL, element_qname); | |
| 556 | 0 | goto exit; |
| 557 | } | |
| 558 | } | |
| 559 | ||
| 560 | 0 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 561 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 562 | { | |
| 563 | ||
| 564 | 0 | result = globus_soap_message_attribute_ns_set( |
| 565 | message_handle, | |
| 566 | element_qname, | |
| 567 | nptest_ExpectNotificationTestType_qname.Namespace, | |
| 568 | &options); | |
| 569 | 0 | if(result != GLOBUS_SUCCESS) |
| 570 | { | |
| 571 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 572 | result, NULL, element_qname); | |
| 573 | 0 | goto exit; |
| 574 | } | |
| 575 | } | |
| 576 | ||
| 577 | 0 | result = globus_soap_message_serialize_element( |
| 578 | message_handle, | |
| 579 | element_qname, | |
| 580 | options, | |
| 581 | &nptest_ExpectNotificationTestType_qname); | |
| 582 | 0 | if(result != GLOBUS_SUCCESS) |
| 583 | { | |
| 584 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 585 | result, NULL, element_qname); | |
| 586 | 0 | goto exit; |
| 587 | } | |
| 588 | ||
| 589 | 0 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 590 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 591 | { | |
| 592 | 0 | xsd_QName_init(&type_attr); |
| 593 | ||
| 594 | 0 | type_attr->local = globus_libc_strdup("type"); |
| 595 | 0 | type_attr->Namespace = globus_libc_strdup(XSI_NS); |
| 596 | } | |
| 597 | ||
| 598 | ||
| 599 | /* serialize namespaces */ | |
| 600 | 0 | result = globus_soap_message_element_ns_add( |
| 601 | message_handle, | |
| 602 | element_qname, | |
| 603 | element_qname->Namespace, | |
| 604 | &options); | |
| 605 | 0 | if(result != GLOBUS_SUCCESS) |
| 606 | { | |
| 607 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 608 | result, NULL, element_qname); | |
| 609 | 0 | goto exit; |
| 610 | } | |
| 611 | ||
| 612 | 0 | if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 613 | !globus_soap_message_serialize_is_c14n_subset(message_handle))) | |
| 614 | { | |
| 615 | 0 | result = globus_soap_message_attribute_ns_add( |
| 616 | message_handle, | |
| 617 | element_qname, | |
| 618 | "http://www.w3.org/2001/XMLSchema-instance", | |
| 619 | &options); | |
| 620 | 0 | if(result != GLOBUS_SUCCESS) |
| 621 | { | |
| 622 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 623 | result, NULL, element_qname); | |
| 624 | 0 | goto exit; |
| 625 | } | |
| 626 | } | |
| 627 | 0 | if ((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 628 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 629 | { | |
| 630 | ||
| 631 | 0 | result = globus_soap_message_attribute_ns_add( |
| 632 | message_handle, | |
| 633 | element_qname, | |
| 634 | nptest_ExpectNotificationTestType_qname.Namespace, | |
| 635 | &options); | |
| 636 | 0 | if(result != GLOBUS_SUCCESS) |
| 637 | { | |
| 638 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 639 | result, NULL, element_qname); | |
| 640 | 0 | goto exit; |
| 641 | } | |
| 642 | } | |
| 643 | ||
| 644 | /* serialize attributes */ | |
| 645 | ||
| 646 | 0 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 647 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 648 | { | |
| 649 | 0 | result = globus_soap_message_serialize_QName_attribute( |
| 650 | message_handle, | |
| 651 | type_attr, | |
| 652 | &nptest_ExpectNotificationTestType_qname); | |
| 653 | 0 | if(result != GLOBUS_SUCCESS) |
| 654 | { | |
| 655 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 656 | result, NULL, element_qname); | |
| 657 | 0 | goto exit; |
| 658 | } | |
| 659 | } | |
| 660 | ||
| 661 | ||
| 662 | } | |
| 663 | ||
| 664 | 0 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 665 | { | |
| 666 | 0 | result = globus_soap_message_serialize_element_begin_close( |
| 667 | message_handle, element_qname); | |
| 668 | 0 | if(result != GLOBUS_SUCCESS) |
| 669 | { | |
| 670 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 671 | result, NULL, element_qname); | |
| 672 | 0 | goto exit; |
| 673 | } | |
| 674 | } | |
| 675 | 0 | options &= ~GLOBUS_XSD_ELEMENT_CONTENTS_ONLY; |
| 676 | ||
| 677 | ||
| 678 | /* serialize contents of type */ | |
| 679 | ||
| 680 | 0 | subelement.local = "TopicExpression"; |
| 681 | 0 | subelement.Namespace = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"; |
| 682 | ||
| 683 | 0 | result = wsnt_TopicExpressionType_serialize( |
| 684 | &subelement, | |
| 685 | &instance->TopicExpression, | |
| 686 | message_handle, | |
| 687 | options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS)); | |
| 688 | 0 | if(result != GLOBUS_SUCCESS) |
| 689 | { | |
| 690 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 691 | result, NULL, &wsnt_TopicExpressionType_qname); | |
| 692 | 0 | goto exit; |
| 693 | } | |
| 694 | ||
| 695 | 0 | subelement.local = "ConsumerTag"; |
| 696 | 0 | subelement.Namespace = "http://www.globus.org/namespaces/2005/03/NotificationProducerTest"; |
| 697 | ||
| 698 | 0 | result = xsd_string_array_serialize( |
| 699 | &subelement, | |
| 700 | &instance->ConsumerTag, | |
| 701 | message_handle, | |
| 702 | options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS)); | |
| 703 | 0 | if(result != GLOBUS_SUCCESS) |
| 704 | { | |
| 705 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 706 | result, NULL, &xsd_string_qname); | |
| 707 | 0 | goto exit; |
| 708 | } | |
| 709 | ||
| 710 | 0 | subelement.local = "TopicValue"; |
| 711 | 0 | subelement.Namespace = "http://www.globus.org/namespaces/2005/03/NotificationProducerTest"; |
| 712 | ||
| 713 | 0 | result = xsd_anyType_serialize( |
| 714 | &subelement, | |
| 715 | &instance->TopicValue, | |
| 716 | message_handle, | |
| 717 | options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS)); | |
| 718 | 0 | if(result != GLOBUS_SUCCESS) |
| 719 | { | |
| 720 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 721 | result, NULL, &xsd_anyType_qname); | |
| 722 | 0 | goto exit; |
| 723 | } | |
| 724 | ||
| 725 | 0 | options = save_options; |
| 726 | ||
| 727 | 0 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 728 | { | |
| 729 | /* add end element */ | |
| 730 | 0 | result = globus_soap_message_serialize_element_end( |
| 731 | message_handle, | |
| 732 | element_qname, | |
| 733 | options, | |
| 734 | &nptest_ExpectNotificationTestType_qname); | |
| 735 | 0 | if(result != GLOBUS_SUCCESS) |
| 736 | { | |
| 737 | 0 | result = GlobusSoapMessageErrorSerializeFailed( |
| 738 | result, NULL, element_qname); | |
| 739 | 0 | goto exit; |
| 740 | } | |
| 741 | ||
| 742 | 0 | globus_soap_message_element_ns_remove( |
| 743 | message_handle, | |
| 744 | element_qname->Namespace, | |
| 745 | &options); | |
| 746 | ||
| 747 | /* remove namespace/prefix mappings for these types */ | |
| 748 | ||
| 749 | 0 | if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 750 | !globus_soap_message_serialize_is_c14n_subset(message_handle))) | |
| 751 | { | |
| 752 | 0 | globus_soap_message_attribute_ns_remove( |
| 753 | message_handle, | |
| 754 | "http://www.w3.org/2001/XMLSchema-instance", | |
| 755 | &options); | |
| 756 | } | |
| 757 | 0 | if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) && |
| 758 | !globus_soap_message_serialize_is_c14n_subset(message_handle)) | |
| 759 | { | |
| 760 | 0 | globus_soap_message_attribute_ns_remove( |
| 761 | message_handle, | |
| 762 | nptest_ExpectNotificationTestType_qname.Namespace, | |
| 763 | &options); | |
| 764 | } | |
| 765 | ||
| 766 | } | |
| 767 | ||
| 768 | exit: | |
| 769 | 0 | if (type_attr) |
| 770 | { | |
| 771 | 0 | xsd_QName_destroy(type_attr); |
| 772 | } | |
| 773 | ||
| 774 | ||
| 775 | 0 | if(any_attr_keys) |
| 776 | { | |
| 777 | 0 | globus_list_free(any_attr_keys); |
| 778 | } | |
| 779 | ||
| 780 | 0 | GlobusSoapMessageDebugExit(); |
| 781 | 0 | return result; |
| 782 | } | |
| 783 | ||
| 784 | ||
| 785 | ||
| 786 | globus_result_t | |
| 787 | nptest_ExpectNotificationTestType_deserialize_contents( | |
| 788 | const xsd_QName * element_qname, /* ignored */ | |
| 789 | nptest_ExpectNotificationTestType * inst, | |
| 790 | globus_soap_message_handle_t message_handle, | |
| 791 | globus_xsd_element_options_t options) | |
| 792 | 0 | { |
| 793 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 794 | 0 | GlobusFuncName(nptest_ExpectNotificationTestType_deserialize_contents); |
| 795 | 0 | GlobusSoapMessageDebugEnter(); |
| 796 | ||
| 797 | 0 | result = nptest_ExpectNotificationTestType_deserialize( |
| 798 | NULL, | |
| 799 | inst, | |
| 800 | message_handle, | |
| 801 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 802 | 0 | if(result != GLOBUS_SUCCESS) |
| 803 | { | |
| 804 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 805 | result, element_qname); | |
| 806 | goto exit; | |
| 807 | } | |
| 808 | ||
| 809 | exit: | |
| 810 | ||
| 811 | 0 | GlobusSoapMessageDebugExit(); |
| 812 | 0 | return result; |
| 813 | } | |
| 814 | ||
| 815 | ||
| 816 | ||
| 817 | globus_result_t | |
| 818 | nptest_ExpectNotificationTestType_deserialize( | |
| 819 | const xsd_QName * element_qname, | |
| 820 | nptest_ExpectNotificationTestType * instance, | |
| 821 | globus_soap_message_handle_t message_handle, | |
| 822 | globus_xsd_element_options_t options) | |
| 823 | 10 | { |
| 824 | 10 | globus_result_t result = GLOBUS_SUCCESS; |
| 825 | 10 | xsd_QName subelement; |
| 826 | 10 | GlobusFuncName(nptest_ExpectNotificationTestType_deserialize); |
| 827 | 10 | GlobusSoapMessageDebugEnter(); |
| 828 | ||
| 829 | ||
| 830 | 10 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 831 | { | |
| 832 | 10 | result = globus_soap_message_deserialize_element( |
| 833 | message_handle, element_qname); | |
| 834 | 10 | if(result != GLOBUS_SUCCESS) |
| 835 | { | |
| 836 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 837 | result, element_qname); | |
| 838 | 0 | goto exit; |
| 839 | } | |
| 840 | ||
| 841 | ||
| 842 | 10 | result = globus_soap_message_deserialize_element_begin_close( |
| 843 | message_handle); | |
| 844 | 10 | if(result != GLOBUS_SUCCESS) |
| 845 | { | |
| 846 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 847 | result, element_qname); | |
| 848 | 0 | goto fail_deserialize; |
| 849 | } | |
| 850 | } | |
| 851 | ||
| 852 | 10 | subelement.local = "TopicExpression"; |
| 853 | 10 | subelement.Namespace = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"; |
| 854 | ||
| 855 | 10 | result = wsnt_TopicExpressionType_deserialize( |
| 856 | &subelement, | |
| 857 | &instance->TopicExpression, | |
| 858 | message_handle, | |
| 859 | 0); | |
| 860 | 10 | if(result != GLOBUS_SUCCESS) |
| 861 | { | |
| 862 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 863 | result, | |
| 864 | &wsnt_TopicExpressionType_qname); | |
| 865 | 0 | goto TopicExpression_destroy; |
| 866 | } | |
| 867 | ||
| 868 | 10 | subelement.local = "ConsumerTag"; |
| 869 | 10 | subelement.Namespace = "http://www.globus.org/namespaces/2005/03/NotificationProducerTest"; |
| 870 | ||
| 871 | 10 | result = xsd_string_array_deserialize( |
| 872 | &subelement, | |
| 873 | &instance->ConsumerTag, | |
| 874 | message_handle, | |
| 875 | 0); | |
| 876 | 10 | if(result != GLOBUS_SUCCESS) |
| 877 | { | |
| 878 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 879 | result, | |
| 880 | (&subelement)); | |
| 881 | 0 | goto ConsumerTag_destroy_array; |
| 882 | } | |
| 883 | ||
| 884 | 10 | subelement.local = "TopicValue"; |
| 885 | 10 | subelement.Namespace = "http://www.globus.org/namespaces/2005/03/NotificationProducerTest"; |
| 886 | ||
| 887 | 10 | result = xsd_anyType_deserialize( |
| 888 | &subelement, | |
| 889 | &instance->TopicValue, | |
| 890 | message_handle, | |
| 891 | 0); | |
| 892 | 10 | if(result != GLOBUS_SUCCESS) |
| 893 | { | |
| 894 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 895 | result, | |
| 896 | &xsd_anyType_qname); | |
| 897 | 0 | goto TopicValue_destroy; |
| 898 | } | |
| 899 | ||
| 900 | 10 | if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY)) |
| 901 | { | |
| 902 | 10 | result = globus_soap_message_deserialize_element_end( |
| 903 | message_handle, | |
| 904 | element_qname); | |
| 905 | 10 | if(result != GLOBUS_SUCCESS) |
| 906 | { | |
| 907 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 908 | result, element_qname); | |
| 909 | goto fail_deserialize; | |
| 910 | } | |
| 911 | } | |
| 912 | ||
| 913 | 0 | goto exit; |
| 914 | ||
| 915 | fail_deserialize: | |
| 916 | 0 | xsd_anyType_destroy_contents( |
| 917 | &instance->TopicValue); | |
| 918 | ||
| 919 | TopicValue_destroy: | |
| 920 | 0 | xsd_string_array_destroy_contents( |
| 921 | &instance->ConsumerTag); | |
| 922 | ||
| 923 | ConsumerTag_destroy_array: | |
| 924 | 0 | wsnt_TopicExpressionType_destroy_contents( |
| 925 | &instance->TopicExpression); | |
| 926 | ||
| 927 | TopicExpression_destroy: | |
| 928 | ||
| 929 | ||
| 930 | exit: | |
| 931 | ||
| 932 | 10 | GlobusSoapMessageDebugExit(); |
| 933 | 10 | return result; |
| 934 | } | |
| 935 | ||
| 936 | ||
| 937 | ||
| 938 | globus_result_t | |
| 939 | nptest_ExpectNotificationTestType_deserialize_pointer( | |
| 940 | const xsd_QName * element_qname, | |
| 941 | nptest_ExpectNotificationTestType ** ip, | |
| 942 | globus_soap_message_handle_t message_handle, | |
| 943 | globus_xsd_element_options_t options) | |
| 944 | 0 | { |
| 945 | 0 | nptest_ExpectNotificationTestType * instance = NULL; |
| 946 | 0 | globus_result_t result = GLOBUS_SUCCESS; |
| 947 | 0 | xsd_QName subelement; |
| 948 | 0 | int found_attrs = 0; |
| 949 | 0 | int empty_element = 0; |
| 950 | 0 | GlobusFuncName(nptest_ExpectNotificationTestType_deserialize_pointer); |
| 951 | 0 | GlobusSoapMessageDebugEnter(); |
| 952 | ||
| 953 | 0 | *ip = NULL; |
| 954 | ||
| 955 | 0 | result = globus_soap_message_deserialize_element( |
| 956 | message_handle, element_qname); | |
| 957 | 0 | if(result != GLOBUS_SUCCESS && |
| 958 | (GlobusSoapMessageStatusElementNotFoundCheck(result) || | |
| 959 | GlobusSoapMessageStatusFailedElementCheck(result) || | |
| 960 | GlobusSoapMessageStatusFailedWithTextCheck(result))) | |
| 961 | { | |
| 962 | 0 | result = GLOBUS_SUCCESS; |
| 963 | 0 | goto exit; |
| 964 | } | |
| 965 | ||
| 966 | 0 | if(result != GLOBUS_SUCCESS) |
| 967 | { | |
| 968 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 969 | result, element_qname); | |
| 970 | 0 | goto exit; |
| 971 | } | |
| 972 | ||
| 973 | 0 | if(globus_soap_message_deserialize_element_is_empty( |
| 974 | message_handle)) | |
| 975 | { | |
| 976 | 0 | empty_element = 1; |
| 977 | } | |
| 978 | ||
| 979 | 0 | result = nptest_ExpectNotificationTestType_init(&instance); |
| 980 | 0 | if(result != GLOBUS_SUCCESS) |
| 981 | { | |
| 982 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 983 | result, element_qname); | |
| 984 | 0 | goto exit; |
| 985 | } | |
| 986 | ||
| 987 | ||
| 988 | 0 | if(found_attrs == 0 && |
| 989 | globus_soap_message_deserialize_element_is_nil(message_handle)) | |
| 990 | { | |
| 991 | 0 | nptest_ExpectNotificationTestType_destroy(instance); |
| 992 | ||
| 993 | 0 | result = globus_soap_message_deserialize_element_end( |
| 994 | message_handle, | |
| 995 | element_qname); | |
| 996 | 0 | if(result != GLOBUS_SUCCESS) |
| 997 | { | |
| 998 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 999 | result, element_qname); | |
| 1000 | 0 | goto exit; |
| 1001 | } | |
| 1002 | ||
| 1003 | 0 | *ip = NULL; |
| 1004 | 0 | globus_object_free(globus_error_get(result)); |
| 1005 | 0 | result = GLOBUS_SUCCESS; |
| 1006 | 0 | goto exit; |
| 1007 | } | |
| 1008 | ||
| 1009 | ||
| 1010 | 0 | if(empty_element) |
| 1011 | { | |
| 1012 | 0 | result = globus_soap_message_deserialize_element_end( |
| 1013 | message_handle, | |
| 1014 | element_qname); | |
| 1015 | 0 | if(result != GLOBUS_SUCCESS) |
| 1016 | { | |
| 1017 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1018 | result, element_qname); | |
| 1019 | 0 | goto fail_deserialize; |
| 1020 | } | |
| 1021 | ||
| 1022 | 0 | *ip = instance; |
| 1023 | 0 | goto exit; |
| 1024 | } | |
| 1025 | ||
| 1026 | 0 | result = globus_soap_message_deserialize_element_begin_close( |
| 1027 | message_handle); | |
| 1028 | 0 | if(result != GLOBUS_SUCCESS) |
| 1029 | { | |
| 1030 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1031 | result, element_qname); | |
| 1032 | 0 | goto exit; |
| 1033 | } | |
| 1034 | ||
| 1035 | 0 | result = nptest_ExpectNotificationTestType_deserialize( |
| 1036 | element_qname, | |
| 1037 | instance, | |
| 1038 | message_handle, | |
| 1039 | options | GLOBUS_XSD_ELEMENT_CONTENTS_ONLY); | |
| 1040 | ||
| 1041 | 0 | result = globus_soap_message_deserialize_element_end( |
| 1042 | message_handle, | |
| 1043 | element_qname); | |
| 1044 | 0 | if(result != GLOBUS_SUCCESS) |
| 1045 | { | |
| 1046 | 0 | result = GlobusSoapMessageErrorDeserializeFailed( |
| 1047 | result, element_qname); | |
| 1048 | 0 | goto fail_deserialize; |
| 1049 | } | |
| 1050 | ||
| 1051 | 0 | *ip = instance; |
| 1052 | ||
| 1053 | 0 | goto exit; |
| 1054 | ||
| 1055 | fail_deserialize: | |
| 1056 | 0 | xsd_anyType_destroy_contents( |
| 1057 | &instance->TopicValue); | |
| 1058 | ||
| 1059 | TopicValue_destroy: | |
| 1060 | 0 | xsd_string_array_destroy_contents( |
| 1061 | &instance->ConsumerTag); | |
| 1062 | ||
| 1063 | ConsumerTag_destroy_array: | |
| 1064 | 0 | wsnt_TopicExpressionType_destroy_contents( |
| 1065 | &instance->TopicExpression); | |
| 1066 | ||
| 1067 | TopicExpression_destroy: | |
| 1068 | ||
| 1069 | exit: | |
| 1070 | ||
| 1071 | 0 | GlobusSoapMessageDebugExit(); |
| 1072 | 0 | return result; |
| 1073 | } | |
| 1074 | ||
| 1075 | ||
| 1076 | globus_result_t | |
| 1077 | nptest_ExpectNotificationTestType_array_init_contents( | |
| 1078 | nptest_ExpectNotificationTestType_array * array) | |
| 1079 | 0 | { |
| 1080 | 0 | return globus_xsd_generic_array_init_contents( |
| 1081 | (globus_xsd_generic_array_t *) array, | |
| 1082 | &nptest_ExpectNotificationTestType_info); | |
| 1083 | } | |
| 1084 | /* nptest_ExpectNotificationTestType_array_init_contents() */ | |
| 1085 | ||
| 1086 | globus_result_t | |
| 1087 | nptest_ExpectNotificationTestType_array_init( | |
| 1088 | nptest_ExpectNotificationTestType_array ** arr) | |
| 1089 | 0 | { |
| 1090 | 0 | return globus_xsd_generic_array_init( |
| 1091 | (globus_xsd_generic_array_t **) arr, | |
| 1092 | &nptest_ExpectNotificationTestType_info); | |
| 1093 | } | |
| 1094 | /* nptest_ExpectNotificationTestType_array_init() */ | |
| 1095 | ||
| 1096 | void | |
| 1097 | nptest_ExpectNotificationTestType_array_destroy_contents( | |
| 1098 | nptest_ExpectNotificationTestType_array * array) | |
| 1099 | 0 | { |
| 1100 | 0 | globus_xsd_generic_array_destroy_contents( |
| 1101 | (globus_xsd_generic_array_t *) array); | |
| 1102 | } | |
| 1103 | /* nptest_ExpectNotificationTestType_array_destroy_contents() */ | |
| 1104 | ||
| 1105 | void | |
| 1106 | nptest_ExpectNotificationTestType_array_destroy( | |
| 1107 | nptest_ExpectNotificationTestType_array * array) | |
| 1108 | 0 | { |
| 1109 | 0 | globus_xsd_generic_array_destroy( |
| 1110 | (globus_xsd_generic_array_t *) array); | |
| 1111 | } | |
| 1112 | /* nptest_ExpectNotificationTestType_array_destroy() */ | |
| 1113 | ||
| 1114 | globus_result_t | |
| 1115 | nptest_ExpectNotificationTestType_array_copy( | |
| 1116 | nptest_ExpectNotificationTestType_array ** dest_arr, | |
| 1117 | const nptest_ExpectNotificationTestType_array * src_arr) | |
| 1118 | 0 | { |
| 1119 | 0 | return globus_xsd_generic_array_copy( |
| 1120 | (globus_xsd_generic_array_t **) dest_arr, | |
| 1121 | (globus_xsd_generic_array_t *) src_arr); | |
| 1122 | } | |
| 1123 | /* nptest_ExpectNotificationTestType_array_copy() */ | |
| 1124 | ||
| 1125 | globus_result_t | |
| 1126 | nptest_ExpectNotificationTestType_array_copy_contents( | |
| 1127 | nptest_ExpectNotificationTestType_array * dest_arr, | |
| 1128 | const nptest_ExpectNotificationTestType_array * src_arr) | |
| 1129 | 0 | { |
| 1130 | 0 | return globus_xsd_generic_array_copy_contents( |
| 1131 | (globus_xsd_generic_array_t *) dest_arr, | |
| 1132 | (globus_xsd_generic_array_t *) src_arr); | |
| 1133 | } | |
| 1134 | /* nptest_ExpectNotificationTestType_array_copy_contents() */ | |
| 1135 | ||
| 1136 | nptest_ExpectNotificationTestType * | |
| 1137 | nptest_ExpectNotificationTestType_array_push( | |
| 1138 | nptest_ExpectNotificationTestType_array * array) | |
| 1139 | 0 | { |
| 1140 | /* Some contents initializers don't initialize subelments but to set their | |
| 1141 | * values to be NULL | |
| 1142 | */ | |
| 1143 | 0 | if (array->type_info == NULL) |
| 1144 | { | |
| 1145 | 0 | array->type_info = &nptest_ExpectNotificationTestType_info; |
| 1146 | } | |
| 1147 | ||
| 1148 | 0 | return globus_xsd_generic_array_push( |
| 1149 | (globus_xsd_generic_array_t *) array); | |
| 1150 | } | |
| 1151 | /* nptest_ExpectNotificationTestType_array_push() */ | |
| 1152 | ||
| 1153 | void * | |
| 1154 | nptest_ExpectNotificationTestType_array_push_wrapper( | |
| 1155 | void * array) | |
| 1156 | 0 | { |
| 1157 | 0 | return (void *) nptest_ExpectNotificationTestType_array_push((nptest_ExpectNotificationTestType_array *) array); |
| 1158 | } | |
| 1159 | ||
| 1160 | globus_result_t | |
| 1161 | nptest_ExpectNotificationTestType_array_serialize( | |
| 1162 | const xsd_QName * element_qname, | |
| 1163 | const nptest_ExpectNotificationTestType_array * array, | |
| 1164 | globus_soap_message_handle_t message, | |
| 1165 | globus_xsd_element_options_t options) | |
| 1166 | 0 | { |
| 1167 | 0 | return globus_xsd_generic_array_serialize( |
| 1168 | element_qname, | |
| 1169 | (const globus_xsd_generic_array_t *) array, | |
| 1170 | message, | |
| 1171 | options); | |
| 1172 | } | |
| 1173 | /* nptest_ExpectNotificationTestType_array_serialize() */ | |
| 1174 | ||
| 1175 | globus_result_t | |
| 1176 | nptest_ExpectNotificationTestType_array_deserialize( | |
| 1177 | const xsd_QName * element_qname, | |
| 1178 | nptest_ExpectNotificationTestType_array * array, | |
| 1179 | globus_soap_message_handle_t message, | |
| 1180 | globus_xsd_element_options_t options) | |
| 1181 | 0 | { |
| 1182 | /* Some initializers set the array's contents to NULL */ | |
| 1183 | 0 | if (array->type_info == NULL) |
| 1184 | { | |
| 1185 | 0 | array->type_info = &nptest_ExpectNotificationTestType_info; |
| 1186 | } | |
| 1187 | 0 | return globus_xsd_generic_array_deserialize( |
| 1188 | element_qname, | |
| 1189 | (globus_xsd_generic_array_t *) array, | |
| 1190 | message, | |
| 1191 | options); |