Ch10 WSDL(Web Service Description Language)

1/20/2022 ServiceService ComputingWSDL

# Ch10 WSDL(Web Service Description Language)

  • Port:一个具体的消息处理器,实现了一个特定的port类型

  • Binding:Binding规定了message是如何传输的,message的结构,传输协议的使用,序列化的方法

  • Service:一个message processor可以有多个port,每个port都可以实现特定的port type

  • !重要

    img

    • 有了port type就可以创建proxy,并且stub可以把消息转换为C#可以识别的语言,再传输给service
  • !重要WSDL是一个xml文件,规定了一个service能做什么,这个service在哪里(port),怎么才能使用这个service(binding)

    imgimg

    • ?port type类似于接口,binding是实现这个接口的实例img
  • Port type

    • Types:就像Java的class一样,定义了在这个文件里有哪些typeimg

    • message:里面的part一般只有一个,定义了message包含哪些东西imgimg

    • port type:定义了哪些操作可以被做,输入输出是什么,错误信息是什么

      img

      • oneway:接受一条信息

      • Solicit 和request的主体不一样

      • Notification:发送一条信息

      • 图解:imgimg

  • Bindings:operation name是引用之前的port type的operation name

    img

    • soap:binding中的style规定了是rpc还是document,定义了范围下的默认style

    • soap:transport规定了传输的协议,比如HTTP/jms等

    • soap:operation中的style可以重新定义是rpc还是documentimg

    • soap:operation中的action定义了需要对这个消息做什么样的处理

    • soap:body

      img

      • use=literal表示没有编码

      • use=encoded表示用下面的encodingStyle编码

    • soap:headerimg

  • Service:一个service有多个port,一个port实现了一个binding,一个binding实现了一个port type(相当于接口)

    img

    • port:binding描述了消息的输入输出,传输方法等,address描述了port的位置img
  • 例子:imgimg

Last Updated: 11/19/2024, 1:54:38 PM