• webService中wsdl文档详解


      <?xml version="1.0" encoding="UTF-8" ?>
    - <!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version 
        is JAX-WS RI 2.2.4-b01. -->
    - <!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version 
        is JAX-WS RI 2.2.4-b01. -->
    -
    <definitions
        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
        xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
        xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:tns="http://ws.day01_ws.atguigu.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws.day01_ws.atguigu.com/"
        name="HelloWsImplService">
        -
        <types>
            -
            <xsd:schema>
                <xsd:import namespace="http://ws.day01_ws.atguigu.com/"
                    schemaLocation="http://192.168.1.62:8080/day01_ws/hellows?xsd=1" />
            </xsd:schema>
        </types>
         <!-- 
            message:用来定义消息结构
                part:用于指定引用标签<types>中的xml片段
         -->
        <message name="sayHello">
            <part name="parameters" element="tns:sayHello" />
        </message>
    
        <message name="sayHelloResponse">
            <part name="parameters" element="tns:sayHelloResponse" />
        </message>
        -<!-- 
            portType:用来定义服务器端的SEI
                operation:用来定义SEI中处理请求的方法
                input:指定客户端传过来的数据,会引用标签<message>
                output:服务器端输出的数据,会引用对应标签<message>
         -->
        <portType name="HelloWsImpl">
            -
            <operation name="sayHello">
                <input wsam:Action="http://ws.day01_ws.atguigu.com/HelloWsImpl/sayHelloRequest"
                    message="tns:sayHello" />
                <output wsam:Action="http://ws.day01_ws.atguigu.com/HelloWsImpl/sayHelloResponse"
                    message="tns:sayHelloResponse" />
            </operation>
        </portType>
        -<!-- 
            binding:用于指定SEI的实现类
                type属性引用标签<portType>
                <soap:binding style="document" />绑定的数据是一个document(xml)
                operation:指定实现类的方法
                <soap:operation style="document" />
                input:指定客户端传过来的数据,
                    <soap:body use="literal" />:传输的是一个文本数据    
                output:服务器端输出的数据,
                
         -->
        <binding name="HelloWsImplPortBinding" type="tns:HelloWsImpl">
            <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
                style="document" />
            -
            <operation name="sayHello">
                <soap:operation soapAction="" />
                -
                <input>
                    <soap:body use="literal" />
                </input>
                -
                <output>
                    <soap:body use="literal" />
                </output>
            </operation>
        </binding>
        <!-- 
            service:服务器的一个webservice的容器
            name:指定客户端容器类
            port:指定一个服务器端处理请求的入口(就是SEI的实现)
                binding属性对应一个标签<binding>
                address:当前webService地址
         -->
        <service name="HelloWsImplService">
            
            <port name="HelloWsImplPort" binding="tns:HelloWsImplPortBinding">
                <soap:address location="http://192.168.1.62:8080/day01_ws/hellows" />
            </port>
        </service>
    </definitions>
  • 相关阅读:
    c语言小项目---通讯录2.0
    小练习 打地鼠游戏
    4-20 这是一次失败的小项目 (单链表应用--通讯录)
    4-19 易错点 链表的插入
    小练习 简易双色球模拟器
    【2019.8.22】测试题目订正
    【模板】【P1182】数列分段II——二分答案
    【P2634】聪聪可可——点分治
    【模板】【P3605】【USACO17JAN】Promotion Counting 晋升者计数——动态开点和线段树合并(树状数组/主席树)
    【AcWing 113】【交互】特殊排序——二分
  • 原文地址:https://www.cnblogs.com/liujie-e2/p/7443757.html
Copyright © 2020-2023  润新知