You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Jose M Medina V <jo...@wesamconsulting.com> on 2009/10/11 18:29:14 UTC

Axis2c Questions

I am using Axis2/C for a few weeks and I think this is an incredible  
tool, but I’m still a newbie in web services world and an axis  
environment.

So I have a couple of questions and I appreciate any help that anyone  
could give to me.

There are some of the questions:
1.	It is possible use simple XML as a message in axis2c? If it  
possible could send me an example?
2.	If I need run some operation in a PostgreSQL database from the web  
service, I have to connect and disconnect to the database every time  
that the web service is called?

Thanks in advance and apologize for my bad English.

------------------------------------------------------------
José M. Medina V.
Wesam Consulting
jose_medina@wesamconsulting.com
Mobile: +58(416)613-3302 +58(414)019-0580
Ofc:     +58(212)959-4155 Ext. 204
BB pin: 31E562BF
Caracas - Venezuela







Re: Axis2c Questions

Posted by Atanacio Reyes <ar...@yahoo.com>.
I use PostgreSQL with out any problem, I use a global variable for the connection.  you need include the the database library with the service to work properly with apache when you compile the service.   you need to connect and disconnect to the database server every time the service is called.




________________________________
From: Jose M Medina V <jo...@wesamconsulting.com>
To: Apache AXIS C User List <ax...@ws.apache.org>
Sent: Tue, October 13, 2009 4:52:33 PM
Subject: Re: Axis2c Questions


I try the following approach.


I connect to the database in the function init and I use a global variable for the connection information, but when a try to make any operation in the database I receive a core dump in the service.

This problem only occur when I use the axis2c module for the apache server, when I use the simple http server from axis2, the approach work like a charm, so I think that the problems is something about threads.

If anybody has other idea about my questions, I thank in advance.

Regards,

On Oct 12, 2009, at 10:18 AM, Sam Carleton wrote:

I am no Axis2/C pro, and I don't have an answer to your first Q, but I believe the answer to the second question is:
>
>
>Do the initial connection to the database in the service's axis2_get_instance() function and then cleanup in axis2_remove_instance().  I am using SQLite and this is where I call sqlite3_initialize() and sqlite3_shutdown(), respectfully.  It works for me;)
>
>
>Sam
>
>
>On Sun, Oct 11, 2009 at 12:29 PM, Jose M Medina V <jo...@wesamconsulting.com> wrote:
>
>I am using Axis2/C for a few weeks and I think this is an incredible tool, but I’m still a newbie in web services world and an axis environment.
>>
>>
>>So I have a couple of questions and I appreciate any help that anyone could give to me.
>>
>>
>>There are some of the questions:
>>1.It is possible use simple XML as a message in axis2c? If it possible could send me an example?
>>2.If I need run some operation in a PostgreSQL database from the web service, I have to connect and disconnect to the database every time that the web service is called?
>>
>>
>>Thanks in advance and apologize for my bad English.
>>
>>
>>------------------------------------------------------------
>>José M. Medina V.
>>Wesam Consulting
>>jose_medina@wesamconsulting.com
>>Mobile: +58(416)613-3302 +58(414)019-0580
>>Ofc:     +58(212)959-4155 Ext. 204
>>BB pin: 31E562BF
>>Caracas - Venezuela
>>
>>
>>
>>
>>
>>
>

------------------------------------------------------------
José M. Medina V.
Wesam Consulting
jose_medina@wesamconsulting.com
Mobile: +58(416)613-3302 +58(414)019-0580
Ofc:     +58(212)959-4155 Ext. 204
BB pin: 31E562BF
Caracas - Venezuela


      

Re: Axis2c Questions

Posted by Selvaratnam Uthaiyashankar <ut...@gmail.com>.
Hi,

If you are using any variables higher than request scope, you have to
create it in global pool. Apache is having its own memory pool
implementation to manage memory. I think, thats why it works with
simple axis server, but not with mod_axis2. Before creating the global
variable, you might have to switch to global pool and after creating,
you have to switch back to local pool.

Can you send your service code to find the exact problem?

Regards,
Shankar

On Wed, Oct 14, 2009 at 5:22 AM, Jose M Medina V
<jo...@wesamconsulting.com> wrote:
> I try the following approach.
>
> I connect to the database in the function init and I use a global variable
> for the connection information, but when a try to make any operation in the
> database I receive a core dump in the service.
> This problem only occur when I use the axis2c module for the apache server,
> when I use the simple http server from axis2, the approach work like a
> charm, so I think that the problems is something about threads.
> If anybody has other idea about my questions, I thank in advance.
> Regards,
> On Oct 12, 2009, at 10:18 AM, Sam Carleton wrote:
>
> I am no Axis2/C pro, and I don't have an answer to your first Q, but I
> believe the answer to the second question is:
> Do the initial connection to the database in the
> service's axis2_get_instance() function and then cleanup
> in axis2_remove_instance().  I am using SQLite and this is where I
> call sqlite3_initialize() and sqlite3_shutdown(), respectfully.  It works
> for me;)
> Sam
>
> On Sun, Oct 11, 2009 at 12:29 PM, Jose M Medina V
> <jo...@wesamconsulting.com> wrote:
>>
>> I am using Axis2/C for a few weeks and I think this is an incredible tool,
>> but I’m still a newbie in web services world and an axis environment.
>> So I have a couple of questions and I appreciate any help that anyone
>> could give to me.
>> There are some of the questions:
>> 1. It is possible use simple XML as a message in axis2c? If it possible
>> could send me an example?
>> 2. If I need run some operation in a PostgreSQL database from the web
>> service, I have to connect and disconnect to the database every time that
>> the web service is called?
>> Thanks in advance and apologize for my bad English.
>> ------------------------------------------------------------
>> José M. Medina V.
>> Wesam Consulting
>> jose_medina@wesamconsulting.com
>> Mobile: +58(416)613-3302 +58(414)019-0580
>> Ofc:     +58(212)959-4155 Ext. 204
>> BB pin: 31E562BF
>> Caracas - Venezuela
>>
>>
>>
>>
>>
>
>
> ------------------------------------------------------------
> José M. Medina V.
> Wesam Consulting
> jose_medina@wesamconsulting.com
> Mobile: +58(416)613-3302 +58(414)019-0580
> Ofc:     +58(212)959-4155 Ext. 204
> BB pin: 31E562BF
> Caracas - Venezuela
>
>
>
>
>
>



-- 
S.Uthaiyashankar
Software Architect
WSO2 Inc.
http://wso2.com/ - "The Open Source SOA Company"

Re: Axis2c Questions

Posted by Jose M Medina V <jo...@wesamconsulting.com>.
I try the following approach.


I connect to the database in the function init and I use a global  
variable for the connection information, but when a try to make any  
operation in the database I receive a core dump in the service.

This problem only occur when I use the axis2c module for the apache  
server, when I use the simple http server from axis2, the approach  
work like a charm, so I think that the problems is something about  
threads.

If anybody has other idea about my questions, I thank in advance.

Regards,

On Oct 12, 2009, at 10:18 AM, Sam Carleton wrote:

> I am no Axis2/C pro, and I don't have an answer to your first Q, but  
> I believe the answer to the second question is:
>
> Do the initial connection to the database in the service's  
> axis2_get_instance() function and then cleanup in  
> axis2_remove_instance().  I am using SQLite and this is where I call  
> sqlite3_initialize() and sqlite3_shutdown(), respectfully.  It works  
> for me;)
>
> Sam
>
> On Sun, Oct 11, 2009 at 12:29 PM, Jose M Medina V <jose_medina@wesamconsulting.com 
> > wrote:
> I am using Axis2/C for a few weeks and I think this is an incredible  
> tool, but I’m still a newbie in web services world and an axis  
> environment.
>
> So I have a couple of questions and I appreciate any help that  
> anyone could give to me.
>
> There are some of the questions:
> 1.	It is possible use simple XML as a message in axis2c? If it  
> possible could send me an example?
> 2.	If I need run some operation in a PostgreSQL database from the  
> web service, I have to connect and disconnect to the database every  
> time that the web service is called?
>
> Thanks in advance and apologize for my bad English.
>
> ------------------------------------------------------------
> José M. Medina V.
> Wesam Consulting
> jose_medina@wesamconsulting.com
> Mobile: +58(416)613-3302 +58(414)019-0580
> Ofc:     +58(212)959-4155 Ext. 204
> BB pin: 31E562BF
> Caracas - Venezuela
>
>
>
>
>
>
>

------------------------------------------------------------
José M. Medina V.
Wesam Consulting
jose_medina@wesamconsulting.com
Mobile: +58(416)613-3302 +58(414)019-0580
Ofc:     +58(212)959-4155 Ext. 204
BB pin: 31E562BF
Caracas - Venezuela







Re: Axis2c Questions

Posted by Sam Carleton <sc...@gmail.com>.
I am no Axis2/C pro, and I don't have an answer to your first Q, but I
believe the answer to the second question is:
Do the initial connection to the database in the
service's axis2_get_instance() function and then cleanup
in axis2_remove_instance().  I am using SQLite and this is where I
call sqlite3_initialize() and sqlite3_shutdown(), respectfully.  It works
for me;)

Sam

On Sun, Oct 11, 2009 at 12:29 PM, Jose M Medina V <
jose_medina@wesamconsulting.com> wrote:

> I am using Axis2/C for a few weeks and I think this is an incredible tool,
> but I’m still a newbie in web services world and an axis environment.
>
> So I have a couple of questions and I appreciate any help that anyone could
> give to me.
>
> There are some of the questions:
> 1. It is possible use simple XML as a message in axis2c? If it possible
> could send me an example?
> 2. If I need run some operation in a PostgreSQL database from the web
> service, I have to connect and disconnect to the database every time that
> the web service is called?
>
> Thanks in advance and apologize for my bad English.
>
> ------------------------------------------------------------
> José M. Medina V.
> Wesam Consulting
> jose_medina@wesamconsulting.com
> Mobile: +58(416)613-3302 +58(414)019-0580
> Ofc:     +58(212)959-4155 Ext. 204
> BB pin: 31E562BF
> Caracas - Venezuela
>
>
>
>
>
>
>