多平台统一管理软件接口,如何实现多平台统一管理软件接口
265
2023-03-08
本文目录一览:
Support for Standards
JSR Support
JAX-WS - Java API for XML-Based Web Services (JAX-WS) 2.0 - JSR-224
Web Services Metadata for the Java Platform - JSR-181
JAX-RS - The Java API for RESTful Web Services - JSR-311
SAAJ - SOAP with Attachments API for Java (SAAJ) - JSR-67
WS-* and related Specifications Support
Basic support: WS-I Basic Profile 1.1
Quality of Service: WS-Reliable Messaging
Metadata: WS-Policy, WSDL 1.1 - Web Service Definition Language
Communication Security: WS-Security, WS-SecurityPolicy, WS-SecureConversation, WS-Trust (partial support)
Messaging Support: WS-Addressing, SOAP 1.1, SOAP 1.2, Message Transmission Optimization Mechanism (MTOM)
Multiple Transports, Protocol Bindings, Data Bindings, and Formats
Transports: HTTP, Servlet, JMS, In-VM and many others via the Camel transport for CXF such as SMTP/POP3, TCP and Jabber
Protocol Bindings: SOAP, REST/HTTP, pure XML
Data bindings: JAXB 2.x, Aegis, Apache XMLBeans, Service Data Objects (SDO), JiBX
Formats: XML Textual, JSON, FastInfoset
Extensibility API allows additional bindings for CXF, enabling additional message format support such as CORBA/IIOP
http://cxf.apache.org
1、首先需要确定第三方的接口的基本信息:地址、请求方式,参数、返回值,接口模式这里第三方的接口是restful风格的,采用get请求。
2、确定好接口的相关模式之后,这里编写http的请求,用参数、请求模式构造请求。
3、这里最重要的构造http的请求,这里采用CloseableHttpClient,设置相关的header,采用HttpResponse接受用户的返回值。
4、在业务类中只需要封装相关的请求,把参数传入给接口中即可,这里返回jsonObject方便解析使用。
5、调用api接口还有其他的模式,如图通过MultiValueMap,封装参数,构造HttpEntity对象,RestTemplate 发送请求即可。
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~