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 putFile|http://salome.service.ws_server.splat.org Element
23 org_splat_ws_server_service_salome::PutFile::PutFile()
29 property_Args0 = NULL;
39 qname = axutil_qname_create (Environment::getEnv(),
41 "http://salome.service.ws_server.splat.org",
46 org_splat_ws_server_service_salome::PutFile::PutFile(axutil_base64_binary_t* arg_Args0,std::string arg_Args1,int64_t arg_Args2)
51 property_Args0 = NULL;
61 qname = axutil_qname_create (Environment::getEnv(),
63 "http://salome.service.ws_server.splat.org",
66 property_Args0 = arg_Args0;
68 property_Args1 = arg_Args1;
70 property_Args2 = arg_Args2;
73 org_splat_ws_server_service_salome::PutFile::~PutFile()
81 org_splat_ws_server_service_salome::PutFile::deserialize(axiom_node_t** dp_parent,bool *dp_is_early_node_valid, bool dont_care_minoccurs)
83 axiom_node_t *parent = *dp_parent;
85 bool status = AXIS2_SUCCESS;
87 const axis2_char_t* text_value = NULL;
88 axutil_qname_t *mqname = NULL;
90 axutil_qname_t *element_qname = NULL;
92 axiom_node_t *first_node = NULL;
93 bool is_early_node_valid = true;
94 axiom_node_t *current_node = NULL;
95 axiom_element_t *current_element = NULL;
98 while(parent && axiom_node_get_node_type(parent, Environment::getEnv()) != AXIOM_ELEMENT)
100 parent = axiom_node_get_next_sibling(parent, Environment::getEnv());
104 return AXIS2_FAILURE;
108 current_element = (axiom_element_t *)axiom_node_get_data_element(parent, Environment::getEnv());
109 mqname = axiom_element_get_qname(current_element, Environment::getEnv(), parent);
110 if (axutil_qname_equals(mqname, Environment::getEnv(), this->qname))
113 first_node = axiom_node_get_first_child(parent, Environment::getEnv());
118 WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI,
119 "Failed in building adb object for putFile : "
120 "Expected %s but returned %s",
121 axutil_qname_to_string(qname, Environment::getEnv()),
122 axutil_qname_to_string(mqname, Environment::getEnv()));
124 return AXIS2_FAILURE;
130 * building args0 element
135 current_node = first_node;
136 is_early_node_valid = false;
139 while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
141 current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
143 if(current_node != NULL)
145 current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
146 mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
149 element_qname = axutil_qname_create(Environment::getEnv(), "args0", "http://salome.service.ws_server.splat.org", NULL);
153 (current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
155 if( current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
157 is_early_node_valid = true;
161 text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
162 if(text_value != NULL)
164 axutil_base64_binary_t* element = axutil_base64_binary_create(Environment::getEnv());
165 status = axutil_base64_binary_set_encoded_binary((axutil_base64_binary_t*)element, Environment::getEnv(),
167 if(AXIS2_FAILURE == status)
171 axutil_base64_binary_free(element, Environment::getEnv());
173 WSF_LOG_ERROR_MSG(Environment::getEnv()->log,WSF_LOG_SI, "failed in building element args0 ");
177 status = setArgs0(element);
181 if(AXIS2_FAILURE == status)
183 WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for args0 ");
186 axutil_qname_free(element_qname, Environment::getEnv());
188 return AXIS2_FAILURE;
194 axutil_qname_free(element_qname, Environment::getEnv());
195 element_qname = NULL;
201 * building args1 element
207 * because elements are ordered this works fine
211 if(current_node != NULL && is_early_node_valid)
213 current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
216 while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
218 current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
220 if(current_node != NULL)
222 current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
223 mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
227 is_early_node_valid = false;
229 element_qname = axutil_qname_create(Environment::getEnv(), "args1", "http://salome.service.ws_server.splat.org", NULL);
233 (current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
235 if( current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
237 is_early_node_valid = true;
241 text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
242 if(text_value != NULL)
244 status = setArgs1(text_value);
247 if(AXIS2_FAILURE == status)
249 WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for args1 ");
252 axutil_qname_free(element_qname, Environment::getEnv());
254 return AXIS2_FAILURE;
260 axutil_qname_free(element_qname, Environment::getEnv());
261 element_qname = NULL;
267 * building args2 element
273 * because elements are ordered this works fine
277 if(current_node != NULL && is_early_node_valid)
279 current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
282 while(current_node && axiom_node_get_node_type(current_node, Environment::getEnv()) != AXIOM_ELEMENT)
284 current_node = axiom_node_get_next_sibling(current_node, Environment::getEnv());
286 if(current_node != NULL)
288 current_element = (axiom_element_t *)axiom_node_get_data_element(current_node, Environment::getEnv());
289 mqname = axiom_element_get_qname(current_element, Environment::getEnv(), current_node);
293 is_early_node_valid = false;
295 element_qname = axutil_qname_create(Environment::getEnv(), "args2", "http://salome.service.ws_server.splat.org", NULL);
299 (current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname))))
301 if( current_node && current_element && (axutil_qname_equals(element_qname, Environment::getEnv(), mqname)))
303 is_early_node_valid = true;
307 text_value = axiom_element_get_text(current_element, Environment::getEnv(), current_node);
308 if(text_value != NULL)
310 status = setArgs2(axutil_strtol(text_value, (char**)NULL, 0));
315 WSF_LOG_ERROR_MSG(Environment::getEnv()->log, WSF_LOG_SI, "NULL value is set to a non nillable element args2");
316 status = AXIS2_FAILURE;
319 if(AXIS2_FAILURE == status)
321 WSF_LOG_ERROR_MSG( Environment::getEnv()->log,WSF_LOG_SI,"failed in setting the value for args2 ");
324 axutil_qname_free(element_qname, Environment::getEnv());
326 return AXIS2_FAILURE;
332 axutil_qname_free(element_qname, Environment::getEnv());
333 element_qname = NULL;
340 org_splat_ws_server_service_salome::PutFile::isParticle()
349 org_splat_ws_server_service_salome::PutFile::declareParentNamespaces(
350 axiom_element_t *parent_element,
351 axutil_hash_t *namespaces, int *next_ns_index)
354 /* Here this is an empty function, Nothing to declare */
360 axiom_node_t* WSF_CALL
361 org_splat_ws_server_service_salome::PutFile::serialize(axiom_node_t *parent,
362 axiom_element_t *parent_element,
363 int parent_tag_closed,
364 axutil_hash_t *namespaces,
370 axiom_node_t *current_node = NULL;
375 axiom_namespace_t *ns1 = NULL;
377 axis2_char_t *qname_uri = NULL;
378 axis2_char_t *qname_prefix = NULL;
379 axis2_char_t *p_prefix = NULL;
381 axis2_char_t *text_value_1;
382 axis2_char_t *text_value_1_temp;
384 axis2_char_t *text_value_2;
385 axis2_char_t *text_value_2_temp;
387 axis2_char_t text_value_3[ADB_DEFAULT_DIGIT_LIMIT];
389 axis2_char_t *start_input_str = NULL;
390 axis2_char_t *end_input_str = NULL;
391 unsigned int start_input_str_len = 0;
392 unsigned int end_input_str_len = 0;
395 axiom_data_source_t *data_source = NULL;
396 axutil_stream_t *stream = NULL;
399 int next_ns_index_value = 0;
401 namespaces = axutil_hash_make(Environment::getEnv());
402 next_ns_index = &next_ns_index_value;
404 ns1 = axiom_namespace_create (Environment::getEnv(),
405 "http://salome.service.ws_server.splat.org",
407 axutil_hash_set(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING, axutil_strdup(Environment::getEnv(), "n"));
410 parent_element = axiom_element_create (Environment::getEnv(), NULL, "putFile", ns1 , &parent);
413 axiom_element_set_namespace(parent_element, Environment::getEnv(), ns1, parent);
417 data_source = axiom_data_source_create(Environment::getEnv(), parent, ¤t_node);
418 stream = axiom_data_source_get_stream(data_source, Environment::getEnv());
420 if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING)))
422 p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
423 sprintf(p_prefix, "n%d", (*next_ns_index)++);
424 axutil_hash_set(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING, p_prefix);
426 axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
427 "http://salome.service.ws_server.splat.org", p_prefix));
434 /* no need to complain for minoccurs=0 element */
440 start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
441 (4 + axutil_strlen(p_prefix) +
442 axutil_strlen("args0")));
444 /* axutil_strlen("<:>") + 1 = 4 */
445 end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
446 (5 + axutil_strlen(p_prefix) + axutil_strlen("args0")));
447 /* axutil_strlen("</:>") + 1 = 5 */
455 * parsing args0 element
460 sprintf(start_input_str, "<%s%sargs0>",
461 p_prefix?p_prefix:"",
462 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
464 start_input_str_len = axutil_strlen(start_input_str);
465 sprintf(end_input_str, "</%s%sargs0>",
466 p_prefix?p_prefix:"",
467 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
468 end_input_str_len = axutil_strlen(end_input_str);
470 text_value_1 =axutil_base64_binary_get_encoded_binary(property_Args0, Environment::getEnv());
472 axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
474 axutil_stream_write(stream, Environment::getEnv(), text_value_1, axutil_strlen(text_value_1));
476 axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
479 AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
480 AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
484 if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING)))
486 p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
487 sprintf(p_prefix, "n%d", (*next_ns_index)++);
488 axutil_hash_set(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING, p_prefix);
490 axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
491 "http://salome.service.ws_server.splat.org", p_prefix));
498 /* no need to complain for minoccurs=0 element */
504 start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
505 (4 + axutil_strlen(p_prefix) +
506 axutil_strlen("args1")));
508 /* axutil_strlen("<:>") + 1 = 4 */
509 end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
510 (5 + axutil_strlen(p_prefix) + axutil_strlen("args1")));
511 /* axutil_strlen("</:>") + 1 = 5 */
519 * parsing args1 element
524 sprintf(start_input_str, "<%s%sargs1>",
525 p_prefix?p_prefix:"",
526 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
528 start_input_str_len = axutil_strlen(start_input_str);
529 sprintf(end_input_str, "</%s%sargs1>",
530 p_prefix?p_prefix:"",
531 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
532 end_input_str_len = axutil_strlen(end_input_str);
534 text_value_2 = (axis2_char_t*)property_Args1.c_str();
536 axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
539 text_value_2_temp = axutil_xml_quote_string(Environment::getEnv(), text_value_2, true);
540 if (text_value_2_temp)
542 axutil_stream_write(stream, Environment::getEnv(), text_value_2_temp, axutil_strlen(text_value_2_temp));
543 AXIS2_FREE(Environment::getEnv()->allocator, text_value_2_temp);
547 axutil_stream_write(stream, Environment::getEnv(), text_value_2, axutil_strlen(text_value_2));
550 axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
553 AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
554 AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
558 if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING)))
560 p_prefix = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
561 sprintf(p_prefix, "n%d", (*next_ns_index)++);
562 axutil_hash_set(namespaces, "http://salome.service.ws_server.splat.org", AXIS2_HASH_KEY_STRING, p_prefix);
564 axiom_element_declare_namespace_assume_param_ownership(parent_element, Environment::getEnv(), axiom_namespace_create (Environment::getEnv(),
565 "http://salome.service.ws_server.splat.org", p_prefix));
572 /* no need to complain for minoccurs=0 element */
578 start_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
579 (4 + axutil_strlen(p_prefix) +
580 axutil_strlen("args2")));
582 /* axutil_strlen("<:>") + 1 = 4 */
583 end_input_str = (axis2_char_t*)AXIS2_MALLOC(Environment::getEnv()->allocator, sizeof(axis2_char_t) *
584 (5 + axutil_strlen(p_prefix) + axutil_strlen("args2")));
585 /* axutil_strlen("</:>") + 1 = 5 */
593 * parsing args2 element
598 sprintf(start_input_str, "<%s%sargs2>",
599 p_prefix?p_prefix:"",
600 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
602 start_input_str_len = axutil_strlen(start_input_str);
603 sprintf(end_input_str, "</%s%sargs2>",
604 p_prefix?p_prefix:"",
605 (p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
606 end_input_str_len = axutil_strlen(end_input_str);
608 sprintf (text_value_3, AXIS2_PRINTF_INT64_FORMAT_SPECIFIER, (int64_t) property_Args2);
610 axutil_stream_write(stream, Environment::getEnv(), start_input_str, start_input_str_len);
612 axutil_stream_write(stream, Environment::getEnv(), text_value_3, axutil_strlen(text_value_3));
614 axutil_stream_write(stream, Environment::getEnv(), end_input_str, end_input_str_len);
617 AXIS2_FREE(Environment::getEnv()->allocator,start_input_str);
618 AXIS2_FREE(Environment::getEnv()->allocator,end_input_str);
624 axutil_hash_index_t *hi;
626 for (hi = axutil_hash_first(namespaces, Environment::getEnv()); hi; hi = axutil_hash_next(Environment::getEnv(), hi))
628 axutil_hash_this(hi, NULL, NULL, &val);
629 AXIS2_FREE(Environment::getEnv()->allocator, val);
631 axutil_hash_free(namespaces, Environment::getEnv());
642 * Getter for args0 by Property Number 1
644 axutil_base64_binary_t* WSF_CALL
645 org_splat_ws_server_service_salome::PutFile::getProperty1()
653 axutil_base64_binary_t* WSF_CALL
654 org_splat_ws_server_service_salome::PutFile::getArgs0()
656 return property_Args0;
663 org_splat_ws_server_service_salome::PutFile::setArgs0(
664 axutil_base64_binary_t* arg_Args0)
669 arg_Args0 == property_Args0)
681 if(NULL == arg_Args0)
684 /* We are already done */
688 property_Args0 = arg_Args0;
700 org_splat_ws_server_service_salome::PutFile::resetArgs0()
710 if(property_Args0 != NULL)
714 axutil_base64_binary_free (property_Args0, Environment::getEnv());
715 property_Args0 = NULL;
723 isValidArgs0 = false;
728 * Check whether args0 is nill
731 org_splat_ws_server_service_salome::PutFile::isArgs0Nil()
733 return !isValidArgs0;
737 * Set args0 to nill (currently the same as reset)
740 org_splat_ws_server_service_salome::PutFile::setArgs0Nil()
748 * Getter for args1 by Property Number 2
751 org_splat_ws_server_service_salome::PutFile::getProperty2()
760 org_splat_ws_server_service_salome::PutFile::getArgs1()
762 return property_Args1;
769 org_splat_ws_server_service_salome::PutFile::setArgs1(
770 const std::string arg_Args1)
775 arg_Args1 == property_Args1)
787 property_Args1 = std::string(arg_Args1.c_str());
799 org_splat_ws_server_service_salome::PutFile::resetArgs1()
806 isValidArgs1 = false;
811 * Check whether args1 is nill
814 org_splat_ws_server_service_salome::PutFile::isArgs1Nil()
816 return !isValidArgs1;
820 * Set args1 to nill (currently the same as reset)
823 org_splat_ws_server_service_salome::PutFile::setArgs1Nil()
831 * Getter for args2 by Property Number 3
834 org_splat_ws_server_service_salome::PutFile::getProperty3()
843 org_splat_ws_server_service_salome::PutFile::getArgs2()
845 return property_Args2;
852 org_splat_ws_server_service_salome::PutFile::setArgs2(
853 const int64_t arg_Args2)
858 arg_Args2 == property_Args2)
870 property_Args2 = arg_Args2;
882 org_splat_ws_server_service_salome::PutFile::resetArgs2()
889 isValidArgs2 = false;
894 * Check whether args2 is nill
897 org_splat_ws_server_service_salome::PutFile::isArgs2Nil()
899 return !isValidArgs2;
903 * Set args2 to nill (currently the same as reset)
906 org_splat_ws_server_service_salome::PutFile::setArgs2Nil()