Re: Loading mod_axis2.so module into Apache
Hi Alex, Nice description of the problem. Couldn't think of a better way to do it. This is what you need to do. You have the axis2/c distribution in /home/alex/axis2c-dist right? You should have the lib, modules and services directories under that directory. Also you need to have the axis2.xml file in that directory. Please add the lib directory to your LD_LIBRARY_PATH or do an equivalent of this (ldconfig). Please remove all your LoadFile directives from your Apache configuration. Make sure your Axis2/C configuration in httpd.conf is correct. The required entries are: LoadModule axis2_module MOD_AXIS2_SO_PATH Axis2RepoPath AXIS2C_INSTALL_DIR Axis2LogFile PATH_TO_LOG_FILE Axis2LogLevel LOG_LEVEL Location /axis2 SetHandler axis2_module /Location Also make sure that Apache has read access to the /home/alex/axis2c-dist directory. Start Apache and everything should work fine. Supun.. On Thu, Jul 17, 2008 at 8:09 AM, Rajika Kumarasiri [EMAIL PROTECTED] wrote: On Thu, Jul 17, 2008 at 2:25 AM, Alex Bolgarov [EMAIL PROTECTED] wrote: Well, our server machine is not supposed to have development tools at all. So I can't compile the Axis2/C on it. Then, how it is supposed to work if I use the Axis2C binary distribution? 1. Unzip the binary to a location, 2. Copy the mod_axis2.so to the Apache module directory. 3. Set the LoadModule and the Axis2RepoPath in httpd.conf Restart the Apache server. -Rajika And it should have nothing to do with environment variables settings (other then possible LD_LIBRARY_PATH) because Apache can't load the module at all, because the ldopen() can't find the shared libraries that this module refers to, and I can't load those shared libraries manually using LoadFile directive because of the circular reference problem as I described. So at the moment of failure no Axis2/C code has executed yet that could have a chance to fix something (like, to find and load libraries from the location pointed by the AXIS2C_HOME or by any parameter in the Apache config file. Or am I wrong here? What I don't understand is why (and how) it works if I run the Apache server on the machine where I compile the Axis2C. Does the linker, when it builds the libmod_axis2.so, embeds into this library the pathes to the other Axis2/C libraries so, when I copy the mod_axis2.so into the Apache modules directory on the same machine, it finds them using those embedded pathes? Thank you, alex. On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake [EMAIL PROTECTED] wrote: Hi Alex, I think you have to set AXIS2C_HOME environment variable on your server machine. And why are you copying libraries from one machine to another why don't you compile Axis2C on you server machine.AFAIK if your first machine and the second machine are different,different in the sense first machine is dual core and the server machine is core 2 duo or something else you have to recompile Axis2C on your server machine and create libmod_axis2.so otherwise previously compiled library won't work on the server machine. Regards Lahiru On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov [EMAIL PROTECTED] wrote: Hi, How do you load a mod_axis2.so module into the Apache when you copy the Axis2/C libraries to some directory - for example, when you are using the binary Axis2/C distribution, or just build Axis2/C from source on one machine (and installed itto some directory) and then copy Axis2/C module and libraries to some directory on some othar machine with Apache server? Well, here is a longer description of the problem: Say I'm using a source distribution. I download the .tar.gz source tarball, untar, configure it with some install directory (--prefix) and build/install it, now I have this install directory with the build by me Axis2/C. I have Apache server running in this machine, so I copy mod_axis2.so into the Apache installation, I update the Apache config to load the module, I define the Axis2/C repository, I develop a web service and run tests against it. All is fine up to this point. Now I want to use the Axis2/C with the Apache server that is running on another machine. I copy everything from the install directory from the build machine into some directory on this other machine with Apache (let's call this directory /home/alex/axis2c-dist). I rename libmod_axis2.so.0.4.0 to mod_axis2.so and copy it into the Apache's modules directory. Now I change the Apache config file so that it contains the line LoadModule axis2_module modules/mod_axis2.so I try to start Apache: $ apachectl start and see following error: Cannot load /home/alex/httpd/modules/mod_axis2.so into server: libaxis2_engine.so.0: cannot open shared object file: No such file or directory Now, I happen to know about the LoadFile Apache directive :) I add the LoadFile directive for the libaxis2_engine.so
Re: Loading mod_axis2.so module into Apache
1. Compile Axis2/C on a machine with identical settings to that of the server machine. 2. Install that on server machine, following the guidelines given in binary install That should work. Samisa... Alex Bolgarov wrote: Well, our server machine is not supposed to have development tools at all. So I can't compile the Axis2/C on it. Then, how it is supposed to work if I use the Axis2C binary distribution? And it should have nothing to do with environment variables settings (other then possible LD_LIBRARY_PATH) because Apache can't load the module at all, because the ldopen() can't find the shared libraries that this module refers to, and I can't load those shared libraries manually using LoadFile directive because of the circular reference problem as I described. So at the moment of failure no Axis2/C code has executed yet that could have a chance to fix something (like, to find and load libraries from the location pointed by the AXIS2C_HOME or by any parameter in the Apache config file. Or am I wrong here? What I don't understand is why (and how) it works if I run the Apache server on the machine where I compile the Axis2C. Does the linker, when it builds the libmod_axis2.so, embeds into this library the pathes to the other Axis2/C libraries so, when I copy the mod_axis2.so into the Apache modules directory on the same machine, it finds them using those embedded pathes? Thank you, alex. On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake [EMAIL PROTECTED] wrote: Hi Alex, I think you have to set AXIS2C_HOME environment variable on your server machine. And why are you copying libraries from one machine to another why don't you compile Axis2C on you server machine.AFAIK if your first machine and the second machine are different,different in the sense first machine is dual core and the server machine is core 2 duo or something else you have to recompile Axis2C on your server machine and create libmod_axis2.so otherwise previously compiled library won't work on the server machine. Regards Lahiru On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov [EMAIL PROTECTED] wrote: Hi, How do you load a mod_axis2.so module into the Apache when you copy the Axis2/C libraries to some directory - for example, when you are using the binary Axis2/C distribution, or just build Axis2/C from source on one machine (and installed itto some directory) and then copy Axis2/C module and libraries to some directory on some othar machine with Apache server? Well, here is a longer description of the problem: Say I'm using a source distribution. I download the .tar.gz source tarball, untar, configure it with some install directory (--prefix) and build/install it, now I have this install directory with the build by me Axis2/C. I have Apache server running in this machine, so I copy mod_axis2.so into the Apache installation, I update the Apache config to load the module, I define the Axis2/C repository, I develop a web service and run tests against it. All is fine up to this point. Now I want to use the Axis2/C with the Apache server that is running on another machine. I copy everything from the install directory from the build machine into some directory on this other machine with Apache (let's call this directory /home/alex/axis2c-dist). I rename libmod_axis2.so.0.4.0 to mod_axis2.so and copy it into the Apache's modules directory. Now I change the Apache config file so that it contains the line LoadModule axis2_module modules/mod_axis2.so I try to start Apache: $ apachectl start and see following error: Cannot load /home/alex/httpd/modules/mod_axis2.so into server: libaxis2_engine.so.0: cannot open shared object file: No such file or directory Now, I happen to know about the LoadFile Apache directive :) I add the LoadFile directive for the libaxis2_engine.so so that Apache loads it from the /home/alex/axis2c-dist directory, now the Apache config looks like this: LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 LoadModule axis2_module modules/mod_axis2.so I try to start Apache again: $ apachectl start and now see: Cannot load /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 into server: libneethi.so.0: cannot open shared object file: No such file or directory OK, I add LoadFile directives for the libneethi.so, and so on, when I finally arrive to the following config: LoadFile /home/alex/axis2c-dist/lib/libaxutil.so.0.4.0 LoadFile /home/alex/axis2c-dist/lib/libguththila.so.0.4.0 LoadFile /home/alex/axis2c-dist/lib/libaxis2_parser.so.0.4.0 LoadFile /home/alex/axis2c-dist/lib/libaxis2_axiom.so.0.4.0 LoadFile /home/alex/axis2c-dist/lib/libneethi.so.0.4.0 LoadFile /home/alex/axis2c-dist/lib/libaxis2_http_common.so.0.4.0 LoadFile /home/alex/axis2c-dist/lib/libaxis2_engine.so.0.4.0 LoadModule axis2_module modules/mod_axis2.so But now, after I try to start Apache, I see new error: Cannot load
Re: Loading mod_axis2.so module into Apache
Supun, Arn't these steps on the manual? Samisa... Supun Kamburugamuva wrote: Hi Alex, Nice description of the problem. Couldn't think of a better way to do it. This is what you need to do. You have the axis2/c distribution in /home/alex/axis2c-dist right? You should have the lib, modules and services directories under that directory. Also you need to have the axis2.xml file in that directory. Please add the lib directory to your LD_LIBRARY_PATH or do an equivalent of this (ldconfig). Please remove all your LoadFile directives from your Apache configuration. Make sure your Axis2/C configuration in httpd.conf is correct. The required entries are: LoadModule axis2_module MOD_AXIS2_SO_PATH Axis2RepoPath AXIS2C_INSTALL_DIR Axis2LogFile PATH_TO_LOG_FILE Axis2LogLevel LOG_LEVEL Location /axis2 SetHandler axis2_module /Location Also make sure that Apache has read access to the /home/alex/axis2c-dist directory. Start Apache and everything should work fine. Supun.. On Thu, Jul 17, 2008 at 8:09 AM, Rajika Kumarasiri [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: On Thu, Jul 17, 2008 at 2:25 AM, Alex Bolgarov [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Well, our server machine is not supposed to have development tools at all. So I can't compile the Axis2/C on it. Then, how it is supposed to work if I use the Axis2C binary distribution? 1. Unzip the binary to a location, 2. Copy the mod_axis2.so to the Apache module directory. 3. Set the LoadModule and the Axis2RepoPath in httpd.conf Restart the Apache server. -Rajika And it should have nothing to do with environment variables settings (other then possible LD_LIBRARY_PATH) because Apache can't load the module at all, because the ldopen() can't find the shared libraries that this module refers to, and I can't load those shared libraries manually using LoadFile directive because of the circular reference problem as I described. So at the moment of failure no Axis2/C code has executed yet that could have a chance to fix something (like, to find and load libraries from the location pointed by the AXIS2C_HOME or by any parameter in the Apache config file. Or am I wrong here? What I don't understand is why (and how) it works if I run the Apache server on the machine where I compile the Axis2C. Does the linker, when it builds the libmod_axis2.so, embeds into this library the pathes to the other Axis2/C libraries so, when I copy the mod_axis2.so into the Apache modules directory on the same machine, it finds them using those embedded pathes? Thank you, alex. On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi Alex, I think you have to set AXIS2C_HOME environment variable on your server machine. And why are you copying libraries from one machine to another why don't you compile Axis2C on you server machine.AFAIK if your first machine and the second machine are different,different in the sense first machine is dual core and the server machine is core 2 duo or something else you have to recompile Axis2C on your server machine and create libmod_axis2.so otherwise previously compiled library won't work on the server machine. Regards Lahiru On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, How do you load a mod_axis2.so module into the Apache when you copy the Axis2/C libraries to some directory - for example, when you are using the binary Axis2/C distribution, or just build Axis2/C from source on one machine (and installed itto some directory) and then copy Axis2/C module and libraries to some directory on some othar machine with Apache server? Well, here is a longer description of the problem: Say I'm using a source distribution. I download the .tar.gz source tarball, untar, configure it with some install directory (--prefix) and build/install it, now I have this install directory with the build by me Axis2/C. I have Apache server running in this machine, so I copy mod_axis2.so into the Apache installation, I update the Apache config to load the module, I define the Axis2/C repository, I develop a web service and run tests against it. All is fine up to this
Re: Redirecting Web Services
Axis2/C client cannot handle redirection. Samisa... Brian S Bates (bribates) wrote: Hi, I am working on a project using REST with Axis2C, and have encountered a problem. I would like to take the URI of the REST request and redirect it somewhere else. For example, if the user enters: http://server:port/loc1/service?param1=value1, I want this to be directed to http://server:port/newlocation/service?param1=value1 Currently, I am using the mod_axis2.dll module with Apache 2.2.9. In my Apache httpd.conf file, I have added the following lines (at the end): # Redirect requests to the axis2 directory RewriteEngine on RewriteRule ^/dp(.*) /axis2/restprinter$1 [R=permanent] # Axis2 C Configuration LoadModule axis2_module modules/mod_axis2.dll Axis2RepoPath C:/axis2c Axis2LogFile logs/axis2.log Axis2LogLevel error Axis2ServiceURLPrefix /axis2 Axis2MaxLogFileSize 100 Location / SetHandler axis2_module /Location ...Basically, rerouting anything with a URI that begins with /dp to /axis2/restprinter (the first two lines). Using this configuration in a web browser works. That is to say, the redirection happens and a valid XML response is returned from my service. However, using an Axis2C client fails. Looking over the log file for the client, it seems that the redirection is not happening? Here is an excerpt: [Tue Jul 15 16:05:10 2008] [info] Starting addressing out handler [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\modules\mod_addr\addr_out_handler.c(133) No action present. Stop processing addressing [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\transport\http\sender\http_transport_sender.c(246) ctx_epr:http://localhost:80/dp/go [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\transport\http\sender\http_transport_sender.c(768) using axis2 native http sender. [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\transport\http\sender\http_transport_sender.c(785) OP name axutil_qname_get_localpart = http://www.w3.org/2004/08/wsdl/out-in [Tue Jul 15 16:05:10 2008] [error] ..\..\axiom\src\parser\libxml2\libxml2_reader_wrapper.c(951) Space required after the Public Identifier -- SEVERITY_ERROR [Tue Jul 15 16:05:10 2008] [error] ..\..\axiom\src\parser\libxml2\libxml2_reader_wrapper.c(951) SystemLiteral or ' expected -- SEVERITY_ERROR [Tue Jul 15 16:05:10 2008] [error] ..\..\axiom\src\parser\libxml2\libxml2_reader_wrapper.c(951) SYSTEM or PUBLIC, the URI is missing -- SEVERITY_ERROR [Tue Jul 15 16:05:10 2008] [error] ..\..\axiom\src\parser\libxml2\libxml2_reader_wrapper.c(462) error occured in reading xml stream [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210) Invoke the handler request_uri_based_dispatcher within the phase Transport [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210) Invoke the handler AddressingInHandler within the phase Transport [Tue Jul 15 16:05:10 2008] [info] Starting addressing in handler [Tue Jul 15 16:05:10 2008] [info] ..\..\src\modules\mod_addr\addr_in_handler.c [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210) Invoke the handler addressing_based_dispatcher within the phase Transport [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210) Invoke the handler rest_dispatcher within the phase Dispatch [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\rest_disp.c(113) Checking for service using target endpoint address : http://localhost:80/dp/go [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210) Invoke the handler soap_message_body_based_dispatcher within the phase Dispatch [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210) Invoke the handler soap_action_based_dispatcher within the phase Dispatch [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210) Invoke the handler dispatch_post_conditions_evaluator within the phase PostDispatch [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210) Invoke the handler context_handler within the phase PostDispatch [Tue Jul 15 16:05:10 2008] [error] restprinter.c(92) Stub invoke FAILED: Error code: 2 :: NULL parameter was passed when a non NULL parameter was expected To make a long story short, is it possible for the Axis2C client to handle such a redirect? Also, if it makes a difference, I am testing both the client and server on the same machine. Thanks, Brian No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.5.0/1555 - Release Date: 7/16/2008 6:43 AM -- Samisa Abeysinghe Director, Engineering; WSO2 Inc. http://www.wso2.com/ - The Open Source SOA Company - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loading mod_axis2.so module into Apache
Hi Samisa, I think some of the instructions like setting the LD_LIBRARY_PATH is missing. Also I think we should add a faq saying what are the things that can go wrong when we deploy in Apache and possible solutions to that. Supun.. On Thu, Jul 17, 2008 at 11:57 AM, Samisa Abeysinghe [EMAIL PROTECTED] wrote: Supun, Arn't these steps on the manual? Samisa... Supun Kamburugamuva wrote: Hi Alex, Nice description of the problem. Couldn't think of a better way to do it. This is what you need to do. You have the axis2/c distribution in /home/alex/axis2c-dist right? You should have the lib, modules and services directories under that directory. Also you need to have the axis2.xml file in that directory. Please add the lib directory to your LD_LIBRARY_PATH or do an equivalent of this (ldconfig). Please remove all your LoadFile directives from your Apache configuration. Make sure your Axis2/C configuration in httpd.conf is correct. The required entries are: LoadModule axis2_module MOD_AXIS2_SO_PATH Axis2RepoPath AXIS2C_INSTALL_DIR Axis2LogFile PATH_TO_LOG_FILE Axis2LogLevel LOG_LEVEL Location /axis2 SetHandler axis2_module /Location Also make sure that Apache has read access to the /home/alex/axis2c-dist directory. Start Apache and everything should work fine. Supun.. On Thu, Jul 17, 2008 at 8:09 AM, Rajika Kumarasiri [EMAIL PROTECTED]mailto: [EMAIL PROTECTED] wrote: On Thu, Jul 17, 2008 at 2:25 AM, Alex Bolgarov [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Well, our server machine is not supposed to have development tools at all. So I can't compile the Axis2/C on it. Then, how it is supposed to work if I use the Axis2C binary distribution? 1. Unzip the binary to a location, 2. Copy the mod_axis2.so to the Apache module directory. 3. Set the LoadModule and the Axis2RepoPath in httpd.conf Restart the Apache server. -Rajika And it should have nothing to do with environment variables settings (other then possible LD_LIBRARY_PATH) because Apache can't load the module at all, because the ldopen() can't find the shared libraries that this module refers to, and I can't load those shared libraries manually using LoadFile directive because of the circular reference problem as I described. So at the moment of failure no Axis2/C code has executed yet that could have a chance to fix something (like, to find and load libraries from the location pointed by the AXIS2C_HOME or by any parameter in the Apache config file. Or am I wrong here? What I don't understand is why (and how) it works if I run the Apache server on the machine where I compile the Axis2C. Does the linker, when it builds the libmod_axis2.so, embeds into this library the pathes to the other Axis2/C libraries so, when I copy the mod_axis2.so into the Apache modules directory on the same machine, it finds them using those embedded pathes? Thank you, alex. On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi Alex, I think you have to set AXIS2C_HOME environment variable on your server machine. And why are you copying libraries from one machine to another why don't you compile Axis2C on you server machine.AFAIK if your first machine and the second machine are different,different in the sense first machine is dual core and the server machine is core 2 duo or something else you have to recompile Axis2C on your server machine and create libmod_axis2.so otherwise previously compiled library won't work on the server machine. Regards Lahiru On Thu, Jul 17, 2008 at 12:03 AM, Alex Bolgarov [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, How do you load a mod_axis2.so module into the Apache when you copy the Axis2/C libraries to some directory - for example, when you are using the binary Axis2/C distribution, or just build Axis2/C from source on one machine (and installed itto some directory) and then copy Axis2/C module and libraries to some directory on some othar machine with Apache server? Well, here is a longer description of the problem: Say I'm using a source distribution. I download the .tar.gz source tarball, untar, configure it with some install directory (--prefix) and build/install it, now I have this install directory with the build by me Axis2/C.
Re: Loading mod_axis2.so module into Apache
Around here we put the LD_LIBRARY_PATH in the envvars file in the apache httpd bin directory. That way it is loaded by the apachectl script - and is more or less immune to the environment getting messed with (usually by someone messing with shell configuration files). This is rather well documented in the apache httpd documentation as well. It works quite nicely. Please add the lib directory to your LD_LIBRARY_PATH or do an equivalent of this (ldconfig). Opinion: Thank you to all of you who contribute to this project, it is simply wonderfull. I am glad to finally break the chain of java servlet engines using so much Sorry, I'll stop there. [Axis2C] is an amazing product and I hope that it carries on for many years. -John. First post to list. On Thursday 17 July 2008 00:58, Supun Kamburugamuva wrote: Hi Samisa, I think some of the instructions like setting the LD_LIBRARY_PATH is missing. Also I think we should add a faq saying what are the things that can go wrong when we deploy in Apache and possible solutions to that. Supun.. On Thu, Jul 17, 2008 at 11:57 AM, Samisa Abeysinghe [EMAIL PROTECTED] wrote: Supun, Arn't these steps on the manual? Samisa... Supun Kamburugamuva wrote: Hi Alex, Nice description of the problem. Couldn't think of a better way to do it. This is what you need to do. You have the axis2/c distribution in /home/alex/axis2c-dist right? You should have the lib, modules and services directories under that directory. Also you need to have the axis2.xml file in that directory. Please add the lib directory to your LD_LIBRARY_PATH or do an equivalent of this (ldconfig). Please remove all your LoadFile directives from your Apache configuration. Make sure your Axis2/C configuration in httpd.conf is correct. The required entries are: LoadModule axis2_module MOD_AXIS2_SO_PATH Axis2RepoPath AXIS2C_INSTALL_DIR Axis2LogFile PATH_TO_LOG_FILE Axis2LogLevel LOG_LEVEL Location /axis2 SetHandler axis2_module /Location Also make sure that Apache has read access to the /home/alex/axis2c-dist directory. Start Apache and everything should work fine. Supun.. On Thu, Jul 17, 2008 at 8:09 AM, Rajika Kumarasiri [EMAIL PROTECTED]mailto: [EMAIL PROTECTED] wrote: On Thu, Jul 17, 2008 at 2:25 AM, Alex Bolgarov [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Well, our server machine is not supposed to have development tools at all. So I can't compile the Axis2/C on it. Then, how it is supposed to work if I use the Axis2C binary distribution? 1. Unzip the binary to a location, 2. Copy the mod_axis2.so to the Apache module directory. 3. Set the LoadModule and the Axis2RepoPath in httpd.conf Restart the Apache server. -Rajika And it should have nothing to do with environment variables settings (other then possible LD_LIBRARY_PATH) because Apache can't load the module at all, because the ldopen() can't find the shared libraries that this module refers to, and I can't load those shared libraries manually using LoadFile directive because of the circular reference problem as I described. So at the moment of failure no Axis2/C code has executed yet that could have a chance to fix something (like, to find and load libraries from the location pointed by the AXIS2C_HOME or by any parameter in the Apache config file. Or am I wrong here? What I don't understand is why (and how) it works if I run the Apache server on the machine where I compile the Axis2C. Does the linker, when it builds the libmod_axis2.so, embeds into this library the pathes to the other Axis2/C libraries so, when I copy the mod_axis2.so into the Apache modules directory on the same machine, it finds them using those embedded pathes? Thank you, alex. On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi Alex, I think you have to set AXIS2C_HOME environment variable on your server machine. And why are you copying libraries from one machine to another why don't you compile Axis2C on you server machine.AFAIK if your first machine and the second machine are different,different in the sense first machine is dual core and the server machine is core 2 duo or something else you have to recompile Axis2C on your server machine and create libmod_axis2.so otherwise previously compiled library won't work on the server machine. Regards Lahiru
Re: Loading mod_axis2.so module into Apache
Hi, Thank you to all who replied. We managed to make it work either by setting LD_LIBRARY_PATH value to the lib directory in the axis repository before starting Apache or by adding path to the lib directory of the repository into the /etc/ld.so.conf file and running ldconfig. Using envvars file also probably would work. Thank you, alex. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot retrieve http headers in 1.4
Thanks Supun, I appreciate it. I will give it a go. From: Supun Kamburugamuva [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 16, 2008 6:14 AM To: Apache AXIS C User List Subject: Re: Cannot retrieve http headers in 1.4 Hi Hatim, First sorry for the late reply. The way that you try to acquire the headers is not supported now. Instead there is a direct method in message context that give the list of headers. Your code up to getting the message context is correct. Then you need to call the method list = axis2_msg_ctx_get_http_output_headers(msg_ctx, env); This will give the list of http headers. (axutil_array_list_t containing pointers to axis2_http_header_t structures) Regards, Supun.. On Fri, Jul 11, 2008 at 1:38 AM, Hatim Daginawala [EMAIL PROTECTED] wrote: Hi All, I am using following calls to retrieve HTTP headers from the response and axis2_msg_ctx_get_property returns NULL This works in AXIS2/C 1.3 but not in AXIS2/C 1.4, has anything changed? Any help will be appreciated. Thank you. op_client = axis2_svc_client_get_op_client(svc_client, env); msg_ctx = (axis2_msg_ctx_t *) axis2_op_client_get_msg_ctx (op_client, env, AXIS2_WSDL_MESSAGE_LABEL_OUT); client_property = (axutil_property_t *)axis2_msg_ctx_get_property( msg_ctx, env, AXIS2_HTTP_CLIENT); client = (axis2_http_client_t *)axutil_property_get_value ( client_property, env); response = axis2_http_client_get_response (client, env); list = axis2_http_simple_response_get_headers (response, env); --- Confidentiality Notice: This electronic mail transmission is confidential, may be privileged and should be read or retained only by the intended recipient. If you have received this transmission in error, please immediately notify the sender and delete it from your system. --- Confidentiality Notice: This electronic mail transmission is confidential, may be privileged and should be read or retained only by the intended recipient. If you have received this transmission in error, please immediately notify the sender and delete it from your system.
RE : RE : RE : RE : WSDL2C deserialisation problem
Hi Dimuthu, I did try adding those lines to the deserialize function but had the same result. As part of the debugging process I downloaded the nightly snapshot dated 2008/07/07. It is possible there has been a fix since then. I'm not convinced this is a real bug, but I still can't explain what mistake I made to get this behaviour. If no one else is having this problem then it must be me :) Anyway it works with this patch. The WSDL on the server stays the same and my local WSDL used to generate the stubs can have this modification. Thanks for your suggestions. Carl -Message d'origine- De : Dimuthu Gamage [mailto:[EMAIL PROTECTED] Envoyé : jeudi, juillet 17, 2008 10:46 À : Apache AXIS C User List Objet : Re: RE : RE : RE : WSDL2C deserialisation problem Hi Carl, Again I tried without any elements in the parent type, i.e. only with an attribute as in your case. But it was generating correct code and give the correct result at running. May be some modification in the latest svn may have correct the problem. (i believe some correction done after axis2/java 1.4 release). So from your note I saw it works when current_node = first_node; is_early_node_valid = AXIS2_FALSE; is at the start. I think you can just add these lines in the deserialize funciton without changing the wsdl. (you may able to debug the logic removing the code that handle your fake element from the deserialize logic. Thanks Dimuthu On Wed, Jul 16, 2008 at 8:43 PM, Lefrancois, Carl [EMAIL PROTECTED] wrote: Hi Dimuthu, More information on this interesting problem... I decided to start by modifying the definition of my schema to try and get around the current_node initialisation problem. I changed the definition of the base type to this: xs:complexType name=ActivityType xs:sequence xs:element name=deser_test type=xs:int minOccurs=0/ /xs:sequence xs:attribute ref=addDataTypes:ObjectIdentifier use=optional/ /xs:complexType I ignore the deser_test element and my source document never contains it, but the new generated code for deserialisation contains this: /* * building deser_test element */ current_node = first_node; is_early_node_valid = AXIS2_FALSE; And now my ActivityNumber element is correctly deserialised. Is there anything more I can do to help debug this behaviour? -Carl -Message d'origine- De : Lefrancois, Carl Envoyé : mardi, juillet 8, 2008 11:23 À : Apache AXIS C User List Objet : RE : RE : WSDL2C deserialisation problem Hi Dimuthu, the parent type is xs:complexType name=ActivityType xs:attribute ref=addDataTypes:ObjectIdentifier use=optional/ /xs:complexType Please let me know if there is anything else I can send you to help figure this out. I already tried setting current_node = first_node; as described in my last response. I will try with the is_early_node_valid = AXIS2_FALSE; and see if it helps. Carl -Message d'origine- De : Dimuthu Gamage [mailto:[EMAIL PROTECTED] Envoyé : lundi, juillet 7, 2008 21:17 À : Apache AXIS C User List Objet : Re: RE : WSDL2C deserialisation problem Hi Carl, I have a test case with the following schema and it works fine xs:complexType name=DiagonalMatrix xs:complexContent xs:extension base=ax21:Matrix xs:sequence xs:element name=somejunk minOccurs=0 type=xs:int/ xs:element name=diagonal nillable=true type=ax21:MatrixRow/ xs:element name=anotherjunk minOccurs=0 type=xs:int/ /xs:sequence xs:attribute name=diagonalSum type=xs:int/ /xs:extension /xs:complexContent /xs:complexType xs:complexType name=Matrix xs:sequence xs:element minOccurs=0 maxOccurs=unbounded name=rows nillable=true type=ax21:MatrixRow/ !-- i removed maxOcccurs=unbounded part and checked, it woring too -- /xs:sequence xs:attribute name=rowCount type=xs:int/ /xs:complexType xs:complexType name=MatrixRow xs:sequence xs:element maxOccurs=unbounded minOccurs=0 name=columns nillable=true type=xs:int/ /xs:sequence xs:attribute name=columnCount type=xs:int/ /xs:complexType I think this is exactly simmilar to your schema (it has elements and an attribute), may be the parent type is the different. Just check whether there is special different in 'ActivityType' in your schema with the Matrix type here. It s better if you can send
Re: Loading mod_axis2.so module into Apache
Supun Kamburugamuva wrote: Hi Samisa, I think some of the instructions like setting the LD_LIBRARY_PATH is missing. Then we need to fix it. Please raise a Jira on this. Samisa... Also I think we should add a faq saying what are the things that can go wrong when we deploy in Apache and possible solutions to that. Supun.. On Thu, Jul 17, 2008 at 11:57 AM, Samisa Abeysinghe [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Supun, Arn't these steps on the manual? Samisa... Supun Kamburugamuva wrote: Hi Alex, Nice description of the problem. Couldn't think of a better way to do it. This is what you need to do. You have the axis2/c distribution in /home/alex/axis2c-dist right? You should have the lib, modules and services directories under that directory. Also you need to have the axis2.xml file in that directory. Please add the lib directory to your LD_LIBRARY_PATH or do an equivalent of this (ldconfig). Please remove all your LoadFile directives from your Apache configuration. Make sure your Axis2/C configuration in httpd.conf is correct. The required entries are: LoadModule axis2_module MOD_AXIS2_SO_PATH Axis2RepoPath AXIS2C_INSTALL_DIR Axis2LogFile PATH_TO_LOG_FILE Axis2LogLevel LOG_LEVEL Location /axis2 SetHandler axis2_module /Location Also make sure that Apache has read access to the /home/alex/axis2c-dist directory. Start Apache and everything should work fine. Supun.. On Thu, Jul 17, 2008 at 8:09 AM, Rajika Kumarasiri [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: On Thu, Jul 17, 2008 at 2:25 AM, Alex Bolgarov [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Well, our server machine is not supposed to have development tools at all. So I can't compile the Axis2/C on it. Then, how it is supposed to work if I use the Axis2C binary distribution? 1. Unzip the binary to a location, 2. Copy the mod_axis2.so to the Apache module directory. 3. Set the LoadModule and the Axis2RepoPath in httpd.conf Restart the Apache server. -Rajika And it should have nothing to do with environment variables settings (other then possible LD_LIBRARY_PATH) because Apache can't load the module at all, because the ldopen() can't find the shared libraries that this module refers to, and I can't load those shared libraries manually using LoadFile directive because of the circular reference problem as I described. So at the moment of failure no Axis2/C code has executed yet that could have a chance to fix something (like, to find and load libraries from the location pointed by the AXIS2C_HOME or by any parameter in the Apache config file. Or am I wrong here? What I don't understand is why (and how) it works if I run the Apache server on the machine where I compile the Axis2C. Does the linker, when it builds the libmod_axis2.so, embeds into this library the pathes to the other Axis2/C libraries so, when I copy the mod_axis2.so into the Apache modules directory on the same machine, it finds them using those embedded pathes? Thank you, alex. On Wed, Jul 16, 2008 at 3:28 PM, lahiru gunathilake [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi Alex, I think you have to set AXIS2C_HOME environment variable on your server machine. And why are you copying libraries from one machine to another why don't you compile Axis2C on you server machine.AFAIK if your first machine and the second machine are different,different in the sense first machine is dual core and the server machine is core 2 duo or something else you have to recompile Axis2C on your server machine and create libmod_axis2.so otherwise previously compiled library won't work on the server machine.
AXIS2C: Unexpected close-tag created
Hi, I am seeing a close tag being created when (I believe) there shouldn't be. The incorrect output is as follows... cwmp:getParameterValues xmlns:cwmp=urn:dslforum-org:cwmp-1-0 ParameterNames *Name/*TempAgent./Name /ParameterNames /cwmp:getParameterValues The code to create the problematic line in the above XML as follows:- axiom_node_t *nameNode = axiom_node_create(env); axutil_string_t* nameString = axutil_string_create (env, Name); axiom_element_create_str(env, parameterNamesNode, nameString, CWMP_EMPTY_PREFIX_NAMESPACE, nameNode); axiom_node_t *tempNode = axiom_node_create(env); axiom_text_create(env, nameNode, tempChar, tempNode); Is this a bug or am I just doing something wrong. Many thanks. Andy
Re: AXIS2C: Unexpected close-tag created
Looks like I'm not doing the right clean-up in the code which is subsequently causing a problem. Please ignore this post/problem. On Thu, Jul 17, 2008 at 2:52 PM, Andy Karseras [EMAIL PROTECTED] wrote: Hi, I am seeing a close tag being created when (I believe) there shouldn't be. The incorrect output is as follows... cwmp:getParameterValues xmlns:cwmp=urn:dslforum-org:cwmp-1-0 ParameterNames *Name/*TempAgent./Name /ParameterNames /cwmp:getParameterValues The code to create the problematic line in the above XML as follows:- axiom_node_t *nameNode = axiom_node_create(env); axutil_string_t* nameString = axutil_string_create (env, Name); axiom_element_create_str(env, parameterNamesNode, nameString, CWMP_EMPTY_PREFIX_NAMESPACE, nameNode); axiom_node_t *tempNode = axiom_node_create(env); axiom_text_create(env, nameNode, tempChar, tempNode); Is this a bug or am I just doing something wrong. Many thanks. Andy
PHP client Support for Axis2c
Dear All, From PHP script I want to invoke the axis2c client functionality (PHP scripts placed in Apache http server), which in turn invokes the Axis2c webservice. Is this support available in axis2c? Please suggest us on how to go about this? Thanks in Advance.. Regards, Shobha
Re: PHP client Support for Axis2c
Hi Shobha, Since Axis2/C is implemented based on Web services standards and Specifications, in theory it should be able to interop with every other implementations that follow these standard. So There is no problem interacting axis2/c with php, .net, java web services. In fact there is php extension developed based on axis2/c libraries which support all the specification supported in axis2/c like WS-Security, WS-RM, MTOM.. You can try it from http://wso2.org/projects/wsf/php Thanks Dimuthu On Fri, Jul 18, 2008 at 10:01 AM, Shobha AC [EMAIL PROTECTED] wrote: Dear All, From PHP script I want to invoke the axis2c client functionality (PHP scripts placed in Apache http server), which in turn invokes the Axis2c webservice. Is this support available in axis2c? Please suggest us on how to go about this? Thanks in Advance.. Regards, Shobha
Re: PHP client Support for Axis2c
On Fri, 2008-07-18 at 10:01 +0530, Shobha AC wrote: Dear All, From PHP script I want to invoke the axis2c client functionality (PHP scripts placed in Apache http server), which in turn invokes the Axis2c webservice. Is this support available in axis2c? You can deploy C/C++ service in Axis2/C and invoke. In order to invoke this service from a PHP script you can use a Web Services Framework like WSO2 WSF/PHP [1] [1] http://wso2.org/projects/wsf/php -Manjula. Please suggest us on how to go about this? Thanks in Advance.. Regards, Shobha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PHP client Support for Axis2c
Thank you all.. I will look into this URL.. Regards, Shobha _ From: Dimuthu Gamage [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2008 10:13 AM To: Apache AXIS C User List Subject: Re: PHP client Support for Axis2c Hi Shobha, Since Axis2/C is implemented based on Web services standards and Specifications, in theory it should be able to interop with every other implementations that follow these standard. So There is no problem interacting axis2/c with php, .net, java web services. In fact there is php extension developed based on axis2/c libraries which support all the specification supported in axis2/c like WS-Security, WS-RM, MTOM.. You can try it from http://wso2.org/projects/wsf/php Thanks Dimuthu On Fri, Jul 18, 2008 at 10:01 AM, Shobha AC [EMAIL PROTECTED] wrote: Dear All, From PHP script I want to invoke the axis2c client functionality (PHP scripts placed in Apache http server), which in turn invokes the Axis2c webservice. Is this support available in axis2c? Please suggest us on how to go about this? Thanks in Advance.. Regards, Shobha