Hi Dan:

Thank you for the information.  I quickly read the servlet transport and
understood how to implement it.  I like the fact that you are using Spring
here. I use Spring alot.

If I had a "service" that need to called another REST service at some
arbitary URL that returned the data I am looking for, do I need to register
that "service" in the Spring bean config file?

Or should I simply use the JaxWsServerFactoryBean example;

sf.setAddress("http://www.helloworld.com:/9001/getTeam";);

I goal currently is to understand how I can use CXF to make a REST call to a
URL.  Get the return information, parse it or using JAXB to bind it to a
POJO.  The JaxWsServerFactoryBean looks very simple.  But I cannot find the
JavaDoc for it in the current Apache CXF 2.0 documentation to follow the
trail of what happens to the BeanInvoker.

If I can get the content returned from the REST service so I can parse it.
I would be happy for now.

Thanks,

Southin

On 2/19/07, Dan Diephouse <[EMAIL PROTECTED]> wrote:

Hi Southin,

Check out this sample:

http://envoisolutions.com/~dan/jettison-cxf-demo.tar.gz

It should provide a complete example of what you're looking to do.

I just spent a little bit of time writing up documentation on the servlet
transport:

http://cwiki.apache.org/confluence/display/CXF20DOC/Servlet+Transport

We're in the midst of cleaning it up a little bit though. I am not 100%
sure
the servlet transport works with the HTTP binding/RESTful annotations
though. I think there is a bug that a user reported - I have only tested
it
with the standalone HTTP server though. I will see if we can get this
fixed
up this week though and publish a snapshot out for you test.

- Dan

On 2/19/07, Southin Simphoukham <[EMAIL PROTECTED]> wrote:
>
> Hi Dan:
>
> Actually, Do you have the source code for the people example?  Including
> PeopleServiceImpl and the schema?  If you do, I can look at it for
> reference.
>
> Thanks,
>
> Southin
>
> On 2/19/07, Dan Diephouse <[EMAIL PROTECTED]> wrote:
> >
> > Hi Southin,
> >
> > We use JAXB to do the databinding, so you need to tell JAXB that you
> want
> > a
> > particular property to be an attribute. If you're doing code first I
> think
> > it looks like this:
> >
> > public class People {
> >    @XmlAttribute
> >    public String getId() {...}
> > ..
> > }
> >
> > If you're doing schema first development, simply change your schema:
> >
> > <element name="People">
> > <complexType>
> > <attribute name="id" type="xsd:string"/>
> > </complexType>
> > </element>
> >
> > Cheers,
> > - Dan
> >
> >
> > On 2/19/07, Southin Simphoukham <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi:
> > >
> > > I am new to cxf and looked at the Restful Service/Http binding
> example.
> > In
> > > that example for People Service there was do attributes in the
element
> > > Person.
> > >
> > > Can someone provide me with code snippet in who to best retrieve an
> > > attribute in that scenario.
> > >
> > > For example,
> > >
> > > <getPeople>
> > > <Person id="123456">....<Person>
> > > </getPeople>
> > >
> > > Thank you,
> > >
> > > Southin
> > >
> >
> >
> >
> > --
> > Dan Diephouse
> > Envoi Solutions
> > http://envoisolutions.com | http://netzooid.com/blog
> >
>



--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

Reply via email to