我正在尝试让一个简单的helloworld web服务正常工作。我使用WSDL2CPP从wsdl文件中生成服务代码。这将生成并显示在服务列表中localhost:8080/axis2/services
现在,我创建了一个简单的客户端来访问该服务。当我尝试向web服务发出请求时,我在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
这看起来像是WSOC++代码和axis服务器的C代码之间的一些名称混乱的恶作剧。有什么想法吗?
可能您忘记了链接WSO2WSF/C++本身。
尝试重新编译您的服务,将-lwso2_wsf
添加到LDFLAGS。