/condor-7.9.0/src/condor_contrib/aviary/codegen/locator/src/AviaryLocator_LocateResponse.cpp

# · C++ · 1043 lines · 616 code · 328 blank · 99 comment · 127 complexity · 4e9b3a17d86decf5dd29f21ed6ca43de MD5 · raw file

  1. /**
  2. * LocateResponse.cpp
  3. *
  4. * This file was auto-generated from WSDL
  5. * by the Apache Axis2/C version: SNAPSHOT Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
  6. */
  7. #include "AviaryLocator_LocateResponse.h"
  8. #include <Environment.h>
  9. #include <WSFError.h>
  10. using namespace wso2wsf;
  11. using namespace std;
  12. using namespace AviaryLocator;
  13. /*
  14. * Implementation of the LocateResponse|http://locator.aviary.grid.redhat.com Element
  15. */
  16. AviaryLocator::LocateResponse::LocateResponse()
  17. {
  18. qname = NULL;
  19. property_Resources = NULL;
  20. isValidResources = false;
  21. property_Status = NULL;
  22. isValidStatus = false;
  23. qname = axutil_qname_create (Environment::getEnv(),
  24. "LocateResponse",
  25. "http://locator.aviary.grid.redhat.com",
  26. NULL);
  27. }
  28. AviaryLocator::LocateResponse::LocateResponse(std::vector<AviaryCommon::ResourceLocation*>* arg_Resources,AviaryCommon::Status* arg_Status)
  29. {
  30. qname = NULL;
  31. property_Resources = NULL;
  32. isValidResources = true;
  33. property_Status = NULL;
  34. isValidStatus = true;
  35. qname = axutil_qname_create (Environment::getEnv(),
  36. "LocateResponse",
  37. "http://locator.aviary.grid.redhat.com",
  38. NULL);
  39. property_Resources = arg_Resources;
  40. property_Status = arg_Status;
  41. }
  42. AviaryLocator::LocateResponse::~LocateResponse()
  43. {
  44. }
  45. bool WSF_CALL
  46. AviaryLocator::LocateResponse::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
  47. {
  48. axiom_node_t *parent = *dp_parent;
  49. bool status = AXIS2_SUCCESS;
  50. const axis2_char_t* text_value = NULL;
  51. axutil_qname_t *mqname = NULL;
  52. int i = 0;
  53. int sequence_broken = 0;
  54. axiom_node_t *tmp_node = NULL;
  55. axutil_qname_t *element_qname = NULL;
  56. axiom_node_t *first_node = NULL;
  57. bool is_early_node_valid = true;
  58. axiom_node_t *current_node = NULL;
  59. axiom_element_t *current_element = NULL;
  60. while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
  61. {
  62. parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
  63. }
  64. if (NULL == parent)
  65. {
  66. return AXIS2_FAILURE;
  67. }
  68. current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
  69. mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
  70. if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
  71. {
  72. first_node = axiom_node_get_first_child(parent, Environment::getEnv());
  73. }
  74. else
  75. {
  76. WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
  77. "Failed in building adb object for LocateResponse : "
  78. "Expected %s but returned %s",
  79. axutil_qname_to_string(qname, Environment::getEnv()),
  80. axutil_qname_to_string(mqname, Environment::getEnv()));
  81. return AXIS2_FAILURE;
  82. }
  83. {
  84. /*
  85. * building Resources array
  86. */
  87. std::vector<AviaryCommon::ResourceLocation*>* arr_list =new std::vector<AviaryCommon::ResourceLocation*>();
  88. /*
  89. * building resources element
  90. */
  91. element_qname = axutil_qname_create(Environment::getEnv(), "resources", NULL, NULL);
  92. for (i = 0, sequence_broken = 0, current_node = first_node; !sequence_broken && current_node != NULL;)
  93. {
  94. if(axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
  95. {
  96. current_node =axiom_node_get_next_sibling(current_node, Environment::getEnv());
  97. is_early_node_valid = false;
  98. continue;
  99. }
  100. current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
  101. mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
  102. if (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("resources", axiom_element_get_localname(current_element, Environment::getEnv())))
  103. {
  104. is_early_node_valid = true;
  105. AviaryCommon::ResourceLocation* element = new AviaryCommon::ResourceLocation();
  106. status = element->deserialize(&current_node, &is_early_node_valid, false);
  107. if(AXIS2_FAILURE == status)
  108. {
  109. WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element resources ");
  110. }
  111. else
  112. {
  113. arr_list->push_back(element);
  114. }
  115. if(AXIS2_FAILURE == status)
  116. {
  117. WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in setting the value for resources ");
  118. if(element_qname)
  119. {
  120. axutil_qname_free(element_qname, Environment::getEnv());
  121. }
  122. if(arr_list)
  123. {
  124. delete arr_list;
  125. }
  126. return false;
  127. }
  128. i++;
  129. current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  130. }
  131. else
  132. {
  133. is_early_node_valid = false;
  134. sequence_broken = 1;
  135. }
  136. }
  137. if (i < 0)
  138. {
  139. /* found element out of order */
  140. WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"resources (@minOccurs = '0') only have %d elements", i);
  141. if(element_qname)
  142. {
  143. axutil_qname_free(element_qname, Environment::getEnv());
  144. }
  145. if(arr_list)
  146. {
  147. delete arr_list;
  148. }
  149. return false;
  150. }
  151. if(0 == arr_list->size())
  152. {
  153. delete arr_list;
  154. }
  155. else
  156. {
  157. status = setResources(arr_list);
  158. }
  159. }
  160. if(element_qname)
  161. {
  162. axutil_qname_free(element_qname, Environment::getEnv());
  163. element_qname = NULL;
  164. }
  165. /*
  166. * building status element
  167. */
  168. /*
  169. * because elements are ordered this works fine
  170. */
  171. if(current_node != NULL && is_early_node_valid)
  172. {
  173. current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  174. while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
  175. {
  176. current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
  177. }
  178. if(current_node != NULL)
  179. {
  180. current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
  181. mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
  182. }
  183. }
  184. is_early_node_valid = false;
  185. element_qname = axutil_qname_create(Environment::getEnv(), "status", NULL, NULL);
  186. if (isParticle() ||
  187. (current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv())))))
  188. {
  189. if( current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname) || !axutil_strcmp("status", axiom_element_get_localname(current_element, Environment::getEnv()))))
  190. {
  191. is_early_node_valid = true;
  192. }
  193. AviaryCommon::Status* element = new AviaryCommon::Status();
  194. status = element->deserialize(&current_node, &is_early_node_valid, false);
  195. if(AXIS2_FAILURE == status)
  196. {
  197. WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "failed in building adb object for element status");
  198. }
  199. else
  200. {
  201. status = setStatus(element);
  202. }
  203. if(AXIS2_FAILURE == status)
  204. {
  205. WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for status ");
  206. if(element_qname)
  207. {
  208. axutil_qname_free(element_qname, Environment::getEnv());
  209. }
  210. return AXIS2_FAILURE;
  211. }
  212. }
  213. else if(!dont_care_minoccurs)
  214. {
  215. if(element_qname)
  216. {
  217. axutil_qname_free(element_qname, Environment::getEnv());
  218. }
  219. /* this is not a nillable element*/
  220. WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "non nillable or minOuccrs != 0 element status missing");
  221. return AXIS2_FAILURE;
  222. }
  223. if(element_qname)
  224. {
  225. axutil_qname_free(element_qname, Environment::getEnv());
  226. element_qname = NULL;
  227. }
  228. return status;
  229. }
  230. bool WSF_CALL
  231. AviaryLocator::LocateResponse::isParticle()
  232. {
  233. return false;
  234. }
  235. void WSF_CALL
  236. AviaryLocator::LocateResponse::declareParentNamespaces(
  237. axiom_element_t *parent_element,
  238. axutil_hash_t *namespaces, int *next_ns_index)
  239. {
  240. /* Here this is an empty function, Nothing to declare */
  241. }
  242. axiom_node_t* WSF_CALL
  243. AviaryLocator::LocateResponse::serialize(axiom_node_t *parent,
  244. axiom_element_t *parent_element,
  245. int parent_tag_closed,
  246. axutil_hash_t *namespaces,
  247. int *next_ns_index)
  248. {
  249. axiom_node_t *current_node = NULL;
  250. int tag_closed = 0;
  251. axiom_namespace_t *ns1 = NULL;
  252. axis2_char_t *qname_uri = NULL;
  253. axis2_char_t *qname_prefix = NULL;
  254. axis2_char_t *p_prefix = NULL;
  255. int i = 0;
  256. int count = 0;
  257. void *element = NULL;
  258. axis2_char_t text_value_1[ADB_DEFAULT_DIGIT_LIMIT];
  259. axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
  260. axis2_char_t *start_input_str = NULL;
  261. axis2_char_t *end_input_str = NULL;
  262. unsigned int start_input_str_len = 0;
  263. unsigned int end_input_str_len = 0;
  264. axiom_data_source_t *data_source = NULL;
  265. axutil_stream_t *stream = NULL;
  266. int next_ns_index_value = 0;
  267. namespaces = axutil_hash_make(Environment::getEnv());
  268. next_ns_index = &next_ns_index_value;
  269. ns1 = axiom_namespace_create (Environment::getEnv(),
  270. "http://locator.aviary.grid.redhat.com",
  271. "n");
  272. axutil_hash_set(namespaces, "http://locator.aviary.grid.redhat.com", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
  273. parent_element = axiom_element_create (Environment::getEnv(), NULL, "LocateResponse", ns1 , &parent);
  274. axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
  275. data_source = axiom_data_source_create(Environment::getEnv(), parent, &current_node);
  276. stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
  277. p_prefix = NULL;
  278. if (!isValidResources)
  279. {
  280. /* no need to complain for minoccurs=0 element */
  281. }
  282. else
  283. {
  284. start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  285. (4 + axutil_strlen(p_prefix) +
  286. axutil_strlen("resources")));
  287. /* axutil_strlen("<:>") + 1 = 4 */
  288. end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  289. (5 + axutil_strlen(p_prefix) + axutil_strlen("resources")));
  290. /* axutil_strlen("</:>") + 1 = 5 */
  291. /*
  292. * Parsing Resources array
  293. */
  294. if (property_Resources != NULL)
  295. {
  296. sprintf(start_input_str, "<%s%sresources",
  297. p_prefix?p_prefix:"",
  298. (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  299. start_input_str_len = axutil_strlen(start_input_str);
  300. sprintf(end_input_str, "</%s%sresources>",
  301. p_prefix?p_prefix:"",
  302. (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  303. end_input_str_len = axutil_strlen(end_input_str);
  304. count = property_Resources->size();
  305. for(i = 0; i < count; i++)
  306. {
  307. AviaryCommon::ResourceLocation* element = (*property_Resources)[i];
  308. if(NULL == element)
  309. {
  310. continue;
  311. }
  312. /*
  313. * parsing resources element
  314. */
  315. if(!element->isParticle())
  316. {
  317. axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
  318. }
  319. element->serialize(current_node, parent_element,
  320. element->isParticle() || false, namespaces, next_ns_index);
  321. if(!element->isParticle())
  322. {
  323. axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
  324. }
  325. }
  326. }
  327. AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
  328. AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
  329. }
  330. p_prefix = NULL;
  331. if (!isValidStatus)
  332. {
  333. WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"Nil value found in non-nillable property status");
  334. return NULL;
  335. }
  336. else
  337. {
  338. start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  339. (4 + axutil_strlen(p_prefix) +
  340. axutil_strlen("status")));
  341. /* axutil_strlen("<:>") + 1 = 4 */
  342. end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
  343. (5 + axutil_strlen(p_prefix) + axutil_strlen("status")));
  344. /* axutil_strlen("</:>") + 1 = 5 */
  345. /*
  346. * parsing status element
  347. */
  348. sprintf(start_input_str, "<%s%sstatus",
  349. p_prefix?p_prefix:"",
  350. (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  351. start_input_str_len = axutil_strlen(start_input_str);
  352. sprintf(end_input_str, "</%s%sstatus>",
  353. p_prefix?p_prefix:"",
  354. (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
  355. end_input_str_len = axutil_strlen(end_input_str);
  356. if(!property_Status->isParticle())
  357. {
  358. axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
  359. }
  360. property_Status->serialize(current_node, parent_element,
  361. property_Status->isParticle() || false, namespaces, next_ns_index);
  362. if(!property_Status->isParticle())
  363. {
  364. axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
  365. }
  366. AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
  367. AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
  368. }
  369. if(namespaces)
  370. {
  371. axutil_hash_index_t *hi;
  372. void *val;
  373. for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
  374. {
  375. axutil_hash_this(hi, NULL, NULL, &val);
  376. AXIS2_FREE(Environment::getEnv()->allocator, val);
  377. }
  378. axutil_hash_free(namespaces, Environment::getEnv());
  379. }
  380. return parent;
  381. }
  382. /**
  383. * Getter for resources by Property Number 1
  384. */
  385. std::vector<AviaryCommon::ResourceLocation*>* WSF_CALL
  386. AviaryLocator::LocateResponse::getProperty1()
  387. {
  388. return getResources();
  389. }
  390. /**
  391. * getter for resources.
  392. */
  393. std::vector<AviaryCommon::ResourceLocation*>* WSF_CALL
  394. AviaryLocator::LocateResponse::getResources()
  395. {
  396. return property_Resources;
  397. }
  398. /**
  399. * setter for resources
  400. */
  401. bool WSF_CALL
  402. AviaryLocator::LocateResponse::setResources(
  403. std::vector<AviaryCommon::ResourceLocation*>* arg_Resources)
  404. {
  405. int size = 0;
  406. int i = 0;
  407. bool non_nil_exists = false;
  408. if(isValidResources &&
  409. arg_Resources == property_Resources)
  410. {
  411. return true;
  412. }
  413. size = arg_Resources->size();
  414. if (size < 0)
  415. {
  416. WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"resources has less than minOccurs(0)");
  417. return false;
  418. }
  419. for(i = 0; i < size; i ++ )
  420. {
  421. if(NULL != (*arg_Resources)[i])
  422. {
  423. non_nil_exists = true;
  424. break;
  425. }
  426. }
  427. resetResources();
  428. if(NULL == arg_Resources)
  429. {
  430. /* We are already done */
  431. return true;
  432. }
  433. property_Resources = arg_Resources;
  434. if(non_nil_exists)
  435. {
  436. isValidResources = true;
  437. }
  438. return true;
  439. }
  440. /**
  441. * Get ith element of resources.
  442. */
  443. AviaryCommon::ResourceLocation* WSF_CALL
  444. AviaryLocator::LocateResponse::getResourcesAt(int i)
  445. {
  446. AviaryCommon::ResourceLocation* ret_val;
  447. if(property_Resources == NULL)
  448. {
  449. return (AviaryCommon::ResourceLocation*)0;
  450. }
  451. ret_val = (*property_Resources)[i];
  452. return ret_val;
  453. }
  454. /**
  455. * Set the ith element of resources.
  456. */
  457. bool WSF_CALL
  458. AviaryLocator::LocateResponse::setResourcesAt(int i,
  459. AviaryCommon::ResourceLocation* arg_Resources)
  460. {
  461. AviaryCommon::ResourceLocation* element;
  462. int size = 0;
  463. int non_nil_count;
  464. bool non_nil_exists = false;
  465. if( isValidResources &&
  466. property_Resources &&
  467. arg_Resources == (*property_Resources)[i])
  468. {
  469. return AXIS2_SUCCESS;
  470. }
  471. non_nil_exists = true;
  472. if(property_Resources == NULL)
  473. {
  474. property_Resources = new std::vector<AviaryCommon::ResourceLocation*>();
  475. }
  476. else{
  477. /* check whether there already exist an element */
  478. element = (*property_Resources)[i];
  479. }
  480. if(NULL != element)
  481. {
  482. delete element;
  483. }
  484. if(!non_nil_exists)
  485. {
  486. isValidResources = true;
  487. (*property_Resources)[i]= NULL;
  488. return AXIS2_SUCCESS;
  489. }
  490. (*property_Resources)[i] = arg_Resources;
  491. isValidResources = true;
  492. return AXIS2_SUCCESS;
  493. }
  494. /**
  495. * Add to resources.
  496. */
  497. bool WSF_CALL
  498. AviaryLocator::LocateResponse::addResources(
  499. AviaryCommon::ResourceLocation* arg_Resources)
  500. {
  501. if( NULL == arg_Resources
  502. )
  503. {
  504. return true;
  505. }
  506. if(property_Resources == NULL)
  507. {
  508. property_Resources = new std::vector<AviaryCommon::ResourceLocation*>();
  509. }
  510. property_Resources->push_back(arg_Resources);
  511. isValidResources = true;
  512. return true;
  513. }
  514. /**
  515. * Get the size of the resources array.
  516. */
  517. int WSF_CALL
  518. AviaryLocator::LocateResponse::sizeofResources()
  519. {
  520. if(property_Resources == NULL)
  521. {
  522. return 0;
  523. }
  524. return property_Resources->size();
  525. }
  526. /**
  527. * remove the ith element, same as set_nil_at.
  528. */
  529. bool WSF_CALL
  530. AviaryLocator::LocateResponse::removeResourcesAt(int i)
  531. {
  532. return setResourcesNilAt(i);
  533. }
  534. /**
  535. * resetter for resources
  536. */
  537. bool WSF_CALL
  538. AviaryLocator::LocateResponse::resetResources()
  539. {
  540. int i = 0;
  541. int count = 0;
  542. if (property_Resources != NULL)
  543. {
  544. std::vector<AviaryCommon::ResourceLocation*>::iterator it = property_Resources->begin();
  545. for( ; it < property_Resources->end() ; ++it)
  546. {
  547. AviaryCommon::ResourceLocation* element = *it;
  548. if(element != NULL)
  549. {
  550. delete element;
  551. }
  552. }
  553. }
  554. if(NULL != property_Resources)
  555. delete property_Resources;
  556. isValidResources = false;
  557. return true;
  558. }
  559. /**
  560. * Check whether resources is nill
  561. */
  562. bool WSF_CALL
  563. AviaryLocator::LocateResponse::isResourcesNil()
  564. {
  565. return !isValidResources;
  566. }
  567. /**
  568. * Set resources to nill (currently the same as reset)
  569. */
  570. bool WSF_CALL
  571. AviaryLocator::LocateResponse::setResourcesNil()
  572. {
  573. return resetResources();
  574. }
  575. /**
  576. * Check whether resources is nill at i
  577. */
  578. bool WSF_CALL
  579. AviaryLocator::LocateResponse::isResourcesNilAt(int i)
  580. {
  581. return (isValidResources == false ||
  582. NULL == property_Resources ||
  583. NULL == (*property_Resources)[i]);
  584. }
  585. /**
  586. * Set resources to nil at i
  587. */
  588. bool WSF_CALL
  589. AviaryLocator::LocateResponse::setResourcesNilAt(int i)
  590. {
  591. int size = 0;
  592. int j;
  593. bool non_nil_exists = false;
  594. int k = 0;
  595. if(property_Resources == NULL ||
  596. isValidResources == false)
  597. {
  598. non_nil_exists = false;
  599. }
  600. else
  601. {
  602. size = property_Resources->size();
  603. for(j = 0, k = 0; j < size; j ++ )
  604. {
  605. if(i == j) continue;
  606. if(NULL != (*property_Resources)[i])
  607. {
  608. k++;
  609. non_nil_exists = true;
  610. if( k >= 0)
  611. {
  612. break;
  613. }
  614. }
  615. }
  616. }
  617. if( k < 0)
  618. {
  619. WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "Size of the array of resources is beinng set to be smaller than the specificed number of minOccurs(0)");
  620. return AXIS2_FAILURE;
  621. }
  622. if(property_Resources == NULL)
  623. {
  624. isValidResources = false;
  625. return true;
  626. }
  627. /* check whether there already exist an element */
  628. AviaryCommon::ResourceLocation* element = (*property_Resources)[i];
  629. if(NULL != element)
  630. {
  631. delete element;
  632. }
  633. if(!non_nil_exists)
  634. {
  635. isValidResources = false;
  636. (*property_Resources)[i] = NULL;
  637. return AXIS2_SUCCESS;
  638. }
  639. (*property_Resources)[i] = NULL;
  640. return AXIS2_SUCCESS;
  641. }
  642. /**
  643. * Getter for status by Property Number 2
  644. */
  645. AviaryCommon::Status* WSF_CALL
  646. AviaryLocator::LocateResponse::getProperty2()
  647. {
  648. return getStatus();
  649. }
  650. /**
  651. * getter for status.
  652. */
  653. AviaryCommon::Status* WSF_CALL
  654. AviaryLocator::LocateResponse::getStatus()
  655. {
  656. return property_Status;
  657. }
  658. /**
  659. * setter for status
  660. */
  661. bool WSF_CALL
  662. AviaryLocator::LocateResponse::setStatus(
  663. AviaryCommon::Status* arg_Status)
  664. {
  665. if(isValidStatus &&
  666. arg_Status == property_Status)
  667. {
  668. return true;
  669. }
  670. if(NULL == arg_Status)
  671. {
  672. WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"status is being set to NULL, but it is not a nullable element");
  673. return AXIS2_FAILURE;
  674. }
  675. resetStatus();
  676. if(NULL == arg_Status)
  677. {
  678. /* We are already done */
  679. return true;
  680. }
  681. property_Status = arg_Status;
  682. isValidStatus = true;
  683. return true;
  684. }
  685. /**
  686. * resetter for status
  687. */
  688. bool WSF_CALL
  689. AviaryLocator::LocateResponse::resetStatus()
  690. {
  691. int i = 0;
  692. int count = 0;
  693. if(property_Status != NULL)
  694. {
  695. delete property_Status;
  696. }
  697. isValidStatus = false;
  698. return true;
  699. }
  700. /**
  701. * Check whether status is nill
  702. */
  703. bool WSF_CALL
  704. AviaryLocator::LocateResponse::isStatusNil()
  705. {
  706. return !isValidStatus;
  707. }
  708. /**
  709. * Set status to nill (currently the same as reset)
  710. */
  711. bool WSF_CALL
  712. AviaryLocator::LocateResponse::setStatusNil()
  713. {
  714. return resetStatus();
  715. }