官网文档:  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. 错误:无法访问android.app.Activity 找不到android.app.Activity的类文件

    视频里面在工程ndk22/bin/classes中 运行javah  com.cn.ndk22.Ndk22.Activity ,出现了.h文件 但是我在bin/classes目录中运行javah 时出 ...

  2. 在创建窗口句柄之前,不能在控件上调用 Invoke 或 BeginInvoke 解决办法

    增加IsHandleCreated 判断 if (this.IsHandleCreated) { this.Invoke(new EventHandler(delegate { ...... })); ...

  3. 黑马程序员——JAVA基础之set集合

    ------- android培训.java培训.期待与您交流! ---------- Set:       元素是无序(存入和取出的顺序不一定一致),元素不可以重复.    Set接口中常用的类: ...

  4. Eclipse 复制按钮卡死

    复制按钮和按住CTRL链着超链接 有冲突,Eclipse不知道是复制还是链到元素,所以卡死 Eclipse/MyEclipse中使用复制粘贴功能卡的解决办法 最近在MyEclipse中编辑代码时,使用 ...

  5. 使用swiper和吸顶效果代码

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8&quo ...

  6. OCR文字识别软件许可文件被误删了怎么办

    使用任何一款软件,都会有误操作的情况发生,比如清理文件时一不小心删除了许可文件,对于ABBYY FineReader 12这样一款OCR文字识别软件,因失误错误删除了许可文件该怎么办呢?今天就来给大家 ...

  7. python_Day3[set集合,函数,全局变量之篇]

    一.set集合 1.Set集合特点:无序.不重复,可嵌套 2.set集合创建规则:set = {"123","234"} 字典创建规则:dic = {“Key” ...

  8. oracle组件

    目前在用的四个oracle版本 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionWith the Parti ...

  9. Jersey框架一:Jersey RESTful WebService框架简介

    Jersey系列文章: Jersey框架一:Jersey RESTful WebService框架简介 Jersey框架二:Jersey对JSON的支持 Jersey框架三:Jersey对HTTPS的 ...

  10. 在.net中序列化读写xml方法的总结

    在.net中序列化读写xml方法的总结 阅读目录 开始 最简单的使用XML的方法 类型定义与XML结构的映射 使用 XmlElement 使用 XmlAttribute 使用 InnerText 重命 ...