[ https://issues.apache.org/jira/browse/AXIS2C-730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dimuthu Gamage updated AXIS2C-730: ---------------------------------- Attachment: case20.tar.gz I generated the code for a similar schema as yours. (Check the attachment) Please reopen the issue if this doesnt solve your problem. Thanks for reporting the bug. > using wsdl2c with -d adb option, and element with minOccurs=0 results in > lost nodes in the deserialize method > -------------------------------------------------------------------------------------------------------------- > > Key: AXIS2C-730 > URL: https://issues.apache.org/jira/browse/AXIS2C-730 > Project: Axis2-C > Issue Type: Bug > Components: code generation > Affects Versions: 1.1.0 > Environment: Windows > Reporter: José Manuel Rubio > Attachments: AXIS2C-730.patch, case20.tar.gz, diff > > > I created stub using wsdl2c with -d adb option. > Generated code does not take into account the fact that a node could be > missing from the input. For example the following code is being generated: > axis2_status_t AXIS2_CALL > adb_ship_deserialize( > adb_ship_t* _ship, > const axutil_env_t *env, > axiom_node_t* parent) > { > . > . > . > if (current_node && axiom_node_get_data_element( current_node, env) && > !axutil_strcmp("actualDraught", > axiom_element_get_localname((axiom_element_t *)axiom_node_get_data_element( > current_node, env), env)) > ) > { > current_element = (axiom_element_t *)axiom_node_get_data_element( > current_node, env); > text_value = axiom_element_get_text(current_element, env, > current_node ); > > status = adb_ship_set_actualDraught( _ship, env, > > atof( text_value)); > > if( AXIS2_FAILURE == status) > { > AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "failed in setting the > value for actualDraught " > " %d :: %s", > env->error->error_number, > > AXIS2_ERROR_GET_MESSAGE(env->error)); > return AXIS2_FAILURE; > } > } > if(current_node != NULL) > { > //Here it is asking for the next node even when the code above has > not processed the current_node > current_node = axiom_node_get_next_sibling( current_node, env); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]