官网文档:  http://axis.apache.org/axis2/c/core/docs/axis2c_manual.html

从文档中可以总结出:

1. Axis2/C是一个用C语言实现的Web Service引擎。
Axis2/C基于Axis2架构,支持SOAP1.1SOAP1.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 initinvokeon_fault and free to be implemented by our service.
    In our sample, we would implement those and name them as hello_inithello_invokehello_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 实现(官网文档)

编译命令:

gcc -shared -fPIC -o libhello.so -I$AXIS2C_HOME/include/axis2-1.6.0/ -L$AXIS2C_HOME/lib -laxutil -laxis2_axiom -laxis2_parser -laxis2_engine -lpthread -laxis2_http_sender -laxis2_http_receiver hello.c

构造XML

例如:

  <Config>
     <value>88</value>
      <type>get</type>
  </Config>
 
        axiom_node_t *
axis2_hello_getconfig(const axutil_env_t *env, axiom_node_t *node)
{
        axiom_node_t* root_node_t = NULL;
        axiom_node_t* node_value = NULL;
        axiom_node_t* node_type = NULL;
        axiom_element_t * ele_root = NULL;
        axiom_element_t * ele_value = NULL;
        axiom_element_t * ele_type = NULL;

ele_root = axiom_element_create(env, NULL, "Config", NULL, &root_node_t);

ele_value = axiom_element_create(env, root_node_t, "value", NULL, &node_value);
        axiom_element_set_text(ele_value, env, "88", node_value);

ele_type = axiom_element_create(env, root_node_t, "type", NULL, &node_type);
        axiom_element_set_text(ele_type, env, "get", node_type);

return root_node_t;
}

Axis2/c 知识点的更多相关文章

  1. axis2框架用wsdl文件生成的服务端MessageReceiveInOut文件注意事项

    在用axis2生成服务端文件和客户端文件,当客户端文件调用服务端文件时,都是通过wsdl文件生成的 配置文件进行相互的调用. 在一开始做开发测试的时候,通过soapUI进行调用接口的时候,可以调用成功 ...

  2. Java面试知识点总结及解析

    声明:有人说, 有些面试题很变态,个人认为其实是因为我们基础不扎实或者没有深入.本篇文章来自一位很资深的前辈对于最近java面试题目所做的总结归纳,有170道题目 ,知识面很广 ,而且这位前辈对于每个 ...

  3. ASP.NET Core 中的那些认证中间件及一些重要知识点

    前言 在读这篇文章之间,建议先看一下我的 ASP.NET Core 之 Identity 入门系列(一,二,三)奠定一下基础. 有关于 Authentication 的知识太广,所以本篇介绍几个在 A ...

  4. ASP.NET MVC开发:Web项目开发必备知识点

    最近加班加点完成一个Web项目,使用Asp.net MVC开发.很久以前接触的Asp.net开发还是Aspx形式,什么Razor引擎,什么MVC还是这次开发才明白,可以算是新手. 对新手而言,那进行A ...

  5. UWP开发必备以及常用知识点总结

    一直在学UWP,一直在写Code,自己到达了什么水平?还有多少东西需要学习才能独挡一面?我想对刚接触UWP的开发者都有这种困惑,偶尔停下来总结分析一下还是很有收获的! 以下内容是自己开发中经常遇到的一 ...

  6. C#高级知识点&(ABP框架理论学习高级篇)——白金版

    前言摘要 很早以前就有要写ABP高级系列教程的计划了,但是迟迟到现在这个高级理论系列才和大家见面.其实这篇博客很早就着手写了,只是楼主一直写写停停.看看下图,就知道这篇博客的生产日期了,谁知它的出厂日 ...

  7. lucene 基础知识点

    部分知识点的梳理,参考<lucene实战>及网络资料 1.基本概念 lucence 可以认为分为两大组件: 1)索引组件 a.内容获取:即将原始的内容材料,可以是数据库.网站(爬虫).文本 ...

  8. DoraCMS 源码知识点备注

    项目需要研究了下DoraCMS这款开源CMS,真心做的不错:).用的框架是常用的express 4 + mongoose,代码也很规范,值得学习. 源码中一些涉及到的小知识点备注下: https:// ...

  9. atitit 商业项目常用模块技术知识点 v3 qc29

    atitit 商业项目常用模块技术知识点 v3 qc29 条码二维码barcodebarcode 条码二维码qrcodeqrcode 条码二维码dm码生成与识别 条码二维码pdf147码 条码二维码z ...

随机推荐

  1. Swiper说明及API手册说明

    最近使用Swipe.js,发现中文的资料很少,试着翻译了一下.能力有限,翻译难免错漏,欢迎指出,多谢! 翻译自:http://www.idangero.us/sliders/swiper/api.ph ...

  2. Python爬虫学习笔记——豆瓣登陆(三)

    之前是不会想到登陆一个豆瓣会需要写三次博客,修改三次代码的. 本来昨天上午之前的代码用的挺好的,下午时候,我重新注册了一个号,怕豆瓣大号被封,想用小号爬,然后就开始出问题了,发现无法模拟登陆豆瓣了,开 ...

  3. java的nio之:java的bio流下实现的socket服务器同步阻塞模型和socket的伪异步的socket服务器的通信模型

    同步I/O模型的弊端===>每一个线程的创建都会消耗服务端内存,当大量请求进来,会耗尽内存,导致服务宕机 伪异步I/O的弊端分析===>当对Socket的输入流进行读取操作的时候,它会一直 ...

  4. java基础之:详解内部类(转载)

    可以将一个类的定义放在另一个类的定义内部,这就是内部类. 内部类是一个非常有用的特性但又比较难理解使用的特性(鄙人到现在都没有怎么使用过内部类,对内部类也只是略知一二). 第一次见面 内部类我们从外面 ...

  5. How to drop a PostgreSQL database if there are active connections to it?

    1.PostgreSQL 9.1 and below: SELECT pg_terminate_backend(pg_stat_activity.procpid) FROM pg_stat_activ ...

  6. ABBYY 识别结果的文档怎么导出

    使用ABBYY FineReader Pro for Mac OCR文字识别软件识别文档时,识别结果可以保存至一个文件.复制到剪贴板或通过电子邮件发送.可以执行下列操作:导出整个文档.仅导出所选页面. ...

  7. System.Threading.ThreadAbortException: 正在中止线程。

    在 System.Threading.ThreadAbortException 中第一次偶然出现的"mscorlib.dll"类型的异常 "System.Threadin ...

  8. unity, collider/trigger on children

    参考:http://answers.unity3d.com/questions/410711/trigger-in-child-object-calls-ontriggerenter-in-pa.ht ...

  9. OpenJudge计算概论-计算书费

    /*============================================== 计算书费 总时间限制: 1000ms 内存限制: 65536kB 描述 下面是一个图书的单价表: 计算 ...

  10. 09_android入门_采用android-async-http开源项目的GET方式或POST方式实现登陆案例

    根据08_android入门_android-async-http开源项目介绍及使用方法的介绍,我们通过最常见的登陆案例进行介绍android-async-http开源项目中有关类的使用.希望对你学习 ...