Hi
we are using the following srtuct in webservice creation.
struct item
{
int id;
char* strvalue1;
char* strvalue2;
};
1. we are using a COM API function which returns _variant_t variable
2. Converting it into char* and trying to set the struct variable using the
set method of AXIS2C
but it responses with junk values for the above sructure
the following code explains ..
struct item* itemdtls;
struct axis2_item* getitem_out = NULL;
axis2_GetDefectItemResponse_t* getitem_response = NULL;
axis2_GetItemResponse_t* getitem_response = NULL;
int intput_val = 0;
intput_val = AXIS2_GETDEFECTITEM_GET_ID(getItem, env);
itemdtls = GetDefectItem(14); // calling COM API
// it returns all tyhe
(char*)values
from the DB
getitem_out = axis2_Item_create(env);
AXIS2_ITEM_SET_ID(getitem_out, env, itemdtls->id); //
setting
the com api returned values
AXIS2_ITEM_SET_STRVALUE1(getitem_out, env, itemdtls->strvalue1);
AXIS2_ITEM_SET_STRVALUE1(getitem_out, env, itemdtls->strvalue2)
getitem_response = axis2_GetItemResponse_create(env);
AXIS2_GETITEMRESPONSE_SET_ITEMRETURN(getitem_response, env,
getitem_out);
return getitem_response;
it compiles and deployed the dll in service folder of Axis2c setup.
3. using java client to invoke the service but it responses with junk
characters for the above struct variable.
IMP: while debugging the COM API, it returns value.
can any one help to solve the above to set the value in response object.
-Viji.
--
View this message in context:
http://www.nabble.com/Axis2C---getting-junk-character-in-response-after-setting-the-values-in-S-ET-method-tf3510083.html#a9804472
Sent from the Axis - C++ - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]