Re: Endpoint Address

2009-11-24 Thread Jose M Medina V
What is the procedure to get this work?

Regards,

On Nov 24, 2009, at 4:09 PM, Supun Kamburugamuva wrote:

 I think the way you get endpoint_ref is correct. But I'm not sure from your 
 comment weather endpoint_ref is NULL or a filed inside endpoint_ref is NULL. 
 In any case it should be a bug.
 
 Thanks,
 Supun..  
 
 On Wed, Oct 21, 2009 at 11:55 PM, Jose M Medina V 
 jose_med...@wesamconsulting.com wrote:
 Hi, I try to get the target endpoint address in a services in Axis2c, I put 
 the following code in the invoke function in the skeleton library:
 
 axis2_endpoint_ref_t *endpoint_ref = NULL;
 const axis2_char_t *address = NULL;
 .
 .
 .
 endpoint_ref = axis2_msg_ctx_get_to(msg_ctx, env);
   if(endpoint_ref)
   {
 AXIS2_LOG_DEBUG(env-log, AXIS2_LOG_SI, %s%s 
 if(endpoint_ref),pdesWebServ-nombre_web,nombreFuncion);
 address = axis2_endpoint_ref_get_address(endpoint_ref, env);
 if (address)
 {
   AXIS2_LOG_DEBUG(env-log, AXIS2_LOG_SI, %s%s if 
 (address),pdesWebServ-nombre_web,nombreFuncion);
 }
   }
 
 When I run this, I got NULL in endpoint_ref variable, so I don’t know it was 
 something wrong with this code.
 It is the correct way to get the endpoint address or exists another way to 
 get that info.
 
 Thank in advance.
 
 
 José M. Medina V.
 Wesam Consulting
 jose_med...@wesamconsulting.com
 Mobile: +58(416)613-3302 +58(414)019-0580
 Ofc: +58(212)959-4155 Ext. 204
 BB pin: 31E562BF
 Caracas - Venezuela
 
 
 
 
 
 
 
 
 
 -- 
 Software Engineer, WSO2 Inc
 http://wso2.org
 supunk.blogspot.com
 
 


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








Endpoint Address

2009-10-21 Thread Jose M Medina V
Hi, I try to get the target endpoint address in a services in Axis2c,  
I put the following code in the invoke function in the skeleton library:


axis2_endpoint_ref_t *endpoint_ref = NULL;
const axis2_char_t *address = NULL;
.
.
.
endpoint_ref = axis2_msg_ctx_get_to(msg_ctx, env);
  if(endpoint_ref)
  {
AXIS2_LOG_DEBUG(env-log, AXIS2_LOG_SI, %s%s if 
(endpoint_ref),pdesWebServ-nombre_web,nombreFuncion);

address = axis2_endpoint_ref_get_address(endpoint_ref, env);
if (address)
{
  AXIS2_LOG_DEBUG(env-log, AXIS2_LOG_SI, %s%s if  
(address),pdesWebServ-nombre_web,nombreFuncion);

}
  }

When I run this, I got NULL in endpoint_ref variable, so I don’t know  
it was something wrong with this code.
It is the correct way to get the endpoint address or exists another  
way to get that info.


Thank in advance.


José M. Medina V.
Wesam Consulting
jose_med...@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

2009-10-13 Thread Jose M Medina V

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_med...@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_med...@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_med...@wesamconsulting.com
Mobile: +58(416)613-3302 +58(414)019-0580
Ofc: +58(212)959-4155 Ext. 204
BB pin: 31E562BF
Caracas - Venezuela








Axis2c Questions

2009-10-11 Thread Jose M Medina V
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_med...@wesamconsulting.com
Mobile: +58(416)613-3302 +58(414)019-0580
Ofc: +58(212)959-4155 Ext. 204
BB pin: 31E562BF
Caracas - Venezuela








Re: Problem with Ubuntu

2009-10-01 Thread Jose M Medina V

Hi Selvaratnam,
I already solve the problem. This consist in I didn=92t put the =20
definition of the function axis2_srvprb_agrApuesta in the library so I  
=20=


this cause a problem of integer pointer assignation in 64 bits =20
environment.

Thanks for your interest in the problem.
On Sep 30, 2009, at 10:46 PM, Selvaratnam Uthaiyashankar wrote:


Hi,

Can you run using simple axis server and see whether it crashes? When
you are debugging httpd with -X flag, it runs in a single process.
That might be the reason why it works.. If it crash it simple axis
server, it might be easy to debug.

Regards,
Shankar





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








Re: Problem with Ubuntu

2009-09-17 Thread Jose M Medina V
Selvaratnam thank for your response.I’m attaching all source code of the web service; the function axis2_srvprb_agrApuesta is in web_serv_prb.c library.As additional information the command that I use to build axis2c in Ubuntu was:./configure --prefix=/opt/axis2c --with-apache2=/usr/include/apache2 \--enable-libxml2=yes --with-apr=/usr/include/apr-1.0 --enable-openssl=yes \--enable-trace=yesAlso the command that I use in Centos 5-32 bit (ambient where the test run perfect) was:./configure --prefix=/opt/axis2c --with-apache2=/usr/include/httpd --with-apr=/usr/include/apr-1\--enable-libxml2=yes --enable-openssl=yes \--enable-trace=yesAgain thank in advance.On Sep 16, 2009, at 10:31 PM, Selvaratnam Uthaiyashankar wrote:Hi,Can you give "axis2_srvprb_agrApuesta" method as well? I think theproblem might be in the return value, because srvprb_invoke exitedwithout any problem.Regards,ShankarOn Wed, Sep 16, 2009 at 8:59 PM, Jose M Medina Vjose_med...@wesamconsulting.com wrote:I install Axis2c into Ubuntu Server 9.04 (Linux ubuntu-server2.6.28-15-server #49-Ubuntu SMP Tue Aug 18 20:09:37 UTC 2009 x86_64GNU/Linux) as a module for Apache 2. After that I write a web service fortest purpose and when I test the service I receive the following error inthe Apache log.“[Tue Sep 15 19:57:45 2009] [notice] child pid 3371 exit signal Segmentationfault (11)”I start debug the program and I determine that the error was on the returnof the funtion srvprb_invoke, see the following axis2.log trace.Tue Sep 15 19:57:44 2009] [debug] web_serv_prb.c(323) [pruebaSrv]axis2_srvprb_agrApuesta:: Fin de Funcion[Tue Sep 15 19:57:44 2009] [debug] lib_skeleton.c(118) [pruebaSrv]srvprb_invoke:: Fin de FuncionThe complete funtion srvprb_invoke is:axiom_node_t *AXIS2_CALLsrvprb_invoke( axis2_svc_skeleton_t * svc_skeleton, const axutil_env_t * env, axiom_node_t * node, axis2_msg_ctx_t * msg_ctx){ char *nombreFuncion="srvprb_invoke::"; axiom_node_t *node_srvprb_agrApuesta=NULL; AXIS2_LOG_DEBUG(env-log, AXIS2_LOG_SI, "[pruebaSrv] %s Inicio deFuncion",nombreFuncion); /* Dependiendo de la operacion que llegue se llama a la respectivafuncion que procesa el  * request  */ if (node) {   if (axiom_node_get_node_type(node, env) == AXIOM_ELEMENT)   { axiom_element_t *element = NULL; element =   (axiom_element_t *) axiom_node_get_data_element(node, env); if (element) {   axis2_char_t *op_name = axiom_element_get_localname(element, env);   if (op_name)   { if (axutil_strcmp(op_name, "inserta_apuesta") == 0) {  node_srvprb_agrApuesta = axis2_srvprb_agrApuesta(env,node);  if(node_srvprb_agrApuesta != NULL)  {   AXIS2_LOG_DEBUG(env-log, AXIS2_LOG_SI, "[pruebaSrv]%s Fin de Funcion",nombreFuncion);   return node_srvprb_agrApuesta;  }  else  {   AXIS2_LOG_ERROR(env-log, AXIS2_LOG_SI, "[pruebaSrv]%s Resultado en NULL",nombreFuncion);   return NULL;  } }   } }   } } AXIS2_LOG_ERROR(env-log, AXIS2_LOG_SI, "[pruebaSrv] %s Parametro OMinvalido en el request",nombreFuncion); AXIS2_ERROR_SET(env-error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE); return NULL;}Also I run the same test into a Centos 5 installation and the test wasperfect, so I think the problem is something about ubuntu.Could anyone help me with this problem? What can I revise?Thanks in advanceJosé M. Medina V.Wesam Consultingjose_med...@wesamconsulting.comMobile: +58(416)613-3302 +58(414)019-0580Ofc:  +58(212)959-4155 Ext. 204BB pin:31E562BFCaracas - Venezuela-- S.UthaiyashankarSoftware ArchitectWSO2 Inc.http://wso2.com/ - "The Open Source SOA Company"
José M. Medina V.Wesam Consultingjose_med...@wesamconsulting.comMobile: +58(416)613-3302 +58(414)019-0580Ofc:  +58(212)959-4155 Ext. 204BB pin:31E562BFCaracas - Venezuela

pruebaSrv.tar.gz
Description: GNU Zip compressed data




Problem with Ubuntu

2009-09-16 Thread Jose M Medina V
I install Axis2c into Ubuntu Server 9.04 (Linux ubuntu-server  
2.6.28-15-server #49-Ubuntu SMP Tue Aug 18 20:09:37 UTC 2009 x86_64  
GNU/Linux) as a module for Apache 2. After that I write a web service  
for test purpose and when I test the service I receive the following  
error in the Apache log.


“[Tue Sep 15 19:57:45 2009] [notice] child pid 3371 exit signal  
Segmentation fault (11)”


I start debug the program and I determine that the error was on the  
return of the funtion srvprb_invoke, see the following axis2.log trace.


Tue Sep 15 19:57:44 2009] [debug] web_serv_prb.c(323) [pruebaSrv]  
axis2_srvprb_agrApuesta:: Fin de Funcion
[Tue Sep 15 19:57:44 2009] [debug] lib_skeleton.c(118) [pruebaSrv]  
srvprb_invoke:: Fin de Funcion


The complete funtion srvprb_invoke is:

axiom_node_t *AXIS2_CALL
srvprb_invoke(
axis2_svc_skeleton_t * svc_skeleton,
const axutil_env_t * env,
axiom_node_t * node,
axis2_msg_ctx_t * msg_ctx)
{
char  *nombreFuncion=srvprb_invoke::;
axiom_node_t *node_srvprb_agrApuesta=NULL;

AXIS2_LOG_DEBUG(env-log, AXIS2_LOG_SI, [pruebaSrv] %s Inicio de  
Funcion,nombreFuncion);
/* Dependiendo de la operacion que llegue se llama a la  
respectiva funcion que procesa el

 * request
 */
if (node)
{
if (axiom_node_get_node_type(node, env) == AXIOM_ELEMENT)
{
axiom_element_t *element = NULL;
element =
(axiom_element_t *) axiom_node_get_data_element(node,  
env);

if (element)
{
axis2_char_t *op_name =
axiom_element_get_localname(element, env);
if (op_name)
{
if (axutil_strcmp(op_name, inserta_apuesta) == 0)
{
  node_srvprb_agrApuesta = axis2_srvprb_agrApuesta 
(env, node);

  if(node_srvprb_agrApuesta != NULL)
  {
AXIS2_LOG_DEBUG(env-log, AXIS2_LOG_SI,  
[pruebaSrv] %s Fin de Funcion,nombreFuncion);

return node_srvprb_agrApuesta;
  }
  else
  {
AXIS2_LOG_ERROR(env-log, AXIS2_LOG_SI,  
[pruebaSrv] %s Resultado en NULL,nombreFuncion);

return NULL;
  }
}
}
}
}
}

AXIS2_LOG_ERROR(env-log, AXIS2_LOG_SI, [pruebaSrv] %s Parametro  
OM invalido en el request,nombreFuncion);

AXIS2_ERROR_SET(env-error,
AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST,
AXIS2_FAILURE);
return NULL;
}

Also I run the same test into a Centos 5 installation and the test was  
perfect, so I think the problem is something about ubuntu.


Could anyone help me with this problem? What can I revise?

Thanks in advance


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