I'm unsure, but if I understand you correctly, you have control over
both the server and the client, but you seem to want to run wsdl2java
twice--once for the server, once for the client.

I believe though you can have wsdl2java generate both server and client
code at once--they have a very high overlap, if I'm not mistaken.  If
so, you can move the compile the wsdl2java results into a separate JAR
file, and have both your client and server code reference it via a
dependency.  That would seem to be more robust and faster than running
wsdl2java twice.

There is an issue, however, of files relevant for one but not the other.
If that is a major issue, perhaps creating two JAR files (one for
client, one for server) and specifying which parts are to be excluded
from both might work.  At this stage, however, I'm still pretty much a
Maven newbie and am not certain how to proceed.

HTH,
Glen

Am Mittwoch, den 05.09.2007, 10:44 +0200 schrieb Fredrik Jonson:
> Hi,
> 
> I posted the following on the maven mailing list, but maybe I was too
> much off topic there as I got no response. 
> 
> My question is, what's the best practice when it comes to setting up
> interdependency for a web service client project in Maven 2?
> 
> I have a module that provides a web service, a maven war project using
> CXFServlet. In that module I generate a wsdl file using the java2wsdl
> target from the cxf-codegen-plugin. Works perfectly of course.
> 
> Now, I want to set up a client module too. The client module is not
> strictly dependent on the jar of the service provider module, so it
> doesn't seem to be a normal dependency.
> 
> I suppose could just copy the generated wsdl manually from the provider
> module somewhere into the client module src directory and generate
> classes with the wsdl2java target and build against that. This seems
> doable, but I'm wondering if there isn't a smarter way - I'm rather
> newbieish both to m2 and cxf so I would almost expect that I've missed
> some clever way to solve this.
> 
> Any pointers greatfully appreciated! How do you people solve it?
> 

Reply via email to