Generating a WSDL from an XSD file

后端 未结 6 1121
面向向阳花
面向向阳花 2020-11-28 09:13

I need to generate a WSDL file given an XSD file. How do I do this? Can I do this in VS2005? What is the simplest way to do this?

6条回答
  •  抹茶落季
    2020-11-28 10:02

    I know this question is old, but it deserves an answer. I personally prefer to create a WSDL by hand and test for compliance using SoapUI. But sometimes (specially for complex WSDLs), you have three ways to generate one out of an XSD:

    1. Generating a WSDL from a schema using Eclipse (probably the most user-friendly)
    2. Generating a WSDL via CXF (my favorite)
    3. Generating a WSDL via conventions using Spring WS (my least favorite)

    I prefer the CXF approach since I'm a CLI guy. If it has a CLI, you can automate (that's my motto). And I like the Spring WS approach the least since it uses a lot of framework specific conventions.

    There are more people who know CXF (I believe) than Spring WS. So anything that can throw a learning curve for a new engineer (without any clear advantage or ROI) is something I frown upon.

    It should also go w/o saying that any generated WSDL should be tested for validity and compliance (and tweaked till it complies), and that your application publishes a static wsdl (as opposed to returning an auto-generated one.)

    It's been my experience that you start with a WS-I compliant wsdl and then your application auto-generates (and returns to consumers) a non-compliant one.

    In other words, beware of auto magic.

提交回复
热议问题