spring-ws and contract-first approach

2019-08-28 21:08发布

In spring-ws reference documentation, they say that it uses a contract-first approach (i.e. WSDL comes first), and that spring-ws even doesn't support a contract-last approach. But then, in the first example (page 15), a Java class is created, annotated with @Endpoint, and the WSDL is generated afterwards.

So, isn't it contract-last approach?

2条回答
Ridiculous、
2楼-- · 2019-08-28 21:30

Spring-WS stands for Spring Web Services. Spring-WS focuses on document driven Web Services i.e. Contract-first development approach. Spring-WS aims at providing the best features of Web services along with the proven features of Spring like dependency injection, powerful mappings, support to ws-security etc..Spring-WS, the service contract can usually be generated automatically. But you must create the data contract yourself

查看更多
smile是对你的礼貌
3楼-- · 2019-08-28 21:32

It's always a discussion if it's first or last. But you've got to start somewhere. I don't know exactly what you are referring to, but mostly the WSDL is generated based on the XSD. You might even have used the XSD to generate Java classes based on the elements in it. Those classes can be used for your endpoint mappings.

查看更多
登录 后发表回答