xzg wrote: > Hi all, > I have built an axis2 service in java and it provides a function of > getting a date, as wsdl segment: > <xs:element minOccurs="0" name="date" nillable="true" type="xs:date"/> > I can get the response with date, segment: > <date>2010-04-24+08:00</date> > But the c-stub "failed in building element date". > text_value = axiom_element_get_text(current_element, env, > current_node); // 2010-04-24+08:00 > element = (void*)axutil_date_time_create(env); > status = > axutil_date_time_deserialize_date_time((axutil_date_time_t*)element, > env, text_value); // AXIS2_FAILURE > Isn't it a bug? How to deserialize this date time correctly? Following code gave me
axis2_char_t *date_str = "2010-04-24+08:00"; printf("input:%s\n", date_str); axutil_date_time_t *date_time = axutil_date_time_create(env); /*status = axutil_date_time_deserialize_date_time_with_time_zone(date_time, env, date_str);*/ status = axutil_date_time_deserialize_date(date_time, env, date_str); if(status == AXIS2_SUCCESS) { axis2_char_t *result = NULL; /*result = axutil_date_time_serialize_date_time_with_time_zone(date_time, env);*/ result = axutil_date_time_serialize_date_time(date_time, env); printf("result:%s\n", result); } else { printf("failure\n"); } return 0; the result input:2010-04-24+08:00 result:2010-04-24T10:40:32.105Z with Axis2/C 1.6.0 Thanks, Damitha > Regards, > Zhigang -- __________________________________________________________________ Damitha Kumarage Technical Lead; WSO2 Inc. "Oxygenating the Web Service Platform; " http://www.wso2.com/ blog: " http://damithakumarage.wordpress.com/ __________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: c-user-unsubscr...@axis.apache.org For additional commands, e-mail: c-user-h...@axis.apache.org