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  
scarle...@miltonstreet.com 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: 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, 尾崎実 ozaki.min...@jp.panasonic.com  
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
) 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

 




winmail.dat