cxf ServerFactoryBean 生成基于soap1.2的WebServices
基于 生成 cxf
2023-09-11 14:22:41 时间
//获得服务工厂bean ServerFactoryBean bean = new ServerFactoryBean(); HTTPTransportFactory httpTransportFactory = new HTTPTransportFactory(); //绑定服务的发布地址 bean.setAddress("http://10.0.1.32:5678/hello"); //指定提供服务的类型 bean.setServiceClass(HelloService.class); //指定提供服务的实例 bean.setServiceBean(new HelloServiceImpl()); bean.getServiceFactory().getConfigurations().add(new MethodNameSoapActionServiceConfiguration()); SoapBindingConfiguration conf = new SoapBindingConfiguration(); conf.setVersion(Soap12.getInstance()); bean.setBindingConfig(conf); //启动服务-----publish bean.setStart(false); ServerImpl server= (ServerImpl)bean.create(); EndpointInfo e1=((ServletDestination)server.getDestination()).getEndpointInfo(); e1.getBinding().getOperations().forEach(e->{ }); Bus b1=((ServletDestination)server.getDestination()).getBus(); Destination destination= httpTransportFactory.getDestination(e1,b1); server.setDestination(destination); server.start(); System.out.println("server ready...");
重点代码是
SoapBindingConfiguration conf = new SoapBindingConfiguration(); conf.setVersion(Soap12.getInstance()); bean.setBindingConfig(conf);
相关文章
- 软件行业迫切需要基于正向生成的编码模型
- 基于.net的分布式系统限流组件 C# DataGridView绑定List对象时,利用BindingList来实现增删查改 .net中ThreadPool与Task的认识总结 C# 排序技术研究与对比 基于.net的通用内存缓存模型组件 Scala学习笔记:重要语法特性
- 基于 Vue.js 之 iView UI 框架非工程化实践记要 使用 Newtonsoft.Json 操作 JSON 字符串 基于.net core实现项目自动编译、并生成nuget包 webpack + vue 在dev和production模式下的小小区别 这样入门asp.net core 之 静态文件 这样入门asp.net core,如何
- .NET C#生成随机颜色,可以控制亮度,生成暗色或者亮色 基于YUV模式判断颜色明亮度
- 基于prim算法的网络最小生成树生成得到路径规划
- 基于MATLAB的实时视频处理系统
- 网络安全系列-二十七: 基于pkts.io解析pcap,生成五元组及payload
- 基于.htaccess的Web Shell工具htshells
- 基于GPT2_Chinese文本自动生成
- AI创作教程之从 Youtube平台视频剪辑生成新闻文章 基于OpenAI Whisper、OpenAI GPT3 和 Stable Diffusion
- (数据科学学习手札77)基于geopandas的空间数据分析——文件IO
- 基于微信小程序云开发的商城项目~
- 《基于模型的软件开发》——第1部分 面向对象开发的根本
- 基于Jws的WebService项目
- 基于TTCN-3测试系统的逆向模型发现框架的设计
- STM32HAL库 基于Flash+FatFs模拟U盘形式进行固件拷贝升级(详解)
- 基于eclipse的mybatis映射代码自动生成的插件http://blog.csdn.net/fu9958/article/details/7521681
- python:关于postman中生成的基于requests库的接口代码