axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Huebbers (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2C-730) using wsdl2c with -d adb option, and element with minOccurs=0 results in lost nodes in the deserialize method
Date Fri, 30 Nov 2007 19:52:43 GMT

    [ https://issues.apache.org/jira/browse/AXIS2C-730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547257
] 

Frank Huebbers commented on AXIS2C-730:
---------------------------------------

Hi Dimuthu,

I checked out the November 30th Snapshot of Axis2/Java which contains the WSDL2C tool and
the code generated with it now solves the issue I mentioned in this thread.

Thanks so much for the great turnaround time!

Frank

>  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: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message