134
134
if (NULL == parent)
136
136
/* This should be checked before everything */
137
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
137
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
138
138
"Failed in building adb object for ncGetConsoleOutputResponse : "
139
139
"NULL elemenet can not be passed to deserialize");
140
140
return AXIS2_FAILURE;
144
144
current_element = (axiom_element_t *)axiom_node_get_data_element(parent, env);
145
145
qname = axiom_element_get_qname(current_element, env, parent);
146
146
if (axutil_qname_equals(qname, env, _ncGetConsoleOutputResponse-> qname))
149
149
first_node = parent;
154
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
154
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
155
155
"Failed in building adb object for ncGetConsoleOutputResponse : "
156
156
"Expected %s but returned %s",
157
157
axutil_qname_to_string(_ncGetConsoleOutputResponse-> qname, env),
158
158
axutil_qname_to_string(qname, env));
160
160
return AXIS2_FAILURE;
166
166
* building ncGetConsoleOutputResponse element
171
171
current_node = first_node;
172
172
is_early_node_valid = AXIS2_FALSE;
175
175
while(current_node && axiom_node_get_node_type(current_node, env) != AXIOM_ELEMENT)
177
177
current_node = axiom_node_get_next_sibling(current_node, env);
254
254
const axutil_env_t *env, axiom_element_t *parent_element,
255
255
axutil_hash_t *namespaces, int *next_ns_index)
258
258
/* Here this is an empty function, Nothing to declare */
264
264
axiom_node_t* AXIS2_CALL
265
265
adb_ncGetConsoleOutputResponse_serialize(
266
266
adb_ncGetConsoleOutputResponse_t* _ncGetConsoleOutputResponse,
267
267
const axutil_env_t *env, axiom_node_t *parent, axiom_element_t *parent_element, int parent_tag_closed, axutil_hash_t *namespaces, int *next_ns_index)
272
272
axiom_node_t *current_node = NULL;
273
273
int tag_closed = 0;
277
277
axiom_namespace_t *ns1 = NULL;
279
279
axis2_char_t *qname_uri = NULL;
280
280
axis2_char_t *qname_prefix = NULL;
281
281
axis2_char_t *p_prefix = NULL;
282
282
axis2_bool_t ns_already_defined;
284
284
axis2_char_t text_value_1[64];
286
286
axis2_char_t *start_input_str = NULL;
287
287
axis2_char_t *end_input_str = NULL;
288
288
unsigned int start_input_str_len = 0;
289
289
unsigned int end_input_str_len = 0;
292
292
axiom_data_source_t *data_source = NULL;
293
293
axutil_stream_t *stream = NULL;
296
296
int next_ns_index_value = 0;
299
299
AXIS2_ENV_CHECK(env, NULL);
300
300
AXIS2_PARAM_CHECK(env->error, _ncGetConsoleOutputResponse, NULL);
303
303
namespaces = axutil_hash_make(env);
304
304
next_ns_index = &next_ns_index_value;
306
306
ns1 = axiom_namespace_create (env,
307
307
"http://eucalyptus.ucsb.edu/",
309
309
axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, axutil_strdup(env, "n"));
312
312
parent_element = axiom_element_create (env, NULL, "ncGetConsoleOutputResponse", ns1 , &parent);
315
315
axiom_element_set_namespace(parent_element, env, ns1, parent);
319
319
data_source = axiom_data_source_create(env, parent, ¤t_node);
320
320
stream = axiom_data_source_get_stream(data_source, env);
322
322
if(!(p_prefix = (axis2_char_t*)axutil_hash_get(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING)))
324
324
p_prefix = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof (axis2_char_t) * ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT);
325
325
sprintf(p_prefix, "n%d", (*next_ns_index)++);
326
326
axutil_hash_set(namespaces, "http://eucalyptus.ucsb.edu/", AXIS2_HASH_KEY_STRING, p_prefix);
328
328
axiom_element_declare_namespace_assume_param_ownership(parent_element, env, axiom_namespace_create (env,
329
329
"http://eucalyptus.ucsb.edu/",
334
334
if (!_ncGetConsoleOutputResponse->is_valid_ncGetConsoleOutputResponse)
338
338
start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
339
(5 + axutil_strlen(p_prefix) +
340
axutil_strlen("ncGetConsoleOutputResponse") +
341
axutil_strlen(" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:nil=\"1\"")));
339
(5 + axutil_strlen(p_prefix) +
340
axutil_strlen("ncGetConsoleOutputResponse") +
341
axutil_strlen(" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:nil=\"1\"")));
344
344
sprintf(start_input_str, "<%s%sncGetConsoleOutputResponse xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:nil=\"1\"/>",
345
345
p_prefix?p_prefix:"",
346
346
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
348
348
axutil_stream_write(stream, env, start_input_str, axutil_strlen(start_input_str));
349
349
AXIS2_FREE(env->allocator,start_input_str);
354
354
start_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
355
(4 + axutil_strlen(p_prefix) +
356
axutil_strlen("ncGetConsoleOutputResponse")));
355
(4 + axutil_strlen(p_prefix) +
356
axutil_strlen("ncGetConsoleOutputResponse")));
358
358
/* axutil_strlen("<:>") + 1 = 4 */
359
359
end_input_str = (axis2_char_t*)AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) *
360
360
(5 + axutil_strlen(p_prefix) + axutil_strlen("ncGetConsoleOutputResponse")));
361
361
/* axutil_strlen("</:>") + 1 = 5 */
369
369
* parsing ncGetConsoleOutputResponse element
374
374
sprintf(start_input_str, "<%s%sncGetConsoleOutputResponse",
375
375
p_prefix?p_prefix:"",
376
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
376
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
378
378
start_input_str_len = axutil_strlen(start_input_str);
379
379
sprintf(end_input_str, "</%s%sncGetConsoleOutputResponse>",
380
380
p_prefix?p_prefix:"",
381
381
(p_prefix && axutil_strcmp(p_prefix, ""))?":":"");
382
382
end_input_str_len = axutil_strlen(end_input_str);
384
adb_ncGetConsoleOutputResponseType_serialize(_ncGetConsoleOutputResponse->property_ncGetConsoleOutputResponse,
384
adb_ncGetConsoleOutputResponseType_serialize(_ncGetConsoleOutputResponse->property_ncGetConsoleOutputResponse,
385
385
env, current_node, parent_element,
386
386
adb_ncGetConsoleOutputResponseType_is_particle() || AXIS2_TRUE, namespaces, next_ns_index);
389
389
AXIS2_FREE(env->allocator,start_input_str);
390
390
AXIS2_FREE(env->allocator,end_input_str);
396
396
axutil_hash_index_t *hi;
398
for (hi = axutil_hash_first(namespaces, env); hi; hi = axutil_hash_next(env, hi))
398
for (hi = axutil_hash_first(namespaces, env); hi; hi = axutil_hash_next(env, hi))
400
400
axutil_hash_this(hi, NULL, NULL, &val);
401
401
AXIS2_FREE(env->allocator, val);
403
403
axutil_hash_free(namespaces, env);
414
414
* getter for ncGetConsoleOutputResponse.