users@jaxb.java.net

Help : webmethod with interfaces as parameter and return result

From: Prisca Moine <Prisca.Moine_at_Sun.COM>
Date: Wed, 10 May 2006 15:37:26 -0700

Hi,

I am a new JAX-B user, aiming at exposing an EJB as a Web Service. I am
currently facing a problem concerning interfaces: the web method I'd
like to expose have interfaces as parameter and result type :

/*_at_WebMethod
* public *TroubleTicketKey*
createTroubleTicketByValue(*TroubleTicketValue* value)

/where /*TroubleTicketKey */and /*TroubleTicketValue */are interfaces.

As JAX-Bcan't handle with interface, I was looking after a solution
indicating to JAX-B which implementation class should correspond to the
interfaces used.

I already had a look at the JAX-WS forum on
http://forums.java.net/jive/forum.jspa?forumID=46, where I found part of
the solution :
Using the annotation :
@XmlJavaTypeAdapter(value=TroubleTicketValueImplAdapter.class) and the
correspondent class, I solve the problem for /*TroubleTicketValue */but
this problem with interface is recurrent in my case (this method use
many interface defintion) and I ahve not yet found the right solution...

I would really appreciate any help from you. Thanks a lot in advance.

Best regards,
Prisca