axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sathya Raghunathan" <pappu.raghunat...@gmail.com>
Subject Problem while returning the response back (axis2C)
Date Tue, 25 Sep 2007 04:40:08 GMT
Hi

I sent a message to the service, but i have a problem while getting the
output message.

Please have a look at the service implementation:

 adb_pInterchange_t* axis2_skel_ParseMessage_parseMessage (const
axutil_env_t *env  ,
                                              adb_inputMessage_t*
inputMessage )
        {
          /* TODO fill this with the necessary business logic */
        adb_pInterchange_t* myInt = adb_pInterchange_create(env);
        printf ("I am inside the service method %u\n",myInt );
        myInt->attrib_pInterchange = adb_INTERCHANGE_create(env);

adb_INTERCHANGE_set_internal_intref_no(myInt->attrib_pInterchange,env,"222222");
        printf("The address of intref no =
%u\n",adb_INTERCHANGE_get_internal_intref_no(myInt->attrib_pInterchange,env));

adb_INTERCHANGE_set_interchange_ref_no(myInt->attrib_pInterchange,env,"333333");

adb_INTERCHANGE_set_sender_id(myInt->attrib_pInterchange,env,"44444");
        myInt->attrib_pInterchange->attrib_message= adb_MESSAGE_create(env);
        printf ("THe sender id = %s\n",
adb_INTERCHANGE_get_sender_id(myInt->attrib_pInterchange,env));

 return myInt;
        }

Here, i created a pointer of  myInt and populated with some value. And
returned myInt. When i print it in the client side, I am getting junk.

 When i debugged it, I found that in adb_pInterchange_t*
axis2_stub_ParseMessage_parseMessage() function (axis2_stub_ParseMessage.c)
, after the call to axis2_svc_client_send_receive_with_op_qname( svc_client,
env, op_qname, payload), the code has generated another object of
adb_pInterchange_t and returns that to the client. If that is returned, the
object that I return from the service is lost. I am attaching the file
axis2_stub_ParseMessage.c for reference. Reference: LIne number : 140 and
149. Why there is a call to create interchange object once again at line 48?
I was thinking that, the object returned by the service should be returned
to the client.

Please let me know if the way, i created the object inside the service is
correct or not.

Thanks

Sathya

Mime
View raw message