vendredi 20 février 2015

JAXB Web Service - Method with Interfaces

I'm having a problem with my Java application at the moment. I have set a web service and in my server side I have two methods that receive (parameter) an interface. Something like this:



@WebMethod()
public void webAddSocketListener(InterfaceListener asl) {
// Adds a socket listener interface to a list.
MyClass.addSocketListener(asl);
}


@WebMethod()
public void webRemoveSocketListener(InterfaceListener asl) {
// Removes a socket listener interface from a list.
MyClass.removeSocketListener(asl);
}


Basically everytime I try and publish these methods I get the error:



*InterfaceListener is an interface, and JAXB can't handle interfaces.*


Please let me know if there is any way to turn this around, Thank you very much.





Aucun commentaire:

Enregistrer un commentaire