You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Drew Hite <hi...@gmail.com> on 2007/09/07 15:07:03 UTC

returning tabular data from a webmethod

Hello,
I started using CXF a few days ago, and I'm trying to implement a "Java
first" web service.  I created the web service in the "Spring way" as
outlined here:
http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html and I
generated the client using WSDL2Java.  I would like one of the methods to
return data in a manner similar to java.sql.Resultset with rows and
columns.  I've tried making the return type String[][] and also
List<String[]>, but in both instances I get errors when I test using the
WSDL2Java generated proxies. Delimiting each column with a special character
like a pipe and returning a String[] does work, but I would like to return
the data in a more structured format.  Is there a tried and true way for
returning data returned from a database query for a CXF web service?

Thanks,
Drew

Re: returning tabular data from a webmethod

Posted by Drew Hite <hi...@gmail.com>.
Thanks, Benson.  I was using Axis WSDL2Java through the Web Services plugin
for IntelliJ.  When I generated my proxies through CXF WSDL2Java, my
problems went away.

Thanks,
Drew

On 9/7/07, Benson Margulies <bi...@basistech.com> wrote:
>
> I thought 2.0.1 was good enough. Could you please send more details? Are
> you using the CXF wsdl2java or someone elses? What error do you get?
>
> > -----Original Message-----
> > From: Drew Hite [mailto:hite.drew@gmail.com]
> > Sent: Friday, September 07, 2007 9:26 AM
> > To: cxf-user@incubator.apache.org
> > Subject: Re: returning tabular data from a webmethod
> >
> > 2.0.1.  Do you recommend moving to a snapshot build?
> >
> > On 9/7/07, Benson Margulies <bi...@basistech.com> wrote:
> > >
> > > What version do you have? Nested arrays were not feeling too swift
> in
> > > 2.0.
> > >
> > > > -----Original Message-----
> > > > From: Drew Hite [mailto:hite.drew@gmail.com]
> > > > Sent: Friday, September 07, 2007 9:07 AM
> > > > To: cxf-user@incubator.apache.org
> > > > Subject: returning tabular data from a webmethod
> > > >
> > > > Hello,
> > > > I started using CXF a few days ago, and I'm trying to implement a
> > > "Java
> > > > first" web service.  I created the web service in the "Spring way"
> as
> > > > outlined here:
> > > >
> http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
> > > and I
> > > > generated the client using WSDL2Java.  I would like one of the
> methods
> > > to
> > > > return data in a manner similar to java.sql.Resultset with rows
> and
> > > > columns.  I've tried making the return type String[][] and also
> > > > List<String[]>, but in both instances I get errors when I test
> using
> > > the
> > > > WSDL2Java generated proxies. Delimiting each column with a special
> > > > character
> > > > like a pipe and returning a String[] does work, but I would like
> to
> > > return
> > > > the data in a more structured format.  Is there a tried and true
> way
> > > for
> > > > returning data returned from a database query for a CXF web
> service?
> > > >
> > > > Thanks,
> > > > Drew
> > >
>

RE: returning tabular data from a webmethod

Posted by Benson Margulies <bi...@basistech.com>.
I thought 2.0.1 was good enough. Could you please send more details? Are
you using the CXF wsdl2java or someone elses? What error do you get?

> -----Original Message-----
> From: Drew Hite [mailto:hite.drew@gmail.com]
> Sent: Friday, September 07, 2007 9:26 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: returning tabular data from a webmethod
> 
> 2.0.1.  Do you recommend moving to a snapshot build?
> 
> On 9/7/07, Benson Margulies <bi...@basistech.com> wrote:
> >
> > What version do you have? Nested arrays were not feeling too swift
in
> > 2.0.
> >
> > > -----Original Message-----
> > > From: Drew Hite [mailto:hite.drew@gmail.com]
> > > Sent: Friday, September 07, 2007 9:07 AM
> > > To: cxf-user@incubator.apache.org
> > > Subject: returning tabular data from a webmethod
> > >
> > > Hello,
> > > I started using CXF a few days ago, and I'm trying to implement a
> > "Java
> > > first" web service.  I created the web service in the "Spring way"
as
> > > outlined here:
> > >
http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
> > and I
> > > generated the client using WSDL2Java.  I would like one of the
methods
> > to
> > > return data in a manner similar to java.sql.Resultset with rows
and
> > > columns.  I've tried making the return type String[][] and also
> > > List<String[]>, but in both instances I get errors when I test
using
> > the
> > > WSDL2Java generated proxies. Delimiting each column with a special
> > > character
> > > like a pipe and returning a String[] does work, but I would like
to
> > return
> > > the data in a more structured format.  Is there a tried and true
way
> > for
> > > returning data returned from a database query for a CXF web
service?
> > >
> > > Thanks,
> > > Drew
> >

Re: returning tabular data from a webmethod

Posted by Drew Hite <hi...@gmail.com>.
2.0.1.  Do you recommend moving to a snapshot build?

On 9/7/07, Benson Margulies <bi...@basistech.com> wrote:
>
> What version do you have? Nested arrays were not feeling too swift in
> 2.0.
>
> > -----Original Message-----
> > From: Drew Hite [mailto:hite.drew@gmail.com]
> > Sent: Friday, September 07, 2007 9:07 AM
> > To: cxf-user@incubator.apache.org
> > Subject: returning tabular data from a webmethod
> >
> > Hello,
> > I started using CXF a few days ago, and I'm trying to implement a
> "Java
> > first" web service.  I created the web service in the "Spring way" as
> > outlined here:
> > http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
> and I
> > generated the client using WSDL2Java.  I would like one of the methods
> to
> > return data in a manner similar to java.sql.Resultset with rows and
> > columns.  I've tried making the return type String[][] and also
> > List<String[]>, but in both instances I get errors when I test using
> the
> > WSDL2Java generated proxies. Delimiting each column with a special
> > character
> > like a pipe and returning a String[] does work, but I would like to
> return
> > the data in a more structured format.  Is there a tried and true way
> for
> > returning data returned from a database query for a CXF web service?
> >
> > Thanks,
> > Drew
>

RE: returning tabular data from a webmethod

Posted by Benson Margulies <bi...@basistech.com>.
What version do you have? Nested arrays were not feeling too swift in
2.0.

> -----Original Message-----
> From: Drew Hite [mailto:hite.drew@gmail.com]
> Sent: Friday, September 07, 2007 9:07 AM
> To: cxf-user@incubator.apache.org
> Subject: returning tabular data from a webmethod
> 
> Hello,
> I started using CXF a few days ago, and I'm trying to implement a
"Java
> first" web service.  I created the web service in the "Spring way" as
> outlined here:
> http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
and I
> generated the client using WSDL2Java.  I would like one of the methods
to
> return data in a manner similar to java.sql.Resultset with rows and
> columns.  I've tried making the return type String[][] and also
> List<String[]>, but in both instances I get errors when I test using
the
> WSDL2Java generated proxies. Delimiting each column with a special
> character
> like a pipe and returning a String[] does work, but I would like to
return
> the data in a more structured format.  Is there a tried and true way
for
> returning data returned from a database query for a CXF web service?
> 
> Thanks,
> Drew