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)
11 #include <Environment.h>
15 using namespace wso2wsf;
18 using namespace org_splat_ws_server_service_salome;
21 * Implementation of the checkIn|http://salome.service.ws_server.splat.org Element
23 org_splat_ws_server_service_salome::CheckIn::CheckIn()
37 qname = axutil_qname_create (Environment::getEnv(),
39 "http://salome.service.ws_server.splat.org",
44 org_splat_ws_server_service_salome::CheckIn::CheckIn(std::string arg_Args0,int64_t arg_Args1,int64_t arg_Args2)
57 qname = axutil_qname_create (Environment::getEnv(),
59 "http://salome.service.ws_server.splat.org",
62 property_Args0 = arg_Args0;
64 property_Args1 = arg_Args1;
66 property_Args2 = arg_Args2;
69 org_splat_ws_server_service_salome::CheckIn::~CheckIn()
77 org_splat_ws_server_service_salome::CheckIn::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
79 axiom_node_t *parent = *dp_parent;
81 bool status = AXIS2_SUCCESS;
83 const axis2_char_t* text_value = NULL;
84 axutil_qname_t *mqname = NULL;
86 axutil_qname_t *element_qname = NULL;
88 axiom_node_t *first_node = NULL;
89 bool is_early_node_valid = true;
90 axiom_node_t *current_node = NULL;
91 axiom_element_t *current_element = NULL;
94 while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
96 parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
100 return AXIS2_FAILURE;
104 current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
105 mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
106 if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
109 first_node = axiom_node_get_first_child(parent, Environment::getEnv());
114 WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
115 "Failed in building adb object for checkIn : "
116 "Expected %s but returned %s",
117 axutil_qname_to_string(qname, Environment::getEnv()),
118 axutil_qname_to_string(mqname, Environment::getEnv()));
120 return AXIS2_FAILURE;
126 * building args0 element
131 current_node = first_node;
132 is_early_node_valid = false;
135 while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
137 current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
139 if(current_node != NULL)
141 current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
142 mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
145 element_qname = axutil_qname_create(Environment::getEnv(), "args0", "http://salome.service.ws_server.splat.org", NULL);
149 (current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
151 if( current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
153 is_early_node_valid = true;
157 text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
158 if(text_value != NULL)
160 status = setArgs0(text_value);
163 if(AXIS2_FAILURE == status)
165 WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for args0 ");
168 axutil_qname_free(element_qname, Environment::getEnv());
170 return AXIS2_FAILURE;
176 axutil_qname_free(element_qname, Environment::getEnv());
177 element_qname = NULL;
183 * building args1 element
189 * because elements are ordered this works fine
193 if(current_node != NULL && is_early_node_valid)
195 current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
198 while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
200 current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
202 if(current_node != NULL)
204 current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
205 mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
209 is_early_node_valid = false;
211 element_qname = axutil_qname_create(Environment::getEnv(), "args1", "http://salome.service.ws_server.splat.org", NULL);
215 (current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
217 if( current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
219 is_early_node_valid = true;
223 text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
224 if(text_value != NULL)
226 status = setArgs1(axutil_strtol(text_value, (char**)NULL, 0));
231 WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element args1");
232 status = AXIS2_FAILURE;
235 if(AXIS2_FAILURE == status)
237 WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for args1 ");
240 axutil_qname_free(element_qname, Environment::getEnv());
242 return AXIS2_FAILURE;
248 axutil_qname_free(element_qname, Environment::getEnv());
249 element_qname = NULL;
255 * building args2 element
261 * because elements are ordered this works fine
265 if(current_node != NULL && is_early_node_valid)
267 current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
270 while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
272 current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
274 if(current_node != NULL)
276 current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
277 mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
281 is_early_node_valid = false;
283 element_qname = axutil_qname_create(Environment::getEnv(), "args2", "http://salome.service.ws_server.splat.org", NULL);
287 (current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
289 if( current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
291 is_early_node_valid = true;
295 text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
296 if(text_value != NULL)
298 status = setArgs2(axutil_strtol(text_value, (char**)NULL, 0));
303 WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element args2");
304 status = AXIS2_FAILURE;
307 if(AXIS2_FAILURE == status)
309 WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for args2 ");
312 axutil_qname_free(element_qname, Environment::getEnv());
314 return AXIS2_FAILURE;
320 axutil_qname_free(element_qname, Environment::getEnv());
321 element_qname = NULL;
328 org_splat_ws_server_service_salome::CheckIn::isParticle()
337 org_splat_ws_server_service_salome::CheckIn::declareParentNamespaces(
338 axiom_element_t *parent_element,
339 axutil_hash_t *namespaces, int *next_ns_index)
342 /* Here this is an empty function, Nothing to declare */
348 axiom_node_t* WSF_CALL
349 org_splat_ws_server_service_salome::CheckIn::serialize(axiom_node_t *parent,
350 axiom_element_t *parent_element,
351 int parent_tag_closed,
352 axutil_hash_t *namespaces,
358 axiom_node_t *current_node = NULL;
363 axiom_namespace_t *ns1 = NULL;
365 axis2_char_t *qname_uri = NULL;
366 axis2_char_t *qname_prefix = NULL;
367 axis2_char_t *p_prefix = NULL;
369 axis2_char_t *text_value_1;
370 axis2_char_t *text_value_1_temp;
372 axis2_char_t text_value_2[ADB_DEFAULT_DIGIT_LIMIT];
374 axis2_char_t text_value_3[ADB_DEFAULT_DIGIT_LIMIT];
376 axis2_char_t *start_input_str = NULL;
377 axis2_char_t *end_input_str = NULL;
378 unsigned int start_input_str_len = 0;
379 unsigned int end_input_str_len = 0;
382 axiom_data_source_t *data_source = NULL;
383 axutil_stream_t *stream = NULL;
386 int next_ns_index_value = 0;
388 namespaces = axutil_hash_make(Environment::getEnv());
389 next_ns_index = &next_ns_index_value;
391 ns1 = axiom_namespace_create (Environment::getEnv(),
392 "http://salome.service.ws_server.splat.org",
394 axutil_hash_set(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
397 parent_element = axiom_element_create (Environment::getEnv(), NULL, "checkIn", ns1 , &parent);
400 axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
404 data_source = axiom_data_source_create(Environment::getEnv(), parent, ¤t_node);
405 stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
407 if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING)))
409 p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
410 sprintf(p_prefix, "n%d", (*next_ns_index)++);
411 axutil_hash_set(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING, p_prefix);
413 axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
414 "http://salome.service.ws_server.splat.org", p_prefix));
421 /* no need to complain for minoccurs=0 element */
427 start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
428 (4 + axutil_strlen(p_prefix) +
429 axutil_strlen("args0")));
431 /* axutil_strlen("<:>") + 1 = 4 */
432 end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
433 (5 + axutil_strlen(p_prefix) + axutil_strlen("args0")));
434 /* axutil_strlen("</:>") + 1 = 5 */
442 * parsing args0 element
447 sprintf(start_input_str, "<%s%sargs0>",
448 p_prefix?p_prefix:"",
449 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
451 start_input_str_len = axutil_strlen(start_input_str);
452 sprintf(end_input_str, "</%s%sargs0>",
453 p_prefix?p_prefix:"",
454 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
455 end_input_str_len = axutil_strlen(end_input_str);
457 text_value_1 = (axis2_char_t*)property_Args0.c_str();
459 axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
462 text_value_1_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_1, true);
463 if (text_value_1_temp)
465 axutil_stream_write(stream, Environment::getEnv(), text_value_1_temp, axutil_strlen(text_value_1_temp));
466 AXIS2_FREE(Environment::getEnv()->allocator, text_value_1_temp);
470 axutil_stream_write(stream, Environment::getEnv(), text_value_1, axutil_strlen(text_value_1));
473 axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
476 AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
477 AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
481 if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING)))
483 p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
484 sprintf(p_prefix, "n%d", (*next_ns_index)++);
485 axutil_hash_set(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING, p_prefix);
487 axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
488 "http://salome.service.ws_server.splat.org", p_prefix));
495 /* no need to complain for minoccurs=0 element */
501 start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
502 (4 + axutil_strlen(p_prefix) +
503 axutil_strlen("args1")));
505 /* axutil_strlen("<:>") + 1 = 4 */
506 end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
507 (5 + axutil_strlen(p_prefix) + axutil_strlen("args1")));
508 /* axutil_strlen("</:>") + 1 = 5 */
516 * parsing args1 element
521 sprintf(start_input_str, "<%s%sargs1>",
522 p_prefix?p_prefix:"",
523 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
525 start_input_str_len = axutil_strlen(start_input_str);
526 sprintf(end_input_str, "</%s%sargs1>",
527 p_prefix?p_prefix:"",
528 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
529 end_input_str_len = axutil_strlen(end_input_str);
531 sprintf (text_value_2, AXIS2_PRINTF_INT64_FORMAT_SPECIFIER, (int64_t) property_Args1);
533 axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
535 axutil_stream_write(stream, Environment::getEnv(), text_value_2, axutil_strlen(text_value_2));
537 axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
540 AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
541 AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
545 if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING)))
547 p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
548 sprintf(p_prefix, "n%d", (*next_ns_index)++);
549 axutil_hash_set(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING, p_prefix);
551 axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
552 "http://salome.service.ws_server.splat.org", p_prefix));
559 /* no need to complain for minoccurs=0 element */
565 start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
566 (4 + axutil_strlen(p_prefix) +
567 axutil_strlen("args2")));
569 /* axutil_strlen("<:>") + 1 = 4 */
570 end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
571 (5 + axutil_strlen(p_prefix) + axutil_strlen("args2")));
572 /* axutil_strlen("</:>") + 1 = 5 */
580 * parsing args2 element
585 sprintf(start_input_str, "<%s%sargs2>",
586 p_prefix?p_prefix:"",
587 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
589 start_input_str_len = axutil_strlen(start_input_str);
590 sprintf(end_input_str, "</%s%sargs2>",
591 p_prefix?p_prefix:"",
592 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
593 end_input_str_len = axutil_strlen(end_input_str);
595 sprintf (text_value_3, AXIS2_PRINTF_INT64_FORMAT_SPECIFIER, (int64_t) property_Args2);
597 axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
599 axutil_stream_write(stream, Environment::getEnv(), text_value_3, axutil_strlen(text_value_3));
601 axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
604 AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
605 AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
611 axutil_hash_index_t *hi;
613 for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
615 axutil_hash_this(hi, NULL, NULL, &val);
616 AXIS2_FREE(Environment::getEnv()->allocator, val);
618 axutil_hash_free(namespaces, Environment::getEnv());
629 * Getter for args0 by Property Number 1
632 org_splat_ws_server_service_salome::CheckIn::getProperty1()
641 org_splat_ws_server_service_salome::CheckIn::getArgs0()
643 return property_Args0;
650 org_splat_ws_server_service_salome::CheckIn::setArgs0(
651 const std::string arg_Args0)
656 arg_Args0 == property_Args0)
668 property_Args0 = std::string(arg_Args0.c_str());
680 org_splat_ws_server_service_salome::CheckIn::resetArgs0()
687 isValidArgs0 = false;
692 * Check whether args0 is nill
695 org_splat_ws_server_service_salome::CheckIn::isArgs0Nil()
697 return !isValidArgs0;
701 * Set args0 to nill (currently the same as reset)
704 org_splat_ws_server_service_salome::CheckIn::setArgs0Nil()
712 * Getter for args1 by Property Number 2
715 org_splat_ws_server_service_salome::CheckIn::getProperty2()
724 org_splat_ws_server_service_salome::CheckIn::getArgs1()
726 return property_Args1;
733 org_splat_ws_server_service_salome::CheckIn::setArgs1(
734 const int64_t arg_Args1)
739 arg_Args1 == property_Args1)
751 property_Args1 = arg_Args1;
763 org_splat_ws_server_service_salome::CheckIn::resetArgs1()
770 isValidArgs1 = false;
775 * Check whether args1 is nill
778 org_splat_ws_server_service_salome::CheckIn::isArgs1Nil()
780 return !isValidArgs1;
784 * Set args1 to nill (currently the same as reset)
787 org_splat_ws_server_service_salome::CheckIn::setArgs1Nil()
795 * Getter for args2 by Property Number 3
798 org_splat_ws_server_service_salome::CheckIn::getProperty3()
807 org_splat_ws_server_service_salome::CheckIn::getArgs2()
809 return property_Args2;
816 org_splat_ws_server_service_salome::CheckIn::setArgs2(
817 const int64_t arg_Args2)
822 arg_Args2 == property_Args2)
834 property_Args2 = arg_Args2;
846 org_splat_ws_server_service_salome::CheckIn::resetArgs2()
853 isValidArgs2 = false;
858 * Check whether args2 is nill
861 org_splat_ws_server_service_salome::CheckIn::isArgs2Nil()
863 return !isValidArgs2;
867 * Set args2 to nill (currently the same as reset)
870 org_splat_ws_server_service_salome::CheckIn::setArgs2Nil()