Apache2 Axis2/C 搭建 hello world

参考 http://www.cnblogs.com/fjchenqian/archive/2012/08/05/2623601.html

http://www.cnblogs.com/ezhong/archive/2013/03/27/2984730.html

概念: Jester: JavaScript Client for REST

jester的官网是 http://jesterjs.org/

1. 编译Axis2/c

下载 axis2c-src-1.6.0.tar.gz

CFLAGS=-Wno-unused-but-set-variable ./configure --with-apache2=/usr/local/apache2/include

--with-apache2=/usr/local/apache2/include 是能生成libmod_axis2.so

遇到 uuid_gen_unix.c:62:20: error: variable 'tv' set but not used [-Werror=unused-but-set-variable]

解决: CFLAGS=-Wno-unused-but-set-variable ./configure

遇到:/usr/bin/ld: test.o: undefined reference to symbol 'axiom_xml_reader_free', 去掉neethi下makefile test目录,没有用

make; make install

2. cp $AXIS2C_HOME/lib/libmod_axis2.so.0.6.0 /apache/httpd/modules/mod_axis2.so

3. 修改httpd.conf

LoadModule axis2_module modules/mod_axis2.so

<IfModule axis2_module>

Axis2RepoPath /apache/axiscpp

Axis2LogFile /usr/tmp/AxisLog

Axis2MaxLogFileSize 200

Axis2LogLevel LOG_LEVEL

<Location /axis2>

SetHandler axis2_module

</Location>

</IfModule>

4. 编译 samples

需要先指定环境变量 AXIS2C_HOME = /usr/local/axis2c

cd /apache/axis2c-src-1.6.0/samples/
./configure --prefix=${AXIS2C_HOME} --with-axis2=${AXIS2C_HOME}/include/axis2-1.6.0
make