spring-ws and contract-first approach

≡放荡痞女 提交于 2019-12-13 04:35:52

问题


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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/21518851/spring-ws-and-contract-first-approach

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!