Hi,
I'm having a problem trying to build a client for my service with cxf.
My service is up and running, but whenever I try and access it from a
client I'm getting null pointer exceptions. The code to setup my client
looks like this:
// SNIP
JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
proxyFactory.getInInterceptors().add(new LoggingInInterceptor());
proxyFactory.getOutInterceptors().add(new LoggingOutInterceptor());
proxyFactory.setServiceClass(FluxionService.class);
proxyFactory.setAddress(serviceURL);
proxyFactory.setDataBinding(new AegisDatabinding());
FluxionService fs = (FluxionService)proxyFactory.create();
// SNIP
Now, I should be able to do:
Set<URI> uris = fs.getDataSources();
to retrieve a set of URIs from this service. When I make this call, I
get the following SOAP request and response:
Request:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:getDataSources
xmlns:ns1="http://service.fluxion.comparagrid.org/" />
</soap:Body>
</soap:Envelope>
Response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:getDataSourcesResponse
xmlns:ns1="http://service.fluxion.comparagrid.org/">
<return>
<ns2:anyURI
xmlns:ns2="http://impl.service.fluxion.comparagrid.org/">
http://metagenome.ncl.ac.uk/cgdemo.owl
</ns2:anyURI>
</return>
</ns1:getDataSourcesResponse>
</soap:Body>
</soap:Envelope>
That's exactly what I'd expect. However, the actual Set<URI> returned
in my app is null, so I'm seeing NPEs whenever I try and iterate over
this set. What's going on here? I'm relatively new to CXF as I've just
ported over from XFire so I'm prepared to admit that I might be missing
something fundamental but this looks pretty weird to me.
Any advice would be highly appreciated as this is driving me mad!
Thanks,
Tony
--
Tony Burdett
Software Developer,
ComparaGrid.
European Bioinformatics Institute
email: [EMAIL PROTECTED]
tel: 01223 494624