标签:ring targe name 入参 star ret open body 业务
WSDL文件 文档结构:
0.根元素
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://cmcc.trans"
xmlns:tns="http://cmcc.trans" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://cmcc.trans"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
</wsdl:definitions>
1.Types -->类型定义
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://cmcc.trans">
<!-- 7.2. 开机业务办理 -->
<xsd:element name="startupBusiness"> 业务名称
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="OprNumb" nillable="true" type="xsd:string" /> <!--参数-->
<xsd:element maxOccurs="1" minOccurs="1" name="ContactId" nillable="true" type="xsd:string" /> <!--参数-->
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="startupBusinessResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="return" nillable="true" type="ns1:Result" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="Result">
<xsd:sequence>
<xsd:element minOccurs="0" name="resultCode" nillable="true" type="xsd:string" />
<xsd:element minOccurs="0" name="resultDesc" nillable="true" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
2.Messages (包括函数参数(输入和输出)描述)
<wsdl:message name="startupBusinessRequest">
<wsdl:part name="parameters" element="tns:startupBusiness">
</wsdl:part>
</wsdl:message>
<wsdl:message name="startupBusinessResponse">
<wsdl:part name="parameters" element="tns:startupBusinessResponse">
</wsdl:part>
</wsdl:message>
3.PortTypes (描述函数签名(操作名、输入参数、输出参数))
<wsdl:portType name="SVC_CSVC0000_AbilityOpenPortType">
<wsdl:operation name="startupBusiness">
<wsdl:input name="startupBusinessRequest" message="tns:startupBusinessRequest"></wsdl:input>
<wsdl:output name="startupBusinessResponse" message="tns:startupBusinessResponse"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
4.Bindings(PortTypes每一操作都在此实现)
<wsdl:binding name="SVC_CSVC0000_AbilityOpenHttpBinding" type="tns:SVC_CSVC0000_AbilityOpenPortType">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="startupBusiness">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="startupBusinessRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output name="startupBusinessResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
5.Service(确定每一绑定的端口地址)
<wsdl:service name="SVC_CSVC0000_AbilityOpen">
<wsdl:port name="SVC_CSVC0000_AbilityOpenHttpPort" binding="tns:SVC_CSVC0000_AbilityOpenHttpBinding">
<wsdlsoap:address location="http://localhost:8080/csp/services/SVC_CSVC0000_AbilityOpen" />
</wsdl:port>
</wsdl:service>
这样,各Messages栏使用Types栏的定义,PortTypes栏使用Messages栏的定义;Bindings栏引用了PortTypes栏,Services栏引用Bindings栏,PortTypes和Bindings栏包含了operation元素,而Services栏包含了port元素。PortTypes栏里的operation元素由Bindings栏里的operation元素进一步修改或描述。
标签:ring targe name 入参 star ret open body 业务
原文地址:http://www.cnblogs.com/gyll/p/7429176.html