Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GENERATE WEBSERVICE[JAX-WS] CLIENT JAR FILE USING MAVEN.XML

 
thomas davis
Ranch Hand
Posts: 207
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to generate a ws client[JAX-WS ] bundled into a jar. is where it's at but no one even talks about putting the generated client into a jar!

I am using Maven for builds.

I'd like to set up maven to generate the client (wsimport or clientgen) when we build the service, then add that generated code's jar as a dependency to our client software. Then we don't waste time generating the ws client when it isn't needed

How do I write a maven.xml and build.xml.project.properties?

What else I need to have for generating the client?

can you please give me an example of maven.xml which uses wsimport or clientgen?

And also this should build a jar file which contains the generated classes from wsdl and xsd.

Has anyone addressed this issue before? Any suggestions?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I have done something along those lines in a previous project. I'll see if I can find the pom.xml.
Meanwhile, have you seen this article which describes how to use, among other things, the wsimport Maven plugin? http://blogs.sun.com/enterprisetechtips/entry/using_jax_ws_with_maven
Best wishes!
 
thomas davis
Ranch Hand
Posts: 207
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you please give me some example which generates jar file as well?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
There is a nice, free, book about developing with Maven available here: http://www.sonatype.com/books/m2eclipse-book/reference/
Best wishes!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic