axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Vijayalakshmi.VenkadaSw...@cognizant.com>
Subject Axis2C - getting junk character in response after setting the values in S ET method
Date Tue, 03 Apr 2007 08:48:15 GMT

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.

 



This e-mail and any files transmitted with it are for the sole use of the intended recipient(s)
and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy
all copies of the original message. 
Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of
this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.
Mime
View raw message