2017-8-25 好记性不如烂笔头之axis之WSDL
2017-08-27 15:37
176 查看
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元素进一步修改或描述。
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元素进一步修改或描述。
相关文章推荐
- 好记性不如烂笔头-手动编译jar包<转>
- 好记性不如烂笔头20-java对oracle的clob和blob字段的总结
- 好记性不如烂笔头46-java拦截器-彻底理解动态代理的概念(1)
- 好记性不如烂笔头(零)
- 好记性不如烂笔头(一)
- 好记性不如烂笔头86-spring3学习(7)-ApplicationContext中bean的生命周期
- 好记性不如烂笔头
- 好记性不如烂笔头之2(vim操作)
- 好记性不如烂笔头,记我在用友ERP重装IIS服务碰到的一些问题和心得。
- 好记性不如烂笔头,记录几个常用的Linux操作
- 好记性不如烂笔头(1)
- 好记性不如烂笔头-总结一下手动打jar包
- 好记性不如烂笔头-解决Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- 好记性不如烂笔头11-WEB应用的HttpServletResponse
- 记性不如烂笔头21-JAVA数据库连接池 DBCP
- 好记性不如烂笔头37-java应用中的监听器Listener(1)
- 好记性不如烂笔头47-java拦截器-用CGLib实现动态代理(2)
- 好记性不如烂笔头87-spring3学习(8)-IoC的理解和比喻
- 【好记性不如烂笔头】常用的图片 文件格式 和 纹理格式
- Start.好记性不如烂笔头