Hello and thanks for your very fine framework. I am trying to implement
WS-Notification support for my application using Muse and jax-ws from the
Metro project.
Is there anyone here that has any experience with this?
I just put together a WS-Notification consumer class using the examples
provided by the muse package, but haven't been able to expose this as a web
service. Take a look at this class:
public class WsNotificationService extends AbstractCapability implements
ConsumerCapability,
NotificationMessageListener {
private static final Log log =
LogFactory.getLog(WsNotificationService.class);
public void initializeCompleted() throws SoapFault {
super.initializeCompleted();
NotificationConsumer wsn = (NotificationConsumer)
getResource().getCapability(WsnConstants.CONSUMER_URI);
wsn.addMessageListener(this);
log.debug("nitialized!!!");
}
public boolean accepts(NotificationMessage message) {
return true;
}
public void process(NotificationMessage message) {
log.debug("Received message:\n\n" + message);
}
}
Now, using the @WebService annotation for web services provided by the
jax-ws framework produces a lot of errorrs, since JAXB (used internally by
jax-ws) can't handle a lot of the classes involved in this implementation:
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 5 counts
of IllegalAnnotationExceptions
org.apache.muse.ws.notification.NotificationMessage is an interface, and
JAXB can't handle interfaces.
this problem is related to the following location:
at org.apache.muse.ws.notification.NotificationMessage
at public org.apache.muse.ws.notification.NotificationMessage
com.jackbe.presto.ec.ws.jaxws.Accepts.arg0
at com.jackbe.presto.ec.ws.jaxws.Accepts
org.apache.muse.ws.notification.NotificationMessage does not have a no-arg
default constructor.
this problem is related to the following location:
at org.apache.muse.ws.notification.NotificationMessage
at public org.apache.muse.ws.notification.NotificationMessage
com.jackbe.presto.ec.ws.jaxws.Accepts.arg0
at com.jackbe.presto.ec.ws.jaxws.Accepts
org.apache.muse.ws.addressing.EndpointReference does not have a no-arg
default constructor.
this problem is related to the following location:
at org.apache.muse.ws.addressing.EndpointReference
at public abstract org.apache.muse.ws.addressing.EndpointReference
org.apache.muse.ws.notification.NotificationMessage.getProducerReference()
at org.apache.muse.ws.notification.NotificationMessage
at public org.apache.muse.ws.notification.NotificationMessage
com.jackbe.presto.ec.ws.jaxws.Accepts.arg0
at com.jackbe.presto.ec.ws.jaxws.Accepts
org.w3c.dom.Element is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at org.w3c.dom.Element
at public org.w3c.dom.Element
com.jackbe.presto.ec.ws.jaxws.SoapFaultBean.detail
at com.jackbe.presto.ec.ws.jaxws.SoapFaultBean
org.w3c.dom.Element does not have a no-arg default constructor.
this problem is related to the following location:
at org.w3c.dom.Element
at public org.w3c.dom.Element
com.jackbe.presto.ec.ws.jaxws.SoapFaultBean.detail
at com.jackbe.presto.ec.ws.jaxws.SoapFaultBean
Of course this a quick shot at the problem and I might be totally missing
the target, that's why I am asking here.
If anyone has any experience or can provide any pointer, I will greatly
appreciate it.
Thanks in advance,
Alejandro Escalante Medina
Visita mi página personal en http://weblocked.blogsome.com/