Hi Nono,

Filters, providers, dispatch... that could get pretty advanced. I am currently sticking to just the basic annotations until I could thoroughly get the experience I need. The following should enable you to create the basics that you need:

For the ReST part: http://cwiki.apache.org/CXF20DOC/jax-rs.html#JAX-RS-Understandingthebasics For the SOAP part: http://cwiki.apache.org/CXF20DOC/developing-a-service.html#DevelopingaService-JavaFirstDevelopment

Note that this is java-first development. I believe this would be the easier way of having both in just one implementation class. Preferably though, you would have most of the annotations in your interface.

If you prefer wsdl-first (or wadl-first for rest), I believe there is also a section on that as well.

Hope this helps.

Gabo

Live Nono wrote:
ok, I'm gonna try that again, I obviously missed something. Then the
blog entry is speaking of filters which can of afraid me :$

thanks again, digging in :)

++

2009/8/14 Gabo Manuel <kman...@solegysystems.com>:
Hi Nono,

is there some documentation around on how to do them both together ?
The only thing close to it I found is this blog entry :
http://sberyozkin.blogspot.com/2008/07/rest-and-soap-united-in-cxf.html
which makes it seems not straightforward.

I am not sure how it is not as straightforward as it could get. But to get
you jump started, basically just combine/overlap the jax-rs and jax-ws tags
in your service interface. If you use annotation, then you could just do
something of the following:

@WebService(name="Service")
@SOAPBinding(use=Use.LITERAL, style=Style.RPC)
@Consumes("*/*")
@Produces("text/xml")
@Path("/ServicePath")
public interface Service
  @PUT
  @Path("/Some/Additional/Path/")
  @WebMethod
  @WebResult(name="resultName")
  public long method(
          @QueryParam("someParam")
          @WebParam(name="someParam")
          long someParam
          )

and in the implementation:

@WebService(endpointInterface="some.domain.Service", serviceName="Service",
portName="ServicePort")
public class ServiceImpl implements Service{

Simply, just combine the annotations of Jax-rs and jax-ws as specified in
the user's guide.

Hth.

Gabo
>
------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG - www.avg.com Version: 8.5.392 / Virus Database: 270.13.53/2299 - Release Date: 08/12/09 18:12:00

Reply via email to