wsdl实例

 1 <?xml version='1.0' encoding='UTF-8'?>
 2 <wsdl:definitions name="HelloWorldService" 
 3     targetNamespace="http://test.demo1/" 
 4     xmlns:ns1="http://schemas.xmlsoap.org/soap/http" 
 5     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
 6     xmlns:tns="http://test.demo1/" 
 7     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
 8     xmlns:xsd="http://www.w3.org/2001/XMLSchema">  
 9   <wsdl:types>  
10     <xs:schema elementFormDefault="unqualified" targetNamespace="http://test.demo1/" version="1.0" xmlns:tns="http://test.demo1/" xmlns:xs="http://www.w3.org/2001/XMLSchema">  
11         <xs:element name="sayHello" type="tns:sayHello"/>  
12         <xs:element name="sayHelloResponse" type="tns:sayHelloResponse"/>  
13         <xs:complexType name="sayHello">  
14             <xs:sequence>  
15               <xs:element minOccurs="0" name="arg0" type="xs:string"/>  
16             </xs:sequence>  
17         </xs:complexType>  
18         <xs:complexType name="sayHelloResponse">  
19             <xs:sequence>  
20               <xs:element minOccurs="0" name="return" type="xs:string"/>  
21             </xs:sequence>  
22         </xs:complexType>  
23     </xs:schema>  
24   </wsdl:types>
25   
26   <wsdl:message name="sayHelloResponse">  
27     <wsdl:part element="tns:sayHelloResponse" name="parameters"></wsdl:part>  
28   </wsdl:message>  
29   <wsdl:message name="sayHello">  
30     <wsdl:part element="tns:sayHello" name="parameters"></wsdl:part>  
31   </wsdl:message> 
32   
33   <wsdl:portType name="HelloWorld">  
34     <wsdl:operation name="sayHello">  
35       <wsdl:input message="tns:sayHello" name="sayHello"></wsdl:input>  
36       <wsdl:output message="tns:sayHelloResponse" name="sayHelloResponse"></wsdl:output>  
37     </wsdl:operation>  
38   </wsdl:portType> 
39   
40   <wsdl:binding name="HelloWorldServiceSoapBinding" type="tns:HelloWorld">  
41     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>  
42     <wsdl:operation name="sayHello">  
43       <soap:operation soapAction="" style="document"/>  
44       <wsdl:input name="sayHello">  
45         <soap:body use="literal"/>  
46       </wsdl:input>  
47       <wsdl:output name="sayHelloResponse">  
48         <soap:body use="literal"/>  
49       </wsdl:output>  
50     </wsdl:operation>  
51   </wsdl:binding>
52   
53   <wsdl:service name="HelloWorldService">  
54     <wsdl:port binding="tns:HelloWorldServiceSoapBinding" name="HelloWorldPort">  
55       <soap:address location="http://localhost:8080/helloWorld"/>  
56     </wsdl:port>  
57   </wsdl:service>  
58 </wsdl:definitions>  

 

转载于:https://www.cnblogs.com/wangyonglong/p/5982786.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值