开发者

Get working with WSDL.How to?

I have to implement "service bindings" in a project in my school.

I just learned WSDL from w3schools.com. I 开发者_如何学Ccame to know that "WSDL" is. I know WSDL but I didn't do anything with it. I want to go practical with it. I don't know how to do that.

From where to start? I know there are other things to learn and I don't know what are they.

I need some help in getting "practical". Its just in my mind I don't know how to implement it.


Based on your question I assume you are a little bit confused. You should talk to you teacher (or whoever gave you this assignment) and find what is expected for you to do.

Web services involve a lot of knowledge, WSDL is just one part of it.

As you probably have learned from w3schools, WSDL means Web Services Description Language. It is a way to document a web service's interface to the world.

A web service is accessible from an endpoint address, something like

http://some.server.com/context/bla/whatever

This tells you where to find the web service, it tells you nothing about how to call it (i.e. how are the messages going to be structured for a correct communication).

The WSDL provides you this info: what operations are exposed, how messages are composed, binding used etc.

So that you understand a bit how WSDL "fits" in the entire picture I'm going to use a little story.

Let's say some company wants to offer some online services. They expose these services as a SOAP web service and make it available at address http://some.server.com/context/bla/whatever.

After they advertise their services they have to actually tell their customer how to use the thing. They could send them an e-mail and tell them how to call it or they can write a Word document and tell them how to do it. But that is not practical, and a mail or word document can't be used to generate client code automatically. Some dude will have to write the code by hand... poor bastard.

This is where WSDL comes into play. It is a specification which describes the interface to the service. Beeing an XML file it is a human readable format but more importantly is a format that a machine can read and process and... as you probably guessed by now... can generate client code based on it.

As such, the company does not bother to write e-mails or documents. They document everything in a WSDL file and make that available online (the XML Schema types inside the WSDL... very important... you should read XML Schema).

To simplify things even more you can (usually) find the WSDL at the same address as the web service with just an extra parameter added:

http://some.server.com/context/bla/whatever?wsdl

Based on the WSDL the clients can now generate code that can call the service (in C# with svcutil.exe, in Java with Axis wsdl2code etc).

And Price Charming and Cinderella lived happily ever after... oh... wait.. that's another story :P.

Seriously now.... as I said at the beginning: Talk to you teacher and ask how you are supposed to get practical with WSDL.

Hope this explanation makes it a little bit clearer for you.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜