Hi

I remember adding a system test as part of the patch where a provider is parameterized with DataSource, I'm wondering is it still there ?

Cheers, Sergey
----- Original Message ----- From: "Conrad O'Dea" <[EMAIL PROTECTED]>
To: <cxf-user@incubator.apache.org>
Sent: Wednesday, June 20, 2007 11:23 AM
Subject: cannot implement service using Provider<DataSource>


Howdy,

I'm trying to create a service with Provider<DataSource> which is
published using XML/HTTP.  I can publish the endpoint without problem
but invoking on the service does not work.

My Provider is declared as follows:

@WebServiceProvider(serviceName = "FooProvider")
@ServiceMode(value = Service.Mode.MESSAGE)
@BindingType(value = "http://cxf.apache.org/bindings/xformat";)
public class FooProvider implements Provider<DataSource> {
 ...
 public DataSource invoke(DataSource msg) {
   ...
 }
}
When my client invokes on this endpoint (as simple GET will do), I get
the NPE below.  I've debugged through this and when CXF is building
the InterfaceInfo bean for the service, it is not recognizing the
invoke method of the Provider implementation.  This is because
JaxWsServiceFactoryBean.isValid calls
WebServiceProviderConfiguration.isOperation which (amongst other
things) checks:

  (Source.class.isAssignableFrom(method.getParameterTypes()[0])
      || SOAPMessage.class.isAssignableFrom(method.getParameterTypes()[0])

so it looks like DataSource is not supported.  This is something that
worked previously. Is there anything else I need to do to re-enable
DataSource?

thanks
Conrad


INFO: Interceptor has thrown exception, unwinding now

java.lang.NullPointerException

at 
org.apache.cxf.frontend.SimpleMethodDispatcher.getMethod(SimpleMethodDispatcher.java:92)

at 
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:51)

at 
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:56)

at 
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)

at 
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:87)

at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)

at 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:67)

at 
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:253)

at 
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:213)

at 
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:54)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)

at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

at org.mortbay.jetty.Server.handle(Server.java:285)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)

at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:368)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Reply via email to