Skip to main content

wsgen : expose webmethod with interfaces as result and parameter types

2 replies [Last post]
Joined: 2006-03-30


I would like to expose an existing ejb as a Web Service. I am using wsgen to generate the needed artifacts.
The Web Method header is the following :

public TroubleTicketKey createTroubleTicketByValue(TroubleTicketValue value)

where the return type, TroubleTicketKey is an interface AND the parameter type, TroubleTicketValue is also an interface.

Looking throughout the forum, I've found many topics relating to this issue :

So, I have tried many solutions but in each case, I could not handle with the two interfaces at the same time. In fact :

public TroubleTicketKey createTroubleTicketByValue(TroubleTicketValue value) throws ...

The "XmlJavaTypeAdapter" can only be added once, so I can solve the problem of the parameter but not the one of the return value.

I have also tried with @XmlElement(type=TroubleTicketKeyImpl.class) whitout result...

I do not see tha right solution to such a problem, I would appreciate to have any help on it.

Thanks in advance,

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-03-30

Yes, I was about to put the link...

But my solution involves the modification of the Java Interface, what I finally was able to do. I still have no solution when the Interface is part of a package you can't access... Not really a problem in my work but just curiosity !

Thanks Kohsuke.

Joined: 2003-06-09

I believe you found a solution in