Hi,

And as a parallel; it would be nice to be have inheritance in the interface as well (the services are available both through REST and SOAP).

@javax.jws.WebService
public interface UserService extends AbstractService<User, Users>
{
}

Yes, hopefully it will work for you now in JAX-RS case as well...

Can you also open a JIRA (JAXWS component) so that the issue you reported below
can be traced ? If you could attach some sample test case then it would help...

thanks, Sergey



When calling "list()", the request arrives at the service and executes correctly, only when the result is send back an exception occurs. I think this has to do with how the JAXBContext is being created.


[442...@qtp-3867972-1] 2009-05-14 13:51:32,015 DEBUG nl.knowledgeplaza.profiler.services.AbstractServiceImpl.list(AbstractServiceImpl.java:67) list User size=4 May 14, 2009 1:51:52 PM org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Marshalling Error: class nl.knowledgeplaza.profiler.services.support.Users nor any of its super class is known to this context. at org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:159)
   at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:169)
at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:105) at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:74) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:89) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:302) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:265) at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
   at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[javax.xml.bind.JAXBException: class nl.knowledgeplaza.profiler.services.support.Users nor any of its super class is known to this context.] at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:328) at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:254) at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:75) at org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecoder.java:441) at org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:138)
   ... 21 more
Caused by: javax.xml.bind.JAXBException: class nl.knowledgeplaza.profiler.services.support.Users nor any of its super class is known to this context. at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:242) at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:257) at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:649) at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:151) at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:185) at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:305) at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:312) at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:71) at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:490) at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:325)
   ... 25 more
Caused by: javax.xml.bind.JAXBException: class nl.knowledgeplaza.profiler.services.support.Users nor any of its super class is known to this context. at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:566) at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:644)
   ... 32 more
May 14, 2009 1:51:52 PM org.apache.cxf.interceptor.LoggingInInterceptor logging
INFO: Inbound Message
----------------------------
Encoding: UTF-8
Content-Type: text/xml; charset=utf-8
Headers: {content-type=[text/xml; charset=utf-8], Content-Length=[415], Server=[Jetty(6.1.15)]} Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><ns1:listResponse xmlns:ns1="http://services.profiler.knowledgeplaza.nl/";><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Marshalling Error: class nl.knowledgeplaza.profiler.services.support.Users nor any of its super class is known to this context.</faultstring></soap:Fault></ns1:listResponse></soap:Body></soap:Envelope>
--------------------------------------



Reply via email to