cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Questions
Date Sat, 15 Jan 2011 18:26:24 GMT
Hi

On Fri, Jan 14, 2011 at 9:07 PM, Anthony Lauro <ALauro@broadhop.com> wrote:

> Thank you for the quick replies.
>
> 1. Unfortunately I do really mean JAX-RS because the sample shows that it
> creates the 3 bindings that we want to expose - REST XML, REST JSON, and
> SOAP. We have a WSDL that we want to use as the canonical document , which
> is why I asked if we can do WSDL first with JAX-RS. I do understand that the
> JAX-RS process will create a WSDL and deploy that in the war but we were
> looking to do full contract based dev this time around.
>
>
Supporting WSDL2 would be one option but I'm not sure if it's going to
happen in CXF - we've seen users periodically asking about it. May be in the
longer term...

If the WSDL-driven code generation does not unwrap the schema elements into
multiple method parameters then you can easily do it with the help of the
no-annotations feature [1].

The jaxrs_jaxws_description_demo in the Talend SF distribution which Dan
referred to shows how to do it - you just need to 'apply' a bit more
description to the generated interface in the external user model, ex :

<resource name="org.bar.SoapInterface">
   <operation name="getData" produces="application/xml, application/json"/>
</resource>

and then create a jaxrs:server endpoint which will link to this external
model file, the model info can be inlined too.
CXF JAX-RS proxies can also consume the model info and use the same code
JAXWS proxies use for working with the service.

>From your answers I get the sense that it is not really possible to do that.
> So, my follow-up question is can WS-Security be implemented for the SOAP
> created via JAX-RS?
>
>
While it is not possible to reuse the WSDL bindings for XML/JSON, you can do
it as described above.
You can create a WS-Security/SOAP endpoint sharing the service code with the
JAX-RS endpoint without any problems.

Let me know please if you need more info

hope it helps
Sergey

[1]
http://cxf.apache.org/docs/jax-rs-advanced-features.html#JAX-RSAdvancedFeatures-RESTfulserviceswithoutannotations




> 2. Thank you - I will check that out.
>
> 3. I will definitely add what I can as I figure things out.
>
> Thanks,
>
> Tony
>
> Anthony Lauro | Senior Software Engineer
> alauro@broadhop.com
> 303 962 7219
>
> BroadHop, Inc.
> 1401 17th St.
> Suite 200
> Denver, Colorado 80202
>
>
> On Jan 14, 2011, at 1:45 PM, Daniel Kulp wrote:
>
> On Friday 14 January 2011 3:18:22 pm Anthony Lauro wrote:
> > 1. We are developing an Eclipse/Spring based OSGI environment - is it
> > possible to use WSDL first with JAX-RS and have that integrated via
> Spring
> > into the application?
>
> I assume you mean JAX-WS, not JAX-RS,  when talking about wsdl first.
>
> Yes. Definitely possible.     I think Servicemix has an example that shows
> this.  Not really sure though.
>
> Talend certainly does.   If you grab the Talend SF examples from:
>
> http://www.talend.com/resources/documentation.php#SF
>
> The "interceptors", "jaxrs-jaxws-description-first", and "jaxws-jms-spec"
> examples are all wsdl first and use Spring to startup the services within
> OSGi.
>
> > 2. Our build is a maven build so I would like to
> > have maven generate the code and compile it, but there is no
> documentation
> > about how to add parameters to the wsdl2java call in the pom.xml. How can
> > I add parameters to customize the wsdl2java call in the pom?
>
> I think all of the parameters have a configuration entry for them.   See:
> http://cxf.apache.org/docs/maven-cxf-codegen-plugin-wsdl-to-java.html
> for some examples.
>
> > 3. Does
> > anyone else think the CXF documentation is a bit thin? The examples
> > appeared at first to be helpful but I can't find anything that answers my
> > questions.
>
> We'd love to have some help updating the docs.  :-)   You just need to
> submit
> an ICLA:    http://apache.org/licenses/icla.txt
>
> Dan
>
>
>
> > Thanks,
> >
> > Tony
> >
> > Anthony Lauro | Senior Software Engineer
> > alauro@broadhop.com
> > 303 962 7219
> >
> > BroadHop, Inc.
> > 1401 17th St.
> > Suite 200
> > Denver, Colorado 80202
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message