users@glassfish.java.net

JAXB bindings: associate web service client with existing entities

From: Xavier Callejas <xavier_at_wflogistics.com>
Date: Tue, 16 Feb 2010 09:33:47 -0600

Hi,

I have a jar package containing my model entities.

I have a JAX-WS web service, I need that its web service client re-use the
same entities classes instead of generating new ones (wsimport).

Is there a way that in the jaxb bindings external file (that I pass to
wsimport) I could define to look up for entities for a specific namespace in a
specific java package instead of declaring every ref class one by one?

For example:

I have a lot of this:

        <bindings scd="x-schema::tns" xmlns:tns="http://namespace.com/model/">
        <bindings scd="~tns:clientes">
            <class ref="com.namespace.model.Clientes"/>
        </bindings>
    </bindings>

for every entity in my jaxb binding external file.

I would like to avoid to write it for every entity in my model, I would like
to tell jaxb compiler to look for the entities in a specific package.

Is this possible?

Thanks.
xavier