Web Services

webservices

  1. XmlSpy工具
  2. 了解异构系统的整合方式

 

  1. SOAP(简单对象访问协议http+xml
  2. UDDI(发现和整合服务)
  3. WSDLWeb Services描述语言)
  4. web服务=WSDL+SOAP
  5. Web Services主要解决异构系统通信
  6. 其实Web Service就是基于XML的数据交换
  7. Java Web Services的引擎

a) Axis(多语言兼容性较好)

b) Xfire

c) CXF(容易嵌入到spring中)

  1. Web Services特征

a) 通过标准的soap通信,一般走http协议

b) 能跨平台调用

c) 通信格式是xml(文本),而不是二进制(EJBCORBA

  1. 目前主流的分布式技术

a) CORBAEJBDCOMWeb service soap/rest

  1. EAI(企业应用集成),SOA(面向服务的架构)、IDL(接口定义语言)
  2. Web ServiceCORBA是实现SOA的方式,所以开放Web Service接口,也可以称为开放SOA接口
  3. SOAP协议request

POST /axis/MyMath.jws?wsdl HTTP/1.0

Content-Type: text/xml; charset=utf-8

Accept: application/soap+xml, application/dime, multipart/related, text/*

User-Agent: Axis/1.4

Host: localhost:8080

Cache-Control: no-cache

Pragma: no-cache

SOAPAction: ""

Content-Length: 561

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><squared soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><arg0 href="#id0"/></squared><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">10</multiRef></soapenv:Body></soapenv:Envelope>

  1. SOAP协议response

HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

Set-Cookie: JSESSIONID=2C7998D99DD3820BCCB53FA9DD7BBA29; Path=/axis

Content-Type: text/xml;charset=utf-8

Date: Fri, 06 Aug 2010 09:36:02 GMT

Connection: close

<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><squaredResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><squaredReturn xsi:type="xsd:int">100</squaredReturn></squaredResponse></soapenv:Body></soapenv:Envelope>

 

  1. 了解Web ServicesJAX-WSJAX-RSCXFAXISXfire的关系
  2. AxisCXF优缺点?

a) Axis互通信比较好,对其他语言访问的兼容性比较多

b) CXF非常容易的整合到Spring架构中

  1. web service测试工具SoapUI

 

  1. CXFSpring的集成.
  2. 南向接口,北向接口
  3. 如何采用JAX-WS方式开发Web Service

c) 定义接口,采用@WebService相关注解说明

d) 针对接收书写实现类

web service有两种风格

a) soap风格

b) restful风格

  1. 使用Web Service开发最好不要返回复杂类型,复杂类型可以使用XMLJSON表示
  2. 实现了用户认证中心,开放Web Service认证接口,可以实现不同语言的多系统的集中认证。
  3. SSO(单点登录,CAS
  4. 了解HttpClient

a) 网络爬虫

  1. ls,rm,cp,mv,cd,pwd,chmod,mkdir,kill
原文地址:https://www.cnblogs.com/hkdpp/p/10496081.html