官网文档:  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. activity状态的保存和保持(onRetainNonConfigurationInstance和getLastNonConfigurationInstanc

    本文转载于:http://chengbs.iteye.com/blog/1156167 比较onsaveinstancestate() 与 onretainnonconfigurationinstan ...

  2. AS3 Embed用法笔记

    1. 用[Embed]元数据标签可以嵌入GIF,PNG,JPEG,或者MP3文件.ActionScript代码的顺序非常重要.你必须在声明变量前添加[Embed]元数据标签,而且这个变量的类型会是Cl ...

  3. 搭建最简单的SpringMVC框架(使用maven)

    本文说明:本文介绍使用maven搭建SpringMVC最简单的框架程序过程,适合初学者上手. 下载链接 点此进入下载链接 1.创建一个maven webapp工程. 2.修改WEB-INF目录下的we ...

  4. JSBinding + SharpKit / 初体验:下载代码及运行Demo

    QQ群:189738580 以下是群主维护的JSB版本: git地址:https://github.com/qcwgithub/qjsbunitynew.git插件源码地址(不包含SpiderMonk ...

  5. linux操作文本文件

    打开文件 #vi 文件名 保存退出 从编辑模式退到命令行模式,按esc键 保存退出命令 #:wq 强制退出,不保存 #:q!

  6. ABBYY导出结果为PDF注意事项

    使用ABBYY FineReader Pro for Mac OCR文字识别软件识别文档时,可以将已识别的文本保存到文件中,还可以通过电子邮件发送已识别的文本,只要输出格式受FineReader支持. ...

  7. 003. 连接access数据库代码

    1. 前端aspx中的代码 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="De ...

  8. string 字符串的分隔处理与list的相互转换

    在指定 String 数组的每个元素之间串联指定的分隔符 String,从而产生单个串联的字符串.(来源于MSDN) 有两个重载函数:[C#]public static string Join(   ...

  9. 必须Mark!43个优秀的Swift开源项目推荐

    摘要:拥有着苹果先天生态优势的Swift自发布以来,各种优秀的开源项目便层出不穷.本文作者站在个人的角度,将2014年Swift开源项目做了一个甄别.筛选,从工具.存储.网络.界面.框架到Demo以及 ...

  10. mysql查询表中的所有字段

    select column_name, table_name from information_schema.columns where table_schema='yizhan' and colum ...