I am going to check into this (the mini stuff) to see what I can do. I will come with more info.
Thanks, Alejandro Escalante Medina Visita mi página personal en http://weblocked.blogsome.com/ On Wed, Apr 1, 2009 at 12:56 AM, Chris Twiner <[email protected]>wrote: > On Wed, Apr 1, 2009 at 3:32 AM, Alejandro Escalante Medina > <[email protected]> wrote: > > 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. > > I'm not sure how jax-ws helps with this, but that may be my lack of > experience with it. > > > 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); > > } > > > > } > > The above class looks good. > > > 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. > > > > Of course this a quick shot at the problem and I might be totally missing > > the target, that's why I am asking here. > > Muse provides its own internal structure for marshalling and > unmarshalling of xml, the only thing it needs is integeration with a > servlet of some kind. Perhaps appropriate for your case (using metro) > is to use the soap mini Muse environment (a simple servlet) and > register it in the same web.xml as metro. >
