Choosing a web service technology to use with Spring 3
After five months development, my boss starts liking my web app. That's great. Now he wants to integrate with another application. Before I did little integrations and I used JSON with some MVC trickery... nothing standard anyway. I wanted to use standard web services, so that I learn them and in the future I would reuse this. 开发者_开发知识库Anyway I'm new to that and seems that during the ages, dozens of technologies have risen and fallen while I was happy somewhere else. The most modern seems JAX-WS 2.0. It seems that Spring has support for it and I'd go for that...
I even tried something from the docs, but as I inserted this in my servlet-context:
<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter">
<property name="baseAddress" value="http://localhost:8080/WebServices/" />
</bean>
my app stopped working: instead of the app, seems that there is another webserver that gives me the WSDL... What's this? Where is my app gone?
Would you recommend JAX-WS 2.0 or something else? Any good tutorial/book?
congrats that your boss likes your application! If you've already got another application with which you'd like to integrate (and indeed, you've already got a schema to conform to), then you should look at Spring WS (http://static.springsource.org/spring-ws/sites/2.0/). Spring WS is a schema-driven approach to web services development. It works with JAXB (and any of the other supported Spring OXM marshallers). Spring WS works naturally alongside a Spring MVC application and of course works perfectly with Spring.
精彩评论