2013-08-27 34 views
2

我想獲得一個簡單的hello world web服務工作。我使用WSDL2CPP從我的wsdl文件生成服務代碼。這建立並顯示在服務列表中 localhost:8080/axis2/servicesaxis2_http_server無法加載服務庫

現在,我創建了一個簡單的客戶端來訪問該服務。當我嘗試做網絡服務的請求,我看到下面我axis2.log:


[Tue Aug 27 09:50:31 2013] [debug] http_worker.c(186) Client HTTP version HTTP/1.1 
[Tue Aug 27 09:50:31 2013] [debug] soap_builder.c(882) identified soap version is soap12 
[Tue Aug 27 09:50:31 2013] [debug] phase.c(202) Invoke the handler request_uri_based_dispatcher within the phase Transport 
[Tue Aug 27 09:50:31 2013] [debug] req_uri_disp.c(97) Checking for service using target endpoint address : http://127.0.0.1:8080/axis2/services/Hello_Service 
[Tue Aug 27 09:50:31 2013] [debug] req_uri_disp.c(117) Service found using target endpoint address 
[Tue Aug 27 09:50:31 2013] [debug] phase.c(202) Invoke the handler AddressingInHandler within the phase Transport 
[Tue Aug 27 09:50:31 2013] [info] Starting addressing in handler 
[Tue Aug 27 09:50:31 2013] [debug] phase.c(202) Invoke the handler addressing_based_dispatcher within the phase Transport 
[Tue Aug 27 09:50:31 2013] [debug] phase.c(202) Invoke the handler rest_dispatcher within the phase Dispatch 
[Tue Aug 27 09:50:31 2013] [debug] phase.c(202) Invoke the handler soap_message_body_based_dispatcher within the phase Dispatch 
[Tue Aug 27 09:50:31 2013] [debug] soap_body_disp.c(200) Checking for operation using SOAP messagebody's first child's local name : sayHello 
[Tue Aug 27 09:50:31 2013] [debug] soap_body_disp.c(207) Operation found using SOAP message body's first child's local name 
[Tue Aug 27 09:50:31 2013] [debug] phase.c(202) Invoke the handler soap_action_based_dispatcher within the phase Dispatch 
[Tue Aug 27 09:50:31 2013] [debug] phase.c(202) Invoke the handler dispatch_post_conditions_evaluator within the phase PostDispatch 
[Tue Aug 27 09:50:31 2013] [debug] phase.c(202) Invoke the handler context_handler within the phase PostDispatch 
[Tue Aug 27 09:50:31 2013] [error] class_loader.c(152) Loading shared library ..//services/Hello_Service/libHello_Service.so Failed. DLERROR IS ..//services/Hello_Service/libHello_Service.so: undefined symbol: _ZN7wso2wsf11Environment6getEnvEv 
[Tue Aug 27 09:50:31 2013] [error] wsf_cpp_msg_recv.cpp(185) IMPL object for service 'Hello_Service' not set in message receiver. 103 :: Failed in creating DLL 

利益福祉的行:


[Tue Aug 27 09:50:31 2013] [error] class_loader.c(152) Loading shared library ..//services/Hello_Service/libHello_Service.so Failed. DLERROR IS ..//services/Hello_Service/libHello_Service.so: undefined symbol: _ZN7wso2wsf11Environment6getEnvEv 

這看起來有些名字改編之間的惡作劇WSO C++代碼和軸服務器的C代碼。有任何想法嗎?

+0

@ paul-ogilvie:嗨保羅,我發現[我的問題](http://stackoverflow.com/questions/33692127/unhandled-exception-at-x-in-axis2-http-server-exe?noredirect= 1#comment55156440_33692127)這一個的重複,所以關閉它。請考慮這個更新。 – sjsam

+0

參見http://sackoverflow.com/questions/33706609/what-does-actually-mean by @sjsam。 – tripleee

回答

0

可能你忘了鏈接到WSO2 WSF/C++本身。

嘗試重新編譯您的服務將-lwso2_wsf添加到LDFLAGS。

+0

我正在搭建: 'g ++ -g -shared -olibHello_Service.so -I $ WSFCPP_HOME/include -I。 -I $ WSFCPP_HOME /包括/ axis2-1.6.0 -I $ WSFCPP_HOME /包括/ axis2-1.6.0 /平臺-L $ WSFCPP_HOME/lib目錄\ -laxutil \ -laxis2_axiom \ -laxis2_engine \ -laxis2_parser \ -lpthread \ -laxis2_http_sender \ -laxis2_http_receiver \ -lguththila \ -lwso2_wsf \ * .cpp' 所以,我相信這是正確的建造。這很奇怪,因爲服務器最初加載的服務很好。 – kalden

+0

'C++ filt _ZN7wso2wsf11Environment6getEnvEv'給出'wso2wsf :: Environment :: getEnv()' - 它應該在'libwso2_wsf.so'中。嘗試通過啓動'nm /path/to/libwso2_wsf.so |來檢查它grep _ZN7wso2wsf11Environment6getEnvEv'並在此處寫入結果。 – loentar

+0

00017750 T _ZN7wso2wsf11Environment6getEnvEv – kalden