You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Kalle Korhonen <ka...@gmail.com> on 2009/10/27 20:11:11 UTC

Re: (newbie & urgent !) i'd like to avoid generating the Service- and SEI-implementation at runtime

Hey Dan,

are there any examples out there on how to use sxc-jaxb-maven-plugin?
I know documentation for sxc is pretty scarce which is ok but it'd be
nice to have at least one simple example of the configuration options.
Couldn't find anything in sxc's svn repo.

Kalle


On Tue, Feb 10, 2009 at 10:14 AM, Daniel Kulp <dk...@apache.org> wrote:
>
> I have a feeling your are referring to all the "reader/writer" things that
> Axis2 likes to generate for everything.   If that's the case, then the answer
> pretty much is "there isn't a way".   That's really not how JAX-WS and JAXB
> (and thus CXF) work.   Things are much more dynamic.
>
> The CLOSEST thing is the SXC project at codehaus.   The latest stuff (0.7.3)
> has a maven plugin that will take the JAXB classes and generate
> readers/writers for it's stuff.   That requires the SXC runtime as well.
>
> Dan
>
>
>
> On Fri February 6 2009 4:55:21 am -wil- wrote:
>> hi,
>>
>> (i'm relatively new to CXF (which i find great (so far)).
>>
>> My case:
>> I'd like to avoid generating the (dynamic proxied) Service- and
>> SEI-implementation at runtime.
>> The reason is that i can't maintain the object references in the calling
>> client.
>>
>> This is my setup:
>> (actually almost the same as the Hello World example at:
>> http://cwiki.apache.org/CXF20DOC/how-do-i-develop-a-client.html, "WSDL2Java
>> generated Client")
>>
>> - i have a WDSL (url) provides by one of our clients (so, i don't own it,
>> and hence cannot change it)
>> - i used CXF's wsdl2java to generate the necessary stubs en client code.
>> This is the command:
>>    <some-dir>/apache-cxf-2.1.3/bin/wsdl2java -client -impl -d
>> <my_target_dir> clientx.wsdl
>> - service (a Service subclass), porttype(-interface) and a specific client
>> is generated, which is great.
>> - i then use the Client which works fine ...
>>
>> But (of course) a dynamic proxy is created every time which takes a lot of
>> time (including a bunch of HTTP GET's for getting WSDL and related XSD's).
>> The service has a bunch of operations, but i only call 1 operation at a
>> time. Actually executing the operation takes about 20% of the time,
>> generating the dynamic client stuff 80%.
>>
>> The WSDL is pretty static, so it would be nice to generate the 80% client
>> stuff (, package it in a jar) and use that code directly for within the
>> client at runtime.
>>
>> I know i can do it with apache axis2, but i like CXF so far, so please keep
>> me on that path :-)
>>
>> TIA!
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>