axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raghavendra SM" <rag...@aylus.com>
Subject RE: Services.xml
Date Thu, 26 Jul 2007 08:58:50 GMT
Hi Samisa,

Please find the server code below, which is causing the problems as 
described by Manoj Rao. Please let me know if need more information than 
this.

These are the skeleton functions of the server.
 

----------------------------------

33 int AXIS2_CALL

 34 my_init(axis2_svc_skeleton_t *svc_skeleton,

 35                         const axutil_env_t *env)

 36 {

 37   SpsErrorLog("\nSPSAS: Entered my_init()\n");

 38   fflush(stdout);

 39     svc_skeleton->func_array = axutil_array_list_create(env, 0);

 40     axutil_array_list_add(svc_skeleton->func_array, env, 
(void*)"create");

 41     axutil_array_list_add(svc_skeleton->func_array, env, 
(void*)"delete");

 42     axutil_array_list_add(svc_skeleton->func_array, env, 
(void*)"update");

 43

 44     /* Any initialization stuff goes here */

 45     return AXIS2_SUCCESS;

 46 }

 

48 int AXIS2_CALL

 49 my_free(axis2_svc_skeleton_t *svc_skeleton,

 50             const axutil_env_t *env)

 51 {

 52     TraceLog("\n[AG-DEBUG] entered my_free\n");

 53     fflush(stdout);

 54     

 66     if(svc_skeleton)

 67     {

 68         AXIS2_FREE((env)->allocator, svc_skeleton);

 69         svc_skeleton = NULL;

 70     }

 71     return AXIS2_SUCCESS;

 72 }

 

 77  axiom_node_t* AXIS2_CALL

 78 acc_invoke(axis2_svc_skeleton_t *svc_skeleton,

 79             const axutil_env_t *env,

 80             axiom_node_t *node,

 81             axis2_msg_ctx_t *msg_ctx)

 82 {

 83    fflush(stdout);

 85     /* Depending on the function name invoke the

 86      *  corresponding method

 87      */

 88     if (node)

 89     {

 90         if (axiom_node_get_node_type(node, env) == AXIOM_ELEMENT)

 91         {

 92             axiom_element_t *element = NULL;

 93             element = (axiom_element_t 
*)axiom_node_get_data_element(node, env);

 94             if (element)

 95             {

 96                 axis2_char_t *op_name = 
axiom_element_get_localname(element, env);

 97                 if (op_name)

 98                 {

 99                     if ( axutil_strcmp(op_name, "create") == 0 )

100                         return axis2_my_create1(env, node);

101                     if ( axutil_strcmp(op_name, "delete") == 0 )

102                         return axis2_my_delete1(env, node);

103                     if ( axutil_strcmp(op_name, "modify") == 0 )

104                         return axis2_my_modify1(env, node);

105                     if ( axutil_strcmp(op_name, "readList) == 0 )

106                         return axis2_my_readList(env, node);

107                 }

108             }

109         }

110     }

111   else

112   {

113       ErrorLog("ERROR: invalid OM parameters in request\n");

114   }

115

116     /** TODO: return a SOAP fault here */

117     return node;

118 }

 

 119    static const axis2_svc_skeleton_ops_t my_svc_skeleton_ops_var = 
{

120                     my_init,

121                     my_invoke,

122                     NULL,

123                     my_free

124     };

125

126 axis2_svc_skeleton_t *

127 axis2_my_create(const axutil_env_t *env)

128 {

129

132     axis2_svc_skeleton_t *svc_skeleton = NULL;

133     svc_skeleton = (axis2_svc_skeleton_t*) 
AXIS2_MALLOC((env)->allocator,

134         sizeof(axis2_svc_skeleton_t));

135

136

137     svc_skeleton->ops = (axis2_svc_skeleton_ops_t*)AXIS2_MALLOC(

138         (env)->allocator, sizeof(axis2_svc_skeleton_ops_t));

139

140     svc_skeleton->func_array = NULL;

141     svc_skeleton->ops = &my_svc_skeleton_ops_var;

142

150     return svc_skeleton;

151 }

 

157  AXIS2_EXPORT int axis2_get_instance(struct axis2_svc_skeleton 
**inst,

158                         const axutil_env_t *env)

159 {

160   SpsTraceLog("\nCalling dlopen() inside axis2_get_instance\n");

161   ptr = dlopen("/root/lib/libMy.so",RTLD_LAZY|RTLD_GLOBAL);

162   if(NULL == ptr)

163   {

164     SpsErrorLog("\ndlopen returned NULL");

165     SpsErrorLog("\nFor dlopen()...........dlerror says the 
following\n%s\n",dlerror());

166   }

167   SpsTraceLog("\ndlopen returned ptr with addr %u",ptr);

168

169

170   *inst = axis2_my_create(env);

171     if(NULL == (*inst))

172     {

173         return AXIS2_FAILURE;

174     }

175

176     return AXIS2_SUCCESS;

177 }

178

179 AXIS2_EXPORT int axis2_remove_instance(axis2_svc_skeleton_t *inst,

180                             const axutil_env_t *env)

181 {

182     axis2_status_t status = AXIS2_FAILURE;

183   if (inst)

184   {

185         status = AXIS2_SVC_SKELETON_FREE(inst, env);

186     }

187     return status;

188 }


Regards,
~raghav
 
-----Original Message-----
From: Samisa Abeysinghe [mailto:samisa@wso2.com] 
Sent: Thursday, July 26, 2007 8:38 AM
To: Apache AXIS C User List
Subject: Re: Services.xml

Is it possible for you to send the server code?
I can try it and see what is going wrong.

Thanks,
Samisa...

Manoj Rao wrote:
> Hi all,
> What are the major differences in the logic of 
> axis2_raw_xml_in_out_msg_recv_invoke_business_logic_sync() function 
> between 0.90 and 1.0. Is it just the nomenclature of API's? I am 
facing 
> problems in my PostDispatch phase where my response xml from server is 

> not reaching the client. Please help me.
> Thanks,
> Manoj R
>
> -----Original Message-----
> From: Samisa Abeysinghe [mailto:samisa@wso2.com] 
> Sent: Monday, July 23, 2007 1:34 PM
> To: Apache AXIS C User List
> Subject: Re: Services.xml
>
> Looking at the back trace, the problem is most probably with the 
service 
>
> library.
> Please try to re-compile the service. Also make sure the old libs form 

> 0.90 are not in the library path, when you compile and run the service 

> and client.
>
> Samisa...
>
> Manoj Rao wrote:
>   
>> Ok Maybe I was not clear in my previous emails, sorry. I am using 
>>     
> 1.0's 
>   
>> axis2.xml and when I send a request from the client my application 
>>     
> dies 
>   
>> after invoking the handler context_handler in PostDispatch phase. 
>> Backtrace from core shows the following.
>>
>>
>>     
> 
========================================================================
>   
>> (gdb) bt
>> #0  axis2_msg_recv_make_new_svc_obj (msg_recv=0x8194290, 
>>     
> env=0x81fbe28, 
>   
>> msg_ctx=0x81fc8f0) at msg_recv.c:157
>> #1  0xb7a61b35 in axis2_msg_recv_get_impl_obj (msg_recv=0x8194290, 
>> env=0x81fbe28, msg_ctx=0x81fc8f0) at msg_recv.c:184
>> #2  0xb7a61fc2 in 
>> axis2_raw_xml_in_out_msg_recv_invoke_business_logic_sync 
>> (msg_recv=0x8194290, env=0x81fbe28,
>>     msg_ctx=0x81fc8f0, new_msg_ctx=0x8204e50) at 
>> raw_xml_in_out_msg_recv.c:93
>> #3  0xb7a61694 in axis2_msg_recv_invoke_business_logic 
>> (msg_recv=0x8194290, env=0x81fbe28, in_msg_ctx=0x81fc8f0,
>>     out_msg_ctx=0x8204e50) at msg_recv.c:372
>> #4  0xb7a61c4d in axis2_msg_recv_receive_impl (msg_recv=0x8194290, 
>> env=0x81fbe28, msg_ctx=0x81fc8f0,
>>     callback_recv_param=0x0) at msg_recv.c:304
>> #5  0xb7a61714 in axis2_msg_recv_receive (msg_recv=0x8194290, 
>> env=0x81fbe28, msg_ctx=0x81fc8f0, callback_recv_param=0x0)
>>     at msg_recv.c:407
>> #6  0xb7a59aac in axis2_engine_receive (engine=0x82045b0, 
>>     
> env=0x81fbe28, 
>   
>> msg_ctx=0x81fc8f0) at engine.c:288
>> #7  0xb7a7e144 in 
axis2_http_transport_utils_process_http_post_request 
>>     
>
>   
>> (env=0x81fbe28, msg_ctx=0x81fc8f0,
>>     in_stream=0x81fbe58, out_stream=0x81fbff0, content_type=0x81fbef8 

>> "text/xml; charset=utf-8", content_length=632,
>>     soap_action_header=0x81fcc30, request_uri=0x81fca78 
>> "http://127.0.0.1:9090/axis2/services/SpsMvnoprofile")
>>     at http_transport_utils.c:485
>> #8  0xb76ad307 in axis2_http_worker_process_request 
>> (http_worker=0x81fa9d8, env=0x81fbe28, svr_conn=0x81fbe48,
>>     simple_request=0x81fbee0) at http_worker.c:299
>> #9  0xb7a8db72 in axis2_svr_thread_worker_func (thd=0x81fbda0, 
>> data=0x81faa10) at http_svr_thread.c:256
>> #10 0xb7aad9fd in dummy_worker () from /opt/aylus/lib/libaxutil.so.0
>> #11 0xb7f510bd in start_thread () from /lib/tls/libpthread.so.0
>> #12 0xb793b9ee in clone () from /lib/tls/libc.so.6
>>
>>     
> 
========================================================================
>   
>> I am not quite sure what the problem is, AXIS2_SVC_SKELETON_INIT 
fails 
>>     
>
>   
>> as impl_class = 0x00
>>
>> -----Original Message-----
>> From: Dinesh Premalal [mailto:xydinesh@gmail.com] 
>> Sent: Monday, July 23, 2007 1:43 PM
>> To: axis-c-user@ws.apache.org
>> Subject: Re: Services.xml
>>
>> Hi Manoj,
>> "Manoj Rao" <rmanoj@aylus.com> writes:
>>
>>   
>>     
>>> Hi Dinesh,
>>> Thanks for the reply. I was using axis2c 0.90 till recently and now 
>>> migrated to 1.0 the same services.xml doesn't work here is there 
>>> anything I need to change in axis2.xml before using it? Sample of my 

>>> working services.xml is the simple math sample.
>>>     
>>>       
>> It is the same services.xml still in math sample. AFAIK there is no
>> special changes required in axis2.xml. What does your axis2.log says 
?
>>
>> thanks,
>> Dinesh
>>
>>   
>>     
>
>
>   


-- 
Samisa Abeysinghe : http://www.wso2.org/ (WSO2 Oxygen Tank - Web 
Services Developers' Portal)


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message