How to initialize Spring Framework inside JAX-WS Service

Java/JEE

This page describes how to write a JAX-WS, Spring Framework based web service.

JAX-WS makes it easier to write web services in Java. It shilds the programmer from implementation
specifics just like JDBC API did for databases.

The two popular implementations out there are the Apache CXF and the Java Reference Implementation. This page describes an application that will run on both.

The project will be tested in Tomcat 6 with the Reference Implementation and we will move to JBoss that has a built in CXF implementation.

Few Notes about the application servers

  • Tomcat 6 does not ship with JAX-WS RI (needs to be installed) or the Spring Framework (needs to be included in the WAR)
  • JBoss 5.1 has the CXF and Spring Framework built in to the server. Therefore don’t provide your own JAX-WS or spring implementation JARS.
  • The Spring application context should be initialized first. Use the ContextLoaderListener…

View original post 307 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s