|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Using muse with metro project (jax-ws)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/ |
|
|
Re: Using muse with metro project (jax-ws)On Wed, Apr 1, 2009 at 3:32 AM, Alejandro Escalante Medina
<alex.escalante@...> 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. |
|
|
Re: Using muse with metro project (jax-ws)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 <chris.twiner@...>wrote: > On Wed, Apr 1, 2009 at 3:32 AM, Alejandro Escalante Medina > <alex.escalante@...> 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. > |
| Free embeddable forum powered by Nabble | Forum Help |