You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Rimy Sfm <at...@gmail.com> on 2011/04/14 11:31:07 UTC

Restful web service + CXF

Hi everyone,
I'm new to restful web services and cxf, can anyone help me with the
procedure needed to implement a restful web service using CXF because I'm
lost. 

Thanks



--
View this message in context: http://cxf.547215.n5.nabble.com/Restful-web-service-CXF-tp4302550p4302550.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: WSDLDocumentation annotation?

Posted by Daniel Kulp <dk...@apache.org>.
The WSDLDocumentation is only useful for WSDL elements, not stuff that is part 
of the Schema.    JAXB doesn't really provide any way to add documentation to 
the schema.  :-(

Dan


On Thursday 14 April 2011 12:12:16 PM Kessel, Christopher wrote:
> Stupid question, but I can't figure out how to use the @WSDLDocumentation
> annotation added in 2.3.3 (I'm upgrading from 2.2.12). I have a simple
> class like the following, but the WSDLDocumentation info doesn't show up
> in the generated wsdl. What am I doing wrong?
> 
> @XmlRootElement(name = "MyResponse")
> @WSDLDocumentation("WSDL doc test")
> public class MyResponse
> {
> ...implementation
> }
> 
> Thanks,
> Chris

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Re: WSDLDocumentation annotation?

Posted by Rimy Sfm <at...@gmail.com>.
I'm sorry Chris but I really don't have any idea about that.
I'm actually stucked with something else now. Do you know, by chance, how to
generate a client stub for restful web service from wadl? :(

2011/4/14 Kessel, Christopher [via CXF] <
ml-node+4303420-337606990-198223@n5.nabble.com>

> Stupid question, but I can't figure out how to use the @WSDLDocumentation
> annotation added in 2.3.3 (I'm upgrading from 2.2.12). I have a simple class
> like the following, but the WSDLDocumentation info doesn't show up in the
> generated wsdl. What am I doing wrong?
>
> @XmlRootElement(name = "MyResponse")
> @WSDLDocumentation("WSDL doc test")
> public class MyResponse
> {
> ...implementation
> }
>
> Thanks,
> Chris
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://cxf.547215.n5.nabble.com/Restful-web-service-CXF-tp4302550p4303420.html
>  To unsubscribe from Restful web service + CXF, click here<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4302550&code=YXRpdGFsbGFoLnJpbUBnbWFpbC5jb218NDMwMjU1MHwxNDkyNzAwMTIx>.
>
>


--
View this message in context: http://cxf.547215.n5.nabble.com/Restful-web-service-CXF-tp4302550p4331095.html
Sent from the cxf-user mailing list archive at Nabble.com.

WSDLDocumentation annotation?

Posted by "Kessel, Christopher" <ck...@transunion.com>.
Stupid question, but I can't figure out how to use the @WSDLDocumentation annotation added in 2.3.3 (I'm upgrading from 2.2.12). I have a simple class like the following, but the WSDLDocumentation info doesn't show up in the generated wsdl. What am I doing wrong?

@XmlRootElement(name = "MyResponse")
@WSDLDocumentation("WSDL doc test")
public class MyResponse
{
...implementation
}

Thanks,
Chris

Re: Restful web service + CXF

Posted by Rimy Sfm <at...@gmail.com>.
Thanks again :)

--
View this message in context: http://cxf.547215.n5.nabble.com/Restful-web-service-CXF-tp4302550p4302995.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Restful web service + CXF

Posted by Sergey Beryozkin <sb...@gmail.com>.
No problems, just read the docs and try the demos.

Yes, if you need the primitives wrapped or unwrapped then you'd have to
write a provider.
Input params which correspond to various URI parts can be primitives.

Just get prepared a bit :-)

Cheers, Sergey

On Thu, Apr 14, 2011 at 12:14 PM, Rimy Sfm <at...@gmail.com> wrote:

> Thank you :)
>
> For primitives types, it means that if I have to return an Integer or a
> float...I have to implement my own message body reader and writer?? (which
> by the way I don't know how to do :) )
> Can my service take as parameter or return a class instance???
>
> Sorry for pausing many questions at once. :(
>
> Thanks.
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Restful-web-service-CXF-tp4302550p4302758.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com>
http://sberyozkin.blogspot.com

Re: Restful web service + CXF

Posted by Rimy Sfm <at...@gmail.com>.
Thank you :)

For primitives types, it means that if I have to return an Integer or a
float...I have to implement my own message body reader and writer?? (which
by the way I don't know how to do :) )
Can my service take as parameter or return a class instance???

Sorry for pausing many questions at once. :(

Thanks.

--
View this message in context: http://cxf.547215.n5.nabble.com/Restful-web-service-CXF-tp4302550p4302758.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Restful web service + CXF

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

Please take you time and check
http://cxf.apache.org/docs/jax-rs.html

Next, try few basic demos in the CXF distribution in the the samples/jax_rs
folder.

Yes, WADL can be generated. Returning primitive types is supported by
default only for text/plan formats

Cheers, Sergey

On Thu, Apr 14, 2011 at 10:31 AM, Rimy Sfm <at...@gmail.com> wrote:

> Hi everyone,
> I'm new to restful web services and cxf, can anyone help me with the
> procedure needed to implement a restful web service using CXF because I'm
> lost.
>
> Thanks
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Restful-web-service-CXF-tp4302550p4302550.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Sergey Beryozkin

Application Integration Division of Talend <http://www.talend.com>
http://sberyozkin.blogspot.com