开发者

Determining methods available in a web service by examining the WSDL file

开发者 https://www.devze.com 2023-04-07 07:35 出处:网络
(I am fairly new to web services, kindly ex开发者_高级运维cuse any incorrect terminology) Given a WSDL URL, how does one determine what methods are available in that web service by looking at the sou

(I am fairly new to web services, kindly ex开发者_高级运维cuse any incorrect terminology)

Given a WSDL URL, how does one determine what methods are available in that web service by looking at the source of the WSDL file?

Also, how does one construct a SOAP response to use with the WSDL file to post data back to the web service?


I think what you ask is how to interpret a wsdl. Following articles[1][2] may help you.

[1] http://wso2.org/library/2873

[2] http://wso2.org/library/2935


Unlike the others, I'm not going to go into details about the WSDL file and how you can read it. You will eventually learn all of that by yourself by reading books, articles, experimenting with web services etc.

What I'm going to do is recommend you a very simple to use, yet powerful tool, than must be in the toolbox of every web service developer (especially someone new to web services): SoapUI.

You create a simple project in SoapUI and point it to the WSDL file of the web service. It will discover the operations, create sample request and response messages, create mocks of the web service and much more.

You can then look at the WSDL code and with the help of what's presented inside SoapUI discover which elements are involved in each method.


Just open this url to WSDL (looks like http://host:port/ddfdgfgd?wsdl) in your browser or download it to file. Find all WSDL sections portType (portType is similar Java interface). All WSDL port types contains operations linked to input/output messages. These messages linked with XSD elements or types (it depends SOAP encoding type).

Also you can import WSDL with Java with wsimport command line tool and implement client or server side.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号