cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: wsdl2java...naming considerations
Date Mon, 26 Jan 2009 15:28:38 GMT

It IS possible, it's just not "easy".   There is a customization that can be 
added to each "type" to define the class name.   See section 7.7 of the JAXB 
sepc.   The problem is that you would need to define a customization for EVER 
SINGLE type you want remapped.   An XSLT or something might be able to do it 
for you semi-automatically.   Not really sure.

Dan


On Monday 26 January 2009 8:53:26 am Cecchi Sandrone wrote:
> Hi all,
> I have a conceptual question for you.
> Let's consider a UserService to manage users in a web application. In this
> service we have for example these methods to expose as WebService:
> - User findUser(String username)
> - List findAllUsers()
> - void registerNewUser(User user)
>
> This service is implemented (server-side) using Hibernate for persistence.
> Obviously, the User object passed to the client can be different from the
> User object that the client want. So, for example, the client application
> builds his own User business object, starting from the User DTO retrieved
> from the Web Service.
>
> My problem is the following: when generating client stub, entity names
> (e.g. User) can be equal for both client and server side. In my app now I
> have:
>
> Client:
>
> org.example.businessobject.User
> org.example.ws.User - Generated from WSDL2Java
>
> Server:
>
> org.example.service.User
>
> So in the client app, the entity User has the same name, that obviously can
> be distinguished using the fully qualified name. Essentially, what I want
> is to mantain client and server class names, customizing the class names
> the wsdl2java creates (for example, calling org.example.ws.User instead
> org.example.ws.UserDTO).
> From what I know it's only possible to customize package <-> namespace
> mappings...is it possible to customize Entity/Class names too?
>
> Thanks in advance for help and suggestions.



-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message