Re: JAX-WS client proxy returning nulls

2008-02-26 Thread Benson Margulies
Get rid of the service configuration on the server, or add it to the client.
It changes the rules for mapping packages to and from namespaces. I rewrote
the doc over the last few days to deconfuse this.

On Tue, Feb 26, 2008 at 9:03 AM, Tony Burdett <[EMAIL PROTECTED]> wrote:

> Benson,
>
> Thanks for the tips.  I have enabled AegisServiceConfiguration on the
> server side, yes, and I admit I was wondered if this was causing the
> problem.  I had found these docs before and I'd used them to set up
> things on the server side (although it's possible I'm doing this wrong),
> and I've tried tweaking things based on the new stuff in the Aegis
> docs.  I still haven't managed to solve the problem, though.
>
> The thing that was puzzling me is that the SOAP messages being
> sent/received seem to be correct.  I assume this means that my service
> is configured correctly, and that I haven't set the client up to
> correctly interpret the response - but I've tried directing my client to
> use the Aegis databinding in a variety of ways and still seem to be
> getting this null problem.  If I'm doing it incorrectly, does anyone
> have any code examples of how to do this?
>
> I can provide more details about my service/client configuration if that
> will help.
>
> Thanks again,
>
> Tony.
>
>
>
> Benson Margulies wrote:
> > Tony,
> >
> > Please check out the current (newly modified) Aegis doc. Perhaps you
> have
> > the 'AegisServiceConfiguration' enabled on the server side?
> >
> >
> >
> > On Tue, Feb 26, 2008 at 6:08 AM, Tony Burdett <[EMAIL PROTECTED]>
> wrote:
> >
> >
> >> 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 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:
> >>
> >>  http://schemas.xmlsoap.org/soap/envelope/";>
> >>
> >>   >> xmlns:ns1="http://service.fluxion.comparagrid.org/"; />
> >>
> >>  
> >>
> >> Response:
> >>
> >>  http://schemas.xmlsoap.org/soap/envelope/";>
> >>
> >>   >> xmlns:ns1="http://service.fluxion.comparagrid.org/";>
> >>
> >>   >> xmlns:ns2="http://impl.service.fluxion.comparagrid.org/";>
> >>http://metagenome.ncl.ac.uk/cgdemo.owl
> >>  
> >>
> >>  
> >>
> >>  
> >>
> >> That's exactly what I'd expect.  However, the actual Set 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
> >>
> >>
> >>
> >
> >
>
>
>


Re: JAX-WS client proxy returning nulls

2008-02-26 Thread Tony Burdett

Benson,

Thanks for the tips.  I have enabled AegisServiceConfiguration on the 
server side, yes, and I admit I was wondered if this was causing the 
problem.  I had found these docs before and I'd used them to set up 
things on the server side (although it's possible I'm doing this wrong), 
and I've tried tweaking things based on the new stuff in the Aegis 
docs.  I still haven't managed to solve the problem, though.


The thing that was puzzling me is that the SOAP messages being 
sent/received seem to be correct.  I assume this means that my service 
is configured correctly, and that I haven't set the client up to 
correctly interpret the response - but I've tried directing my client to 
use the Aegis databinding in a variety of ways and still seem to be 
getting this null problem.  If I'm doing it incorrectly, does anyone 
have any code examples of how to do this?


I can provide more details about my service/client configuration if that 
will help.


Thanks again,

Tony.



Benson Margulies wrote:

Tony,

Please check out the current (newly modified) Aegis doc. Perhaps you have
the 'AegisServiceConfiguration' enabled on the server side?



On Tue, Feb 26, 2008 at 6:08 AM, Tony Burdett <[EMAIL PROTECTED]> wrote:

  

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 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:

 http://schemas.xmlsoap.org/soap/envelope/";>
   
 http://service.fluxion.comparagrid.org/"; />
   
 

Response:

 http://schemas.xmlsoap.org/soap/envelope/";>
   
 http://service.fluxion.comparagrid.org/";>
   
 http://impl.service.fluxion.comparagrid.org/";>
   http://metagenome.ncl.ac.uk/cgdemo.owl
 
   
 
   
 

That's exactly what I'd expect.  However, the actual Set 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





  





Re: JAX-WS client proxy returning nulls

2008-02-26 Thread Benson Margulies
Tony,

Please check out the current (newly modified) Aegis doc. Perhaps you have
the 'AegisServiceConfiguration' enabled on the server side?



On Tue, Feb 26, 2008 at 6:08 AM, Tony Burdett <[EMAIL PROTECTED]> wrote:

> 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 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:
>
>  http://schemas.xmlsoap.org/soap/envelope/";>
>
>   xmlns:ns1="http://service.fluxion.comparagrid.org/"; />
>
>  
>
> Response:
>
>  http://schemas.xmlsoap.org/soap/envelope/";>
>
>   xmlns:ns1="http://service.fluxion.comparagrid.org/";>
>
>   xmlns:ns2="http://impl.service.fluxion.comparagrid.org/";>
>http://metagenome.ncl.ac.uk/cgdemo.owl
>  
>
>  
>
>  
>
> That's exactly what I'd expect.  However, the actual Set 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
>
>