JAVA調(diào)用webservice,當(dāng)你剛開始接觸的時(shí)候你會(huì)覺得它是一個(gè)惡夢(mèng),特別是沒有一個(gè)統(tǒng)一的標(biāo)準(zhǔn)實(shí)現(xiàn),比起.net的那些幾步就可以完成的webservice實(shí)現(xiàn),我們看著JAVA的實(shí)現(xiàn)真是傷心啊。但就算是傷心,我們也還是要完成的。JAVA也不乏比較好的實(shí)現(xiàn),如xfire,jersey,CXF。 這里我們就一起來看一下xfire的實(shí)現(xiàn)。
1)首先,當(dāng)然是要下包啦,這個(gè)普通人都知道。http://xfire.codehaus.org/Download可以到這里去下,可以下all也可以下distribution。但建議還是下all的,免得一堆奇怪的問題搞得你一點(diǎn)信心都沒了。
包弄下來了那么怎么辦呢?放進(jìn)項(xiàng)目里啊。貌似廢話,但很多人就是不知道下下來要干什么用。
建一個(gè)新項(xiàng)目,比較我的是xfireWebservice,這里當(dāng)然是建web項(xiàng)目啦。
我這里是把它所有的包都放到這里面了,畢竟我們寫例子,就沒必要挑三揀四了,隨便點(diǎn)吧,如果想看看異常信息的朋友可以不把全部放進(jìn)去,慢慢地加入,以后遇到錯(cuò)誤也好排除,但我們這里就不那么做了,畢竟一般缺少什么類那些的異常沒什么難看的,大家可以自己排除。
2)我們首先來了解一下xfire與其他webservice框架的不同,它最大的不同之處在于它需要一個(gè)接口,而且如果需要用xfire來調(diào)用相應(yīng)的webservice必須知道接口的定義,感覺這里有點(diǎn)限制了。但除了這點(diǎn),xfire調(diào)用webservice,那是相當(dāng)?shù)姆奖悖透{(diào)用本地方法一樣。我們直接來看例子:
首先是最重要的接口:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
public interface IReaderService { public Reader getReader(String name,String password); public List<Reader> getReaders(); } 有接口,當(dāng)然也要有實(shí)現(xiàn)類,不然接口就沒什么意義了。 public class ReaderService implements IReaderService{ public Reader getReader(String name,String password) { return new Reader(name,password); } public List<Reader> getReaders(){ List<Reader> readerList = new ArrayList<Reader>(); readerList.add( new Reader( "shun1" , "123" )); readerList.add( new Reader( "shun2" , "123" )); return readerList; } } |
也看一下JAVABEAN,Reader類:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
public class Reader{ private static final long serialVersionUID = 1L; private String name; private String password; public Reader(){} public Reader(String name,String password) { this .name = name; this .password = password; } //Get/Set方法省略 public String toString(){ return "Name:" +name+ ",Password:" +password; } } |
注意,我們這里的Reader類實(shí)現(xiàn)了Serializable接口,為什么呢?這里,首先我們需要了解webservice的原理,對(duì)于JAVA來講,如果我們需要在互聯(lián)網(wǎng)上傳對(duì)象,很多人當(dāng)然會(huì)想到序列化,對(duì)了,這里就是序列化,因?yàn)槲覀冃枰裷eader作為參數(shù)來傳遞。這在以前的版本中是需要強(qiáng)制實(shí)現(xiàn),否則會(huì)報(bào)錯(cuò),但現(xiàn)在的最新的版本(其實(shí)最新的也是07年的,因?yàn)閤fire已經(jīng)停止開發(fā),被apache合并為CXF項(xiàng)目,這個(gè)我們之后再講)已經(jīng)不需要了,至于是用什么方式實(shí)現(xiàn)的,我們這里暫時(shí)不深究,因?yàn)樗呀?jīng)被合并到CXF中,我們?nèi)绻钊雽W(xué)習(xí),應(yīng)該學(xué)習(xí)CXF較好。
3)當(dāng)我們完成上面的接口和JAVABEAN的編寫后,很多人會(huì)問,我看很多webservice都會(huì)有WSDL文件,那你這個(gè)怎么來的?在講這個(gè)之前,我們來討論一下什么是WSDL。也許很多公司提供的接口都還是只是一個(gè)HTTP地址,返回XML這樣的格式,我們的也是。這有一個(gè)好處,也有一個(gè)壞處。好處是我們開發(fā)的難度小了,而壞處是我們需要提供給用戶一堆說明文件,每個(gè)返回的XML標(biāo)簽是什么意思,這倒也沒啥,但就是比較煩而已。而webservice呢,壞處就是我們開發(fā)的東西稍微多了點(diǎn),而好處是我們不用再寫那么多說明文件,因?yàn)橛幸粋€(gè)統(tǒng)一的說明,叫WSDL,這個(gè)是webservice的說明文檔,是統(tǒng)一的,無論什么語言都一樣,所以不存在誰看不懂的問題。
而這里,當(dāng)我們部署完成xfire后,它就可以幫我們生成WSDL文件。
問題是怎么部署,這個(gè)其實(shí)也簡單。我們?cè)趕rc目錄下新建一個(gè)文件夾META-INF,再建它的一個(gè)字文件夾xfire,里面建立文件services.xml。之后的結(jié)構(gòu)如下:
有人會(huì)問為什么要建到src目錄下,其實(shí)不是規(guī)定建到這里的,但因?yàn)槲覀冃枰岄_發(fā)工具幫我們自己部署這幾個(gè)文件,所以我們放到這里,eclipse就可以幫我們自己部署到tomcat或者其他的容器中。注意,這個(gè)文件所在文件夾層次是固定的,不可以修改。
我們直接看一下servics.xml:
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<? xml version = "1.0" encoding = "UTF-8" ?> < beans xmlns = "http://xfire.codehaus.org/config/1.0" > < service > <!-- webserviceq名稱,調(diào)用時(shí)需要指定這個(gè) --> < name >readerService</ name > <!-- 這個(gè)一般是自己公司的網(wǎng)址,意義不大 --> < namespace >http://test/HelloService</ namespace > <!-- 接口類 --> < serviceClass >com.xfire.servlet.IReaderService</ serviceClass > <!-- 實(shí)現(xiàn)類 --> < implementationClass >com.xfire.servlet.ReaderService</ implementationClass > </ service > </ beans > |
看著注釋一般都沒問題的。
4)很多人以為這樣就行了,不,還沒行,你指定了這個(gè),那別人怎么訪問呢。怎么把相應(yīng)的請(qǐng)求轉(zhuǎn)發(fā)到xfire那里,讓它進(jìn)行處理呢。這里又需要修改web.xml了。
修改后如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
<? xml version = "1.0" encoding = "UTF-8" ?> < web-app xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns = "http://java.sun.com/xml/ns/javaee" xmlns:web = "http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id = "WebApp_ID" version = "3.0" > < servlet > < servlet-name >XFireServlet</ servlet-name > < servlet-class >org.codehaus.xfire.transport.http.XFireConfigurableServlet</ servlet-class > </ servlet > < servlet-mapping > < servlet-name >XFireServlet</ servlet-name > < url-pattern >/services/*</ url-pattern > </ servlet-mapping > </ web-app > |
其實(shí)也就是添加了一個(gè)servlet和對(duì)應(yīng)的mapping。接下來,我們?cè)跒g覽器上直接輸入:
1
|
http://localhost:8080/xfireWebService/services/readerService?wsdl |
我們可以看到:
這里顯示的就是wsdl,它會(huì)顯示我們定義的方法,返回的類型。后面有對(duì)WSDL的講解。
5)上面四步完成后,我們就完成了webservice的部署了。別人就可以調(diào)用相應(yīng)的webservice來訪問我們的方法了。下面我們就用xfire提供的client來訪問一下我們剛才發(fā)布的webservice:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
public class ReaderClient { public static void main(String[] args) { //這里是創(chuàng)建一個(gè)service,需要傳入一個(gè)接口類,因?yàn)槲覀兒竺姹仨氄{(diào)用相應(yīng)的接口方法 Service srcModel = new ObjectServiceFactory().create(IReaderService. class ); //代理工廠,這里是為了后面創(chuàng)建相應(yīng)的接口類 XFireProxyFactory factory = new XFireProxyFactory(XFireFactory.newInstance().getXFire()); //webservice地址,不需要加wsdl String readerServiceUrl = "http://localhost:8080/xfireWebService/services/readerService" ; try { //利用工廠返回相應(yīng)的接口類 IReaderService readerService = (IReaderService)factory.create(srcModel,readerServiceUrl); Reader reader = readerService.getReader( "shun" , "123" ); System.out.println(reader); } catch (MalformedURLException e) { e.printStackTrace(); } } } |
這樣,我們看到輸出結(jié)果為:
wsdl文件結(jié)構(gòu)分析
WSDL (Web Services Description Language,Web服務(wù)描述語言)是一種XML Application,他將Web服務(wù)描述定義為一組服務(wù)訪問點(diǎn),客戶端可以通過這些服務(wù)訪問點(diǎn)對(duì)包含面向文檔信息或面向過程調(diào)用的服務(wù)進(jìn)行訪問(類似遠(yuǎn)程過程調(diào)用)。WSDL首先對(duì)訪問的操作和訪問時(shí)使用的請(qǐng)求/響應(yīng)消息進(jìn)行抽象描述,然后將其綁定到具體的傳輸協(xié)議和消息格式上以最終定義具體部署的服務(wù)訪問點(diǎn)。相關(guān)的具體部署的服務(wù)訪問點(diǎn)通過組合就成為抽象的Web服務(wù)。 本文將詳細(xì)講解WSDL文檔的結(jié)構(gòu),并分析每個(gè)元素的作用。
一:WSDL定義
WSDL是一個(gè)用于精確描述Web服務(wù)的文檔,WSDL文檔是一個(gè)遵循WSDL XML模式的XML文檔。WSDL 文檔將Web服務(wù)定義為服務(wù)訪問點(diǎn)或端口的集合。在 WSDL 中,由于服務(wù)訪問點(diǎn)和消息的抽象定義已從具體的服務(wù)部署或數(shù)據(jù)格式綁定中分離出來,因此可以對(duì)抽象定義進(jìn)行再次使用:消息,指對(duì)交換數(shù)據(jù)的抽象描述;而端口類型,指操作的抽象集合。用于特定端口類型的具體協(xié)議和數(shù)據(jù)格式規(guī)范構(gòu)成了可以再次使用的綁定。將Web訪問地址與可再次使用的綁定相關(guān)聯(lián),可以定義一個(gè)端口,而端口的集合則定義為服務(wù)。
一個(gè)WSDL文檔通常包含7個(gè)重要的元素,即types、import、message、portType、operation、binding、 service元素。這些元素嵌套在definitions元素中,definitions是WSDL文檔的根元素。文章的下一部分將會(huì)詳細(xì)介紹WSDL 的基本結(jié)構(gòu)。
二:WSDL的基本結(jié)構(gòu)--概述
如第一部分最后描述的那樣,一個(gè)基本的WSDL文檔包含7個(gè)重要的元素。下面將分別介紹這幾個(gè)元素以及他們的作用。
WSDL 文檔在Web服務(wù)的定義中使用下列元素:
· Types - 數(shù)據(jù)類型定義的容器,它使用某種類型系統(tǒng)(一般地使用XML Schema中的類型系統(tǒng))。
· Message - 通信消息的數(shù)據(jù)結(jié)構(gòu)的抽象類型化定義。使用Types所定義的類型來定義整個(gè)消息的數(shù)據(jù)結(jié)構(gòu)。
· Operation - 對(duì)服務(wù)中所支持的操作的抽象描述,一般單個(gè)Operation描述了一個(gè)訪問入口的請(qǐng)求/響應(yīng)消息對(duì)。
· PortType - 對(duì)于某個(gè)訪問入口點(diǎn)類型所支持的操作的抽象集合,這些操作可以由一個(gè)或多個(gè)服務(wù)訪問點(diǎn)來支持。
· Binding - 特定端口類型的具體協(xié)議和數(shù)據(jù)格式規(guī)范的綁定。
· Port - 定義為協(xié)議/數(shù)據(jù)格式綁定與具體Web訪問地址組合的單個(gè)服務(wù)訪問點(diǎn)。
· Service- 相關(guān)服務(wù)訪問點(diǎn)的集合。
WSDL的xml schema可以參照如下網(wǎng)址:http://schemas.xmlsoap.org/wsdl/
三:WSDL的基本結(jié)構(gòu)--詳述
本節(jié)將通過一個(gè)例子詳細(xì)描述WSDL文檔每個(gè)元素的作用。下面一個(gè)例子是一個(gè)簡單的WSDL文檔的內(nèi)容,該文檔的產(chǎn)生可以參見我的另外一篇文章:xfire開發(fā)實(shí)例--HelloWorld篇 。
一個(gè)簡單的Web Service的WSDL文檔,該服務(wù)支持名為sayHello的唯一操作,該操作通過在http上運(yùn)行SOAP協(xié)議來實(shí)現(xiàn)的。該請(qǐng)求接受一個(gè)字符串name,經(jīng)過處理后返回一個(gè)簡單的字符串。文檔如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
<? xml version = "1.0" encoding = "UTF-8" ?> < wsdl:definitions targetNamespace = "http://com.liuxiang.xfireDemo/HelloService" xmlns:tns = "http://com.liuxiang.xfireDemo/HelloService" xmlns:wsdlsoap = "http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12 = "http://www.w3.org/2003/05/soap-envelope" 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:types > < xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema" attributeFormDefault = "qualified" elementFormDefault = "qualified" targetNamespace = "http://com.liuxiang.xfireDemo/HelloService" > < xsd:element name = "sayHello" > < xsd:complexType > < xsd:sequence > < xsd:element maxOccurs = "1" minOccurs = "1" name = "name" nillable = "true" type = "xsd:string" /> </ xsd:sequence > </ xsd:complexType > </ xsd:element > < xsd:element name = "sayHelloResponse" > < xsd:complexType > < xsd:sequence > < xsd:element maxOccurs = "1" minOccurs = "1" name = "out" nillable = "true" type = "xsd:string" /> </ xsd:sequence > </ xsd:complexType > </ xsd:element > </ xsd:schema > </ wsdl:types > < wsdl:message name = "sayHelloResponse" > < wsdl:part name = "parameters" element = "tns:sayHelloResponse" /> </ wsdl:message > < wsdl:message name = "sayHelloRequest" > < wsdl:part name = "parameters" element = "tns:sayHello" /> </ wsdl:message > < wsdl:portType name = "HelloServicePortType" > < wsdl:operation name = "sayHello" > < wsdl:input name = "sayHelloRequest" message = "tns:sayHelloRequest" /> < wsdl:output name = "sayHelloResponse" message = "tns:sayHelloResponse" /> </ wsdl:operation > </ wsdl:portType > < wsdl:binding name = "HelloServiceHttpBinding" type = "tns:HelloServicePortType" > < wsdlsoap:binding style = "document" transport = "http://schemas.xmlsoap.org/soap/http" /> < wsdl:operation name = "sayHello" > < wsdlsoap:operation soapAction = "" /> < wsdl:input name = "sayHelloRequest" > < wsdlsoap:body use = "literal" /> </ wsdl:input > < wsdl:output name = "sayHelloResponse" > < wsdlsoap:body use = "literal" /> </ wsdl:output > </ wsdl:operation > </ wsdl:binding > < wsdl:service name = "HelloService" > < wsdl:port name = "HelloServiceHttpPort" binding = "tns:HelloServiceHttpBinding" > < wsdlsoap:address location = "http://localhost:8080/xfire/services/HelloService" /> </ wsdl:port > </ wsdl:service > </ wsdl:definitions > |
types元素使用XML模式語言聲明在WSDL文檔中的其他位置使用的復(fù)雜數(shù)據(jù)類型與元素;
import元素類似于XML模式文檔中的import元素,用于從其他WSDL文檔中導(dǎo)入WSDL定義;
message元素使用在WSDL文檔的type元素中定義或在import元素引用的外部WSDL文檔中定義的XML模式的內(nèi)置類型、復(fù)雜類型或元素描述了消息的有效負(fù)載;
portType元素和operation元素描述了Web服務(wù)的接口并定義了他的方法。portType元素和operation元素類似于java接口中定義的方法聲明。operation元素使用一個(gè)或者多個(gè)message類型來定義他的輸入和輸出的有效負(fù)載;
Binding元素將portType元素和operation元素賦給一個(gè)特殊的協(xié)議和編碼樣式;
service元素負(fù)責(zé)將Internet地址賦給一個(gè)具體的綁定;
1、definitions元素
所有的WSDL文檔的根元素均是definitions元素。該元素封裝了整個(gè)文檔,同時(shí)通過其name提供了一個(gè)WSDL文檔。除了提供一個(gè)命名空間外,該元素沒有其他作用,故不作詳細(xì)描述。
下面的代碼是一個(gè)definitions元素的結(jié)構(gòu):
1
2
3
4
5
6
7
8
9
10
11
|
< wsdl:definitions targetNamespace = "http://com.liuxiang.xfireDemo/HelloService" xmlns:tns = "http://com.liuxiang.xfireDemo/HelloService" xmlns:wsdlsoap = "http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12 = "http://www.w3.org/2003/05/soap-envelope" 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 > |
2、types元素
WSDL采用了W3C XML模式內(nèi)置類型作為其基本類型系統(tǒng)。types元素用作一個(gè)容器,用于定義XML模式內(nèi)置類型中沒有描述的各種數(shù)據(jù)類型。當(dāng)聲明消息部分的有效負(fù)載時(shí),消息定義使用了在types元素中定義的數(shù)據(jù)類型和元素。在本文的WSDL文檔中的types定義:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
< wsdl:types > < xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema" attributeFormDefault = "qualified" elementFormDefault = "qualified" targetNamespace = "http://com.liuxiang.xfireDemo/HelloService" > < xsd:element name = "sayHello" > < xsd:complexType > < xsd:sequence > < xsd:element maxOccurs = "1" minOccurs = "1" name = "name" nillable = "true" type = "xsd:string" /> </ xsd:sequence > </ xsd:complexType > </ xsd:element > < xsd:element name = "sayHelloResponse" > < xsd:complexType > < xsd:sequence > < xsd:element maxOccurs = "1" minOccurs = "1" name = "out" nillable = "true" type = "xsd:string" /> </ xsd:sequence > </ xsd:complexType > </ xsd:element > </ xsd:schema > </ wsdl:types > |
上面是數(shù)據(jù)定義部分,該部分定義了兩個(gè)元素,一個(gè)是sayHello,一個(gè)是sayHelloResponse:
sayHello:定義了一個(gè)復(fù)雜類型,僅僅包含一個(gè)簡單的字符串,將來用來描述操作的參入傳入部分;
sayHelloResponse:定義了一個(gè)復(fù)雜類型,僅僅包含一個(gè)簡單的字符串,將來用來描述操作的返回值;
3、import元素
import元素使得可以在當(dāng)前的WSDL文檔中使用其他WSDL文檔中指定的命名空間中的定義元素。本例子中沒有使用import元素。通常在用戶希望模塊化WSDL文檔的時(shí)候,該功能是非常有效果的。
import的格式如下:
1
|
< wsdl:import namespace = "http://xxx.xxx.xxx/xxx/xxx" location = "http://xxx.xxx.xxx/xxx/xxx.wsdl" /> |
必須有namespace屬性和location屬性:
namespace屬性:值必須與正導(dǎo)入的WSDL文檔中聲明的targetNamespace相匹配;
location屬性:必須指向一個(gè)實(shí)際的WSDL文檔,并且該文檔不能為空。
4、message元素
message元素描述了Web服務(wù)使用消息的有效負(fù)載。message元素可以描述輸出或者接受消息的有效負(fù)載;還可以描述SOAP文件頭和錯(cuò)誤detail元素的內(nèi)容。定義message元素的方式取決于使用RPC樣式還是文檔樣式的消息傳遞。在本文中的message元素的定義,本文檔使用了采用文檔樣式的消息傳遞:
1
2
3
4
5
6
|
< wsdl:message name = "sayHelloResponse" > < wsdl:part name = "parameters" element = "tns:sayHelloResponse" /> </ wsdl:message > < wsdl:message name = "sayHelloRequest" > < wsdl:part name = "parameters" element = "tns:sayHello" /> </ wsdl:message > |
該部分是消息格式的抽象定義:定義了兩個(gè)消息sayHelloResponse和sayHelloRequest:
sayHelloRequest:sayHello操作的請(qǐng)求消息格式,由一個(gè)消息片斷組成,名字為parameters,元素是我們前面定義的types中的元素;
sayHelloResponse:sayHello操作的響應(yīng)消息格式,由一個(gè)消息片斷組成,名字為parameters,元素是我們前面定義的types中的元素;
如果采用RPC樣式的消息傳遞,只需要將文檔中的element元素應(yīng)以修改為type即可。
5、portType元素
portType元素定義了Web服務(wù)的抽象接口。該接口有點(diǎn)類似Java的接口,都是定義了一個(gè)抽象類型和方法,沒有定義實(shí)現(xiàn)。在WSDL中, portType元素是由binding和service元素來實(shí)現(xiàn)的,這兩個(gè)元素用來說明Web服務(wù)實(shí)現(xiàn)使用的Internet協(xié)議、編碼方案以及 Internet地址。
一個(gè)portType中可以定義多個(gè)operation,一個(gè)operation可以看作是一個(gè)方法,本文中WSDL文檔的定義:
1
2
3
4
5
6
7
8
|
< wsdl:portType name = "HelloServicePortType" > < wsdl:operation name = "sayHello" > < wsdl:input name = "sayHelloRequest" message = "tns:sayHelloRequest" /> < wsdl:output name = "sayHelloResponse" message = "tns:sayHelloResponse" /> </ wsdl:operation > </ wsdl:portType > |
portType定義了服務(wù)的調(diào)用模式的類型,這里包含一個(gè)操作sayHello方法,同時(shí)包含input和output表明該操作是一個(gè)請(qǐng)求/響應(yīng)模式,請(qǐng)求消息是前面定義的sayHelloRequest,響應(yīng)消息是前面定義的sayHelloResponse。input表示傳遞到Web服務(wù)的有效負(fù)載,output消息表示傳遞給客戶的有效負(fù)載。
6、binding
binding元素將一個(gè)抽象portType映射到一組具體協(xié)議(SOAO和HTTP)、消息傳遞樣式、編碼樣式。通常binding元素與協(xié)議專有的元素和在一起使用,本文中的例子:
1
2
3
4
5
6
7
8
9
10
11
12
|
< wsdl:binding name = "HelloServiceHttpBinding" type = "tns:HelloServicePortType" > < wsdlsoap:binding style = "document" transport = "http://schemas.xmlsoap.org/soap/http" /> < wsdl:operation name = "sayHello" > < wsdlsoap:operation soapAction = "" /> < wsdl:input name = "sayHelloRequest" > < wsdlsoap:body use = "literal" /> </ wsdl:input > < wsdl:output name = "sayHelloResponse" > < wsdlsoap:body use = "literal" /> </ wsdl:output > |