Re: Segmentation fault when calling webservice

2007-06-11 Thread jl . lesieur
I've looked twice on my svc_skeleton_ops_var it seems ok, but I've found
how to reproduce the  bug. It's a linker problem.

If I take the echo example and I try to compile it with an external libs
(-l option of gcc) even if I dont modify the echo service code, the server
crashes.

My LD_LIBRARY_PATH seems ok so, I've tried to put a link to my lib in
/usr/lib, it crashes again. It seems that there's a problem in the axis
lib loader.

Regards,
JL



 Looking at the trace, most probably, this is to do with the init method
 of your service implementation.
 Could you please check the code where the svc_skeleton_ops are
 initialized. It would help to see either the code or the WSDL that you
 are using, if you have no concerns sending it to the list.

 Thanks,
 Samisa...

 Jean-Louis LESIEUR wrote:
 Hello,

 Back to home !

 Here's the backtrace of my axis_http_server

 Program terminated with signal 11, Segmentation fault.
 #0  0xb7e646a3 in axis2_msg_recv_make_new_svc_obj (msg_recv=0x80e4c70,
 env=0x8126fd8, msg_ctx=0x8127a18) at msg_recv.c:157
 157 AXIS2_SVC_SKELETON_INIT((axis2_svc_skeleton_t
 *)impl_class, env);
 (gdb) backtrace
 #0  0xb7e646a3 in axis2_msg_recv_make_new_svc_obj (msg_recv=0x80e4c70,
 env=0x8126fd8, msg_ctx=0x8127a18) at msg_recv.c:157
 #1  0xb7e647b4 in axis2_msg_recv_get_impl_obj (msg_recv=0x80e4c70,
 env=0x8126fd8, msg_ctx=0x8127a18) at msg_recv.c:184
 #2  0xb7e650f0 in
 axis2_raw_xml_in_out_msg_recv_invoke_business_logic_sync
 (msg_recv=0x80e4c70, env=0x8126fd8, msg_ctx=0x8127a18,
 new_msg_ctx=0x812f0b8)
 at raw_xml_in_out_msg_recv.c:93
 #3  0xb7e64e2d in axis2_msg_recv_invoke_business_logic
 (msg_recv=0x80e4c70, env=0x8126fd8, in_msg_ctx=0x8127a18,
 out_msg_ctx=0x812f0b8) at msg_recv.c:372
 #4  0xb7e64c35 in axis2_msg_recv_receive_impl (msg_recv=0x80e4c70,
 env=0x8126fd8, msg_ctx=0x8127a18, callback_recv_param=0x0) at
 msg_recv.c:304
 #5  0xb7e64e89 in axis2_msg_recv_receive (msg_recv=0x80e4c70,
 env=0x8126fd8, msg_ctx=0x8127a18, callback_recv_param=0x0) at
 msg_recv.c:407
 #6  0xb7e59bae in axis2_engine_receive (engine=0x812ead8,
 env=0x8126fd8, msg_ctx=0x8127a18) at engine.c:288
 #7  0xb7f12ec6 in axis2_http_transport_utils_process_http_post_request
 (env=0x8126fd8, msg_ctx=0x8127a18, in_stream=0x8127000,
 out_stream=0x8127030,
 content_type=0x80c80b0 application/soap+xml;charset=UTF-8,
 content_length=262, soap_action_header=0x0, request_uri=0x8127be0
 http://127.0.0.1:9090/axis2/services/majcsp;)
 at http_transport_utils.c:485
 #8  0xb7f11686 in axis2_http_worker_process_request
 (http_worker=0x81267f8, env=0x8126fd8, svr_conn=0x8126ff0,
 simple_request=0x81270b0) at http_worker.c:299
 #9  0xb7e1403a in axis2_svr_thread_worker_func (thd=0x8126f28,
 data=0x8126818) at http_svr_thread.c:256
 #10 0xb7ec241d in dummy_worker (opaque=0x8126f28) at thread_unix.c:85
 #11 0xb7cbb31b in start_thread () from
 /lib/tls/i686/cmov/libpthread.so.0
 #12 0xb7c2c57e in clone () from /lib/tls/i686/cmov/libc.so.6

 It seem there's a problem with my skeleton. But I dont find what is
 wrong in my source ... Here's my service :


 #include axiom_xml_writer.h
 #include stdio.h
 #include axis2_svc_skeleton.h
 #include axutil_array_list.h
 #include axis2_msg_ctx.h
 #include stdio.h
 #include axis2_svc_skeleton.h
 #include axutil_log_default.h
 #include axutil_error_default.h
 #include axiom_text.h
 #include axiom_node.h
 #include axiom_element.h
 // THIS IS AN EXTERNAL .H WHERE YOU CAN FIND THE DECLARATION OF THE
 FUNCTION ws_majcsp_update
 #include WSWrapper.h


 axiom_node_t* AXIS2_CALL
 majcsp_invoke(axis2_svc_skeleton_t *svc_skeleton,
 const axutil_env_t *env,
 axiom_node_t *node,
 axis2_msg_ctx_t *msg_ctx);


 int AXIS2_CALL
 majcsp_init(axis2_svc_skeleton_t *svc_skeleton,
 const axutil_env_t *env);

 axiom_node_t* AXIS2_CALL
 majcsp_on_fault(axis2_svc_skeleton_t *svc_skeli,
 const axutil_env_t *env, axiom_node_t *node);


 int AXIS2_CALL
 majcsp_free(axis2_svc_skeleton_t *svc_skeleton,
 const axutil_env_t *env);


 static const axis2_svc_skeleton_ops_t majcsp_svc_skeleton_ops_var = {
 majcsp_init,
 majcsp_invoke,
 majcsp_on_fault,
 majcsp_free
 };


 int AXIS2_CALL
 majcsp_init(axis2_svc_skeleton_t *svc_skeleton,
 const axutil_env_t *env)
 {
 svc_skeleton-func_array = axutil_array_list_create(env, 0);
 axutil_array_list_add(svc_skeleton-func_array, env, greet);
 return AXIS2_SUCCESS;
 }

 axiom_node_t* AXIS2_CALL
 majcsp_invoke(axis2_svc_skeleton_t *svc_skeleton,
 const axutil_env_t *env,
 axiom_node_t *node,
 axis2_msg_ctx_t *msg_ctx)
 {
 // NEVER DISPLAYED !
 printf(\n\nINVOKE\n\n);
 // METHOD IN ANOTHER .SO
   return ws_majcsp_update(env, node);
 }


 axiom_node_t* AXIS2_CALL
 majcsp_on_fault(axis2_svc_skeleton_t *svc_skeli,
 const axutil_env_t *env, axiom_node_t *node)
 {
 axiom_node_t *error_node = NULL;
 axiom_node_t *text_node = NULL;

Problem with Complex Objects in AxisCPP Engine!!

2007-06-11 Thread Shailesh Srivastava
I am facing a very serious problem with AxisCPP.

The problem is a show-stopper for me.

Here I explain:

 

I am trying to deploy a web-service for ALE(application level events) as
per the EPC Global standards. WSDL file has been taken from the EPC
Global Standard web-site.

 

The services are deployed properly. 

The Client sends an XML file, which axis server receives and
deserializes into Objects named as ECSpecs ( It's a complex type
object).

 

But the Values in the ECSpec complex object are not proper.

Example:

The XML file sent by Client is:

?xml version=1.0 encoding=UTF-8 ? 

- ale:ECSpec xmlns:ale=urn:epcglobal:ale:xsd:1
xmlns:epcglobal=urn:epcglobal:xsd:1
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=urn:epcglobal:ale:xsd:1 Ale.xsd schemaVersion=1.0
creationDate=2003-08-06T10:54:06.444-05:00

- logicalReaders

  logicalReaderdock_1a/logicalReader 

  logicalReaderdock_1b/logicalReader 

  /logicalReaders

- boundarySpec

  startTriggerhttp://sample.com/trigger1/startTrigger 

  repeatPeriod unit=MS2/repeatPeriod 

  stopTriggerhttp://sample.com/trigger2/stopTrigger 

  duration unit=MS3000/duration 

  /boundarySpec

- reportSpecs

- reportSpec reportName=report1

  reportSet set=CURRENT / 

  output includeTag=true / 

  /reportSpec

- reportSpec reportName=report2

  reportSet set=ADDITIONS / 

  output includeCount=true / 

  /reportSpec

- reportSpec reportName=report3

  reportSet set=DELETIONS / 

- groupSpec

  patternurn:epc:pat:sgtin-64:X.X.X.*/pattern 

  /groupSpec

  output includeCount=true / 

  /reportSpec

  /reportSpecs

/ale:ECSpec

 

When I try to access startTrigger etc, values the simple_axis_server
dumps.
Also, the repeatPeriod which is defined as xsd__long and should have a
value 2000 is getting a value 275638678

 

I am using Xerces 2.2 and axiscpp 1.4. I guess it's a problem either
with the XML Parser or Desrialization function.

 

Can any one (Samisa, or any one) help me in this regard.

 

Is it a problem with deep copy not being done in engine

 

Awaiting your response.

 

Thanks in Advance

-Shailesh

Shailesh Srivastava
Sr. Software Engineer
Ttec.soc-soft.com
Extn:3297
Mb: +919886624708


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[AXIS2C]: How to implement business logic in C++?

2007-06-11 Thread Yingwei Yang

Hi Group,

Because all my business logics are implemented in C++, so I am trying to
implement the hello_svc.c in C++.

Here is what I did:
1.  Added the explicit cast to cast void* to axis2_svc_skeleton_t*

   axis2_svc_skeleton_t *svc_skeleton = NULL;
   svc_skeleton = (axis2_svc_skeleton_t *)AXIS2_MALLOC(env-allocator,
   sizeof(axis2_svc_skeleton_t));

2. Added the
  #ifdef __cplusplus
  extern C
  {
  #endif

  and

  #ifdef __cplusplus
  }
  #endif

at the beginning and the end of the hello_svc.cpp file.

3. compile it using g++ (with the same argument as with gcc)

4. copy the libhello.so to the axis2c hello service.

5. Invoide the hello client

then I got the Segmentation fault at the Invoke the handler context_handler
within the phase PostDispatch phase.

what did I do wrong? is it possible to implement the service skeleton code
in C++?


Thanks!!!

--
Yingwei Yang


Re: [AXIS2C]: How to implement business logic in C++?

2007-06-11 Thread Dinesh Premalal
Hi Yingwei,

Yingwei Yang [EMAIL PROTECTED] writes:
 then I got the Segmentation fault at the Invoke the handler context_handler
 within the phase PostDispatch phase.

 what did I do wrong? is it possible to implement the service skeleton code in
 C++?

I think it is possible, in order to determine what has happened in
your case we need some more details. 

1. Are you sure about your service.xml ? What is the directory name
that you use to put your service?

2. Can you provide us your axis2.log , Please make sure to run server
in debug mode.

3. It would be great if you could send us gdb backtrace.

thanks,
Dinesh
-- 
Dinesh Premalal
http://xydinesh.wordpress.com
GPG ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257  0229 4F44 266E A255 955C

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [AXIS2C]: How to implement business logic in C++?

2007-06-11 Thread Yingwei Yang

Hi Dinesh,

Thank you very much for the reply. I just realized that I didn't run the
axis2_http_server with the correct permission, which caused the error I
mentioned above. and no log files been written because of the lack of
permission.

Now it runs fine. :)
Thanks.

On 6/11/07, Dinesh Premalal [EMAIL PROTECTED] wrote:


Hi Yingwei,

Yingwei Yang [EMAIL PROTECTED] writes:
 then I got the Segmentation fault at the Invoke the handler
context_handler
 within the phase PostDispatch phase.

 what did I do wrong? is it possible to implement the service skeleton
code in
 C++?

I think it is possible, in order to determine what has happened in
your case we need some more details.

1. Are you sure about your service.xml ? What is the directory name
that you use to put your service?

2. Can you provide us your axis2.log , Please make sure to run server
in debug mode.

3. It would be great if you could send us gdb backtrace.

thanks,
Dinesh
--
Dinesh Premalal
http://xydinesh.wordpress.com
GPG ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257  0229 4F44 266E A255 955C

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Yingwei Yang


Re: [AXIS2C]: How to implement business logic in C++?

2007-06-11 Thread Dumindu Pallewela

Yingwei Yang wrote:

Hi Dinesh,

Thank you very much for the reply. I just realized that I didn't run the 
axis2_http_server with the correct permission, which caused the error I 
mentioned above. and no log files been written because of the lack of 
permission.


Hi Yang and Dinesh,

I don't think that the axis2_http_server should seg fault on a 
permissions issue. When I try to run the server without write 
permissions for log file, it instead is written to the standard output.


I guess that this _might_ possibly be a bug. If you could please provide 
more details on how the seg fault could be recreated.


-Dumindu.


Now it runs fine. :)
Thanks.

On 6/11/07, *Dinesh Premalal* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Hi Yingwei,

Yingwei Yang [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] writes:
  then I got the Segmentation fault at the Invoke the handler
context_handler
  within the phase PostDispatch phase.
 
  what did I do wrong? is it possible to implement the service
skeleton code in
  C++?

I think it is possible, in order to determine what has happened in
your case we need some more details.

1. Are you sure about your service.xml ? What is the directory name
that you use to put your service?

2. Can you provide us your axis2.log , Please make sure to run server
in debug mode.

3. It would be great if you could send us gdb backtrace.

thanks,
Dinesh
--
Dinesh Premalal
http://xydinesh.wordpress.com
GPG ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257  0229 4F44 266E A255
955C

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]




--
Yingwei Yang



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]