Wednesday, June 9, 2010

WSIMPORT configuration in Maven

While developing a webservice client, we need to generate the client stub from the wsdl. There are many ways of doing this. One way is to use the Maven wsimport plugin.

Below is the way how we do it.

Use "mvn -P wsimport" generate a fresh JAX-WS client, then check that client
into subversion as source. Whenever the service contract changes, run mvn wsimport again. (Each time you
run it with the wsimport profile, maven will clean the source folder and regenerate all the JAX-WS client Javas)

Use the following link to learn how to make a Spring config for Spring-loading the JAX-WS client:

Note: if you don't specify the wsimport profile with the "mvn -P wsimport" command, then this module simply builds
a straight java jar. This nice selective build feature of maven lets us checkin the jaxws java artifacts to
subversion, and lets us control when we do new java generation only when the service interface changes.





<!-- <xauthFile>${basedir}/src/main/resources/authFile</xauthFile> -->

<!-- if you want to use a specific version of JAX-WS, you can do so like this -->



No comments:

Post a Comment