On Sun November 15 2009 11:24:58 pm Andres Olarte wrote: > This is probably a very basic question, but here it goes: > > I developing both the server and a client for some web services. When I > run wsdl2java, all of the classes that the client can receive from the > client are generated, along with the classes to call the web service. All > of this is working properly. > > My question is this... since I have access to the same classes in the > client as in the server, does it make sense to reuse those classes instead > of using the ones generated by cxf? Is it even possible?
It's quite possible and is definitely a common thing to do. A lot of people have a "common" jar that contains the interfaces and the data objects and then have separate "client" and "server" jars/wars that pull in the common jar. The only "gotcha" when doing so is that you have to be a bit more careful with the SEI interface and such and make sure EVERYTHING is completely annotated properly. Make sure the namespace is set in the @WebService, make sure the @WebParams are there with names defined, etc... If you don't, you can end up with some hard-to-track-down issues where the client is sending something slightly different than what the server is expecting. Dan > > The classes in question are simple pojos: fields, getters, setters and > that's it. > > Thanks a lot. > > Andres > -- Daniel Kulp [email protected] http://www.dankulp.com/blog
