我试图在OS X上使用Axis2/c,但当我启动axis2c_http_server时,我收到以下错误:
[Fri Mar 16 12:26:19 2012] [info] Starting Axis2 HTTP server....
[Fri Mar 16 12:26:19 2012] [info] Apache Axis2/C version in use : 1.6.0
[Fri Mar 16 12:26:19 2012] [info] Server port : 9090
[Fri Mar 16 12:26:19 2012] [info] Repo location : ../
[Fri Mar 16 12:26:19 2012] [info] Read Timeout : 60000 ms
[Fri Mar 16 12:26:19 2012] [error] dep_engine.c(324) Axis2 Configuration file name not found
[Fri Mar 16 12:26:19 2012] [error] conf_init.c(56) Creating deployment engine failed for repository ../
[Fri Mar 16 12:26:19 2012] [error] http_receiver.c(126) unable to create private configuration contextfor repo path ../
[Fri Mar 16 12:26:19 2012] [error] http_server_main.c(215) Server creation failed: Error code: 18 :: Configuration file cannot be found
服务器似乎找不到文件axis2.xml。我已经将axis2.xml放在了repo的根目录中。我已经正确地设置了环境变量$AXIS2C_HOME,因为服务器在正确的文件夹中写入日志。
这是我的回购结构:
antoine@Antoines-MacBook-Air:repo $ pwd
/Users/antoine/Documents/axis2c_test/repo
antoine@Antoines-MacBook-Air:repo $ ll -R
total 16
-rw-r--r--@ 1 antoine staff 5.8K Mar 16 10:06 axis2.xml
drwxr-xr-x 53 antoine staff 1.8K Mar 16 10:06 lib
drwxr-xr-x 4 antoine staff 136B Mar 16 12:26 logs
drwxr-xr-x 4 antoine staff 136B Mar 16 11:14 services
./lib:
total 25816
-rwxr-xr-x 1 antoine staff 246K Mar 16 10:06 libaxis2_axiom.0.6.0.dylib
-rwxr-xr-x 1 antoine staff 246K Mar 16 10:06 libaxis2_axiom.0.dylib
-rw-r--r-- 1 antoine staff 1.3M Mar 16 10:06 libaxis2_axiom.a
-rwxr-xr-x 1 antoine staff 246K Mar 16 10:06 libaxis2_axiom.dylib
-rwxr-xr-x 1 antoine staff 1.0K Mar 16 10:06 libaxis2_axiom.la
-rwxr-xr-x 1 antoine staff 576K Mar 16 10:06 libaxis2_engine.0.6.0.dylib
-rwxr-xr-x 1 antoine staff 576K Mar 16 10:06 libaxis2_engine.0.dylib
-rw-r--r-- 1 antoine staff 2.6M Mar 16 10:06 libaxis2_engine.a
-rwxr-xr-x 1 antoine staff 576K Mar 16 10:06 libaxis2_engine.dylib
-rwxr-xr-x 1 antoine staff 1.1K Mar 16 10:06 libaxis2_engine.la
-rwxr-xr-x 1 antoine staff 120K Mar 16 10:06 libaxis2_http_common.0.6.0.dylib
-rwxr-xr-x 1 antoine staff 120K Mar 16 10:06 libaxis2_http_common.0.dylib
-rw-r--r-- 1 antoine staff 484K Mar 16 10:06 libaxis2_http_common.a
-rwxr-xr-x 1 antoine staff 120K Mar 16 10:06 libaxis2_http_common.dylib
-rwxr-xr-x 1 antoine staff 1.1K Mar 16 10:06 libaxis2_http_common.la
-rwxr-xr-x 1 antoine staff 20K Mar 16 10:06 libaxis2_http_receiver.0.6.0.dylib
-rwxr-xr-x 1 antoine staff 20K Mar 16 10:06 libaxis2_http_receiver.0.dylib
-rw-r--r-- 1 antoine staff 57K Mar 16 10:06 libaxis2_http_receiver.a
-rwxr-xr-x 1 antoine staff 20K Mar 16 10:06 libaxis2_http_receiver.dylib
-rwxr-xr-x 1 antoine staff 1.2K Mar 16 10:06 libaxis2_http_receiver.la
-rwxr-xr-x 1 antoine staff 112K Mar 16 10:06 libaxis2_http_sender.0.6.0.dylib
-rwxr-xr-x 1 antoine staff 112K Mar 16 10:06 libaxis2_http_sender.0.dylib
-rw-r--r-- 1 antoine staff 355K Mar 16 10:06 libaxis2_http_sender.a
-rwxr-xr-x 1 antoine staff 112K Mar 16 10:06 libaxis2_http_sender.dylib
-rwxr-xr-x 1 antoine staff 1.2K Mar 16 10:06 libaxis2_http_sender.la
-rwxr-xr-x 1 antoine staff 49K Mar 16 10:06 libaxis2_parser.0.6.0.dylib
-rwxr-xr-x 1 antoine staff 49K Mar 16 10:06 libaxis2_parser.0.dylib
-rw-r--r-- 1 antoine staff 139K Mar 16 10:06 libaxis2_parser.a
-rwxr-xr-x 1 antoine staff 49K Mar 16 10:06 libaxis2_parser.dylib
-rwxr-xr-x 1 antoine staff 982B Mar 16 10:06 libaxis2_parser.la
-rwxr-xr-x 1 antoine staff 57K Mar 16 10:06 libaxis2_xpath.0.6.0.dylib
-rwxr-xr-x 1 antoine staff 57K Mar 16 10:06 libaxis2_xpath.0.dylib
-rw-r--r-- 1 antoine staff 190K Mar 16 10:06 libaxis2_xpath.a
-rwxr-xr-x 1 antoine staff 57K Mar 16 10:06 libaxis2_xpath.dylib
-rwxr-xr-x 1 antoine staff 902B Mar 16 10:06 libaxis2_xpath.la
-rwxr-xr-x 1 antoine staff 193K Mar 16 10:06 libaxutil.0.6.0.dylib
-rwxr-xr-x 1 antoine staff 193K Mar 16 10:06 libaxutil.0.dylib
-rw-r--r-- 1 antoine staff 982K Mar 16 10:06 libaxutil.a
-rwxr-xr-x 1 antoine staff 193K Mar 16 10:06 libaxutil.dylib
-rwxr-xr-x 1 antoine staff 867B Mar 16 10:06 libaxutil.la
-rwxr-xr-x 1 antoine staff 63K Mar 16 10:06 libguththila.0.6.0.dylib
-rwxr-xr-x 1 antoine staff 63K Mar 16 10:06 libguththila.0.dylib
-rw-r--r-- 1 antoine staff 191K Mar 16 10:06 libguththila.a
-rwxr-xr-x 1 antoine staff 63K Mar 16 10:06 libguththila.dylib
-rwxr-xr-x 1 antoine staff 923B Mar 16 10:06 libguththila.la
-rwxr-xr-x 1 antoine staff 229K Mar 16 10:06 libneethi.0.6.0.dylib
-rwxr-xr-x 1 antoine staff 229K Mar 16 10:06 libneethi.0.dylib
-rw-r--r-- 1 antoine staff 1.4M Mar 16 10:06 libneethi.a
-rwxr-xr-x 1 antoine staff 229K Mar 16 10:06 libneethi.dylib
-rwxr-xr-x 1 antoine staff 1.0K Mar 16 10:06 libneethi.la
drwxr-xr-x 3 antoine staff 102B Mar 16 10:06 pkgconfig
./lib/pkgconfig:
total 8
-rw-r--r-- 1 antoine staff 256B Mar 16 10:06 axis2c.pc
./logs:
total 24
-rw-r--r-- 1 antoine staff 12K Mar 16 12:26 axis2.log
./services:
total 32
-rwxr-xr-x 1 antoine staff 10K Mar 16 12:26 libhello.dylib
-rw-r--r-- 1 antoine staff 209B Mar 16 10:06 services.xml
有人看到我做错了什么吗?
我只使用客户端消费者,但也许我的解决方案可以帮助您。
为了运行服务器,您需要将AXIS2C_HOME环境变量设置为指向AXIS2C安装。
对于不需要的客户端,只需在创建axis2c_stub_t类型的新实例时指定axis2.xml文件的位置(也就是设置client_home参数)