Getting request IP address

2009-12-10 Thread Murphey McCloy
Hello.

I am using axis2c 1.6 and I am trying to get the ip address (or hostname) of 
the host that generate the web service requests.  I was attempting to use 
axis2_msg_ctx_get_from and then axis2_endpoint_ref_get_address to do this.  
Unfortunately this is giving me the address of the server, not the client.

Am I mis-using this API call? Is there a better/different way to get this 
information?

This is how my code looks:

fromRef = axis2_msg_ctx_get_from(pMsgCtx, pEnv);
if (fromRef) {
from = (axis2_char_t*)axis2_endpoint_ref_get_address(fromRef, pEnv);
}

Any help is greatly appreciated.

Thanks,

Murphey


Re: Axis2/C and mod_gzip

2009-10-02 Thread Murphey McCloy
Assuming you are using httpd, mod_deflate should work fine.  The  
browser should decompress it for you.


All I had to do to get compressed responses was add the:
Set outputfilter deflate

Config to httpd.conf

And I was good to go.  Compressing requests was another matter  
entirely, but the code fixes for that have been accepted, I believe,  
and should also be relatively easy, if needed.




On Oct 2, 2009, at 7:11 AM, "Sam Carleton"  
 wrote:


I am wondering, my Axis2/C server returns some large data sets to  
the .Net client. To make development easier, the WSDL element names  
are a bit long and verbose, but that adds useless size to an already  
large dataset.


Is it possible to use something like mod_gzip to compress the  
results of the result set?  If so is there something special I would  
need to do on the client side, which is a web browser, or will the  
web browser decompress it before giving it to the Silverlight  
application?  Anyone know?


Sam


RE: Problem with Ubuntu

2009-09-21 Thread Murphey McCloy
Hey there.  Have you tried running your application via valgrind to see if 
there is memory corruption or access violations?  I realize that it is working 
on CentOS but not on Ubuntu.  The fact that it works on CentOS without crashing 
doesn't mean there aren't memory issues, it very well may be that you have some 
uninitialized value being referenced that is causing the seg fault.  CentOS 
might be setting the memory to 0 by default, while Ubuntu might not.

 

 

From: Jose M Medina V [mailto:jose_med...@wesamconsulting.com] 
Sent: Monday, September 21, 2009 10:03 AM
To: Apache AXIS C User List
Subject: Fwd: Problem with Ubuntu

 

Any update with this issue?

 

Thanks,

 

Begin forwarded message:





From: Jose M Medina V 

Date: September 17, 2009 8:26:24 AM GMT-04:30

To: "Apache AXIS C User List" 

Subject: Re: Problem with Ubuntu

 

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=yes

 

Also 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=yes

 

Again 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 the
problem might be in the return value, because srvprb_invoke exited
without any problem.

Regards,
Shankar


On Wed, Sep 16, 2009 at 8:59 PM, Jose M Medina V
 wrote:



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);


Re: deloy Rampart/C

2009-09-13 Thread Murphey McCloy

It looks like the important part of the logs is:

..//modules/rahas/mod_rahas.dll
[Mon Sep 14 12:56:13 2009] [error] ..\..\util\src\class_loader.c(167)  
Loading shared library ..//modules/rahas/mod_rahas.dll  Failed.  
DLERROR IS DLL Load

Error 126: module not found.

Can you verify that mod_ragas.dll is in the correct directory?

-Murphey Mccloy


On Sep 13, 2009, at 10:27 PM, 尾崎実   
wrote:



ath is :
..//modules/rahas/mod_rahas.dll
[Mon Sep 14 12:56:13 2009] [error] ..\..\util\src\class_loader.c 
(167) Loading shared library ..//modules/rahas/mod_rahas.dll   
Failed. DLERROR IS DLL Load

Error 126: module not found.


RE: Questions about using mod_deflate

2009-08-21 Thread Murphey McCloy
r premature chunk end.
+ *
+ */
+AP_DECLARE(long) apache2_ap_get_client_block (request_rec *r, char *buffer,
+apr_size_t bufsiz)
+{
+apr_status_t rv;
+apr_bucket_brigade *bb;
+int loop = 1;
+int origBufSize = bufsiz;
+
+if (r->remaining < 0 || (!r->read_chunked && r->remaining == 0)) {
+return 0;
+}
+
+bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
+if (bb == NULL) {
+r->connection->keepalive = AP_CONN_CLOSE;
+return -1;
+}
+
+/* we need to loop until the input filters (if any) give us data */
+while (loop) {
+rv = ap_get_brigade(r->input_filters, bb, AP_MODE_READBYTES,
+APR_BLOCK_READ, bufsiz);
+
+/* We lose the failure code here.  This is why ap_get_client_block 
should
+ * not be used.
+ */
+if (rv != APR_SUCCESS) {
+/* if we actually fail here, we want to just return and
+ * stop trying to read data from the client.
+ */
+r->connection->keepalive = AP_CONN_CLOSE;
+apr_brigade_destroy(bb);
+return -1;
+}
+
+/* If this fails, it means that a filter is written incorrectly and 
that
+ * it needs to learn how to properly handle APR_BLOCK_READ requests by
+ * returning data when requested.
+ */
+AP_DEBUG_ASSERT(!APR_BRIGADE_EMPTY(bb));
+
+/* Check to see if EOS in the brigade.
+ *
+ * If so, we have to leave a nugget for the *next* ap_get_client_block
+ * call to return 0.
+ */
+if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
+if (r->read_chunked) {
+r->remaining = -1;
+} else {
+r->remaining = 0;
+}
+}
+
+rv = apr_brigade_flatten(bb, buffer, &bufsiz);
+if (rv != APR_SUCCESS) {
+apr_brigade_destroy(bb);
+return -1;
+}
+
+/* XXX yank me? */
+r->read_length += bufsiz;
+
+/* it is possible that the entire bucket brigade is exhausted, but no 
data
+ * has been produced by the input filter (mod_deflate, for example)
+ * in this scenario, we really need to keep looping
+ */
+if (bufsiz != 0 || r->remaining <= 0) {
+loop = 0;
+apr_brigade_destroy(bb);
+} else {
+if (bufsiz == 0) {
+bufsiz = origBufSize;
+}
+}
+
+}
+
+return bufsiz;
+}


-Original Message-
From: Murphey McCloy [mailto:mmcc...@webroot.com]
Sent: Fri 8/21/2009 10:33 AM
To: axis-c-user@ws.apache.org
Subject: Questions about using mod_deflate
 
Hello,

 

I am hoping someone might be able to help me out with a problem I am having.  I 
am using Axis2/C 1.6 with http 2.2.3 on CentOS 5.3.  I am attempting to use 
mod_deflate to decompress/compress my requests and responses.  It is handling 
compressing my responses just fine, but the requests are failing.  It appears 
to me that the decompression of the requests prematurely ends after the gzip 
header is validated.  Has anyone actually set axis2c and apache up to 
decompress incoming requests that could give me some guidance?

 

Thanks,

 

Murphey

 




<>

Questions about using mod_deflate

2009-08-21 Thread Murphey McCloy
Hello,

 

I am hoping someone might be able to help me out with a problem I am
having.  I am using Axis2/C 1.6 with http 2.2.3 on CentOS 5.3.  I am
attempting to use mod_deflate to decompress/compress my requests and
responses.  It is handling compressing my responses just fine, but the
requests are failing.  It appears to me that the decompression of the
requests prematurely ends after the gzip header is validated.  Has
anyone actually set axis2c and apache up to decompress incoming requests
that could give me some guidance?

 

Thanks,

 

Murphey