标签:
官网文档: http://axis.apache.org/axis2/c/core/docs/axis2c_manual.html
从文档中可以总结出:
1. Axis2/C是一个用C语言实现的Web Service引擎。
Axis2/C基于Axis2架构,支持SOAP1.1和SOAP1.2协议,并且支持RESTful风格的Web Service。基于Axis2/C的Web Service可以同时暴露为SOAP和RESTful风格的服务。
2. 构建Axis2/c服务的基本步骤:
*Implement the functions corresponding to the operations of the service.
In our sample, we will have one function that implements the "greet" operation.
We will name that function axis2_hello_greet
.
*Implement the functions defined by the axis2_svc_skeleton
interface
axis2_svc_skeleton
interface expects the functions init
, invoke
, on_fault
and free
to be implemented by our service.
In our sample, we would implement those and name them as hello_init
, hello_invoke
, hello_on_fault
and hello_free
respectively.
* Implement the create function, that would create an instance of the service skeleton
The create function would create an axis2_svc_skeleton and assign the respective function pointers to map the axis2_svc_skeleton interface to our interface implementation methods explained in the above step.
* Implement axis2_get_instance and axis2_remove_instance functions
These functions are used to create and destroy service instances by the engine, and each service must define these functions.
* Write the services.xml file for the service
The services.xml file acts as the deployment descriptor file for the service. As the bare minimum, we need to configure the service name, operations, and the shared library file name containing the service implementation in this file.
As previously decided, we will name the service "hello", the operation "greet" and the shared library libhello.so on Linux and hello.dll on MS Windows.
3. Server API (官网文档)
4. REST 实现(官网文档)
标签:
原文地址:http://www.cnblogs.com/maxpak/p/4720444.html