开发者

WSDL: would you write it or generate it?

I know that there are two ways of creating web services:

  1. Write wsdl first and generate j开发者_开发问答ava interface using web services tools like wsdl2java
  2. Write java code first and then use tool to generate wsdl.

For me, the first method looks complex and second looks quite easy relatively. If so, I want to know

  1. When is the first method used? Give me scenario where the first method is preferred over second.
  2. What is the advantage of first method over second?
  3. Which is the method which is widely used in industry for application programming?
  4. If I am looking for a job in web services development, is it necessary for me to know how to write wsdl file for given requirements.


Sometimes you need to declare the interface upfront before you have any implementation - for example you might have to negotiate it with the customer so that he can start coding against it ASAP. Then you start with WSDL.

If you don't need to have a WSDL representation as early as possible you can follow whatever procedure is convenient for you. For example, if you develop an ASP.NET web service it's quite convenient to just write C# code and have the runtime to generate the WSDL on consumer request.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜