You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Valerio Schiavoni <va...@gmail.com> on 2009/03/14 02:00:27 UTC

how to do the same without importing any Spring lib?

Hi,consider the following code, to export a java interface using the simple
frontend :

ServerFactoryBean wsServerFactoryBean = new ServerFactoryBean();

wsServerFactoryBean.setServiceClass(..)

wsServerFactoryBean.setAddress(..)

AegisDatabinding aDB = new AegisDatabinding();

AegisContext aegisContext = new AegisContext();

aegisContext.setWriteXsiTypes(true);

aDB.setAegisContext(aegisContext);

wsServerFactoryBean.getServiceFactory().setDataBinding(aDB);

final Object delegateItf = delegate.getFcInterface(itfName);

BeanInvoker invoker = new BeanInvoker(delegateItf);

wsServerFactoryBean.setInvoker(invoker);

server = wsServerFactoryBean.create();

to run this code, plenty spring libraries are imported.
The  idea is to reduce the disk-footprint of our library, by removing
apprently unrequired libraries.
Is Spring really required to execute the above code ?

Thanks for any suggestion
valerio
-- 
http://www.linkedin.com/in/vschiavoni
http://jroller.com/vschiavoni

Re: how to do the same without importing any Spring lib?

Posted by Valerio Schiavoni <va...@gmail.com>.
I forgot: i'm using CXF 2.1.4
Thanks
valerio

On Sat, Mar 14, 2009 at 2:00 AM, Valerio Schiavoni <
valerio.schiavoni@gmail.com> wrote:

> Hi,consider the following code, to export a java interface using the
> simple frontend :
>
> ServerFactoryBean wsServerFactoryBean = new ServerFactoryBean();
>
> wsServerFactoryBean.setServiceClass(..)
>
> wsServerFactoryBean.setAddress(..)
>
> AegisDatabinding aDB = new AegisDatabinding();
>
> AegisContext aegisContext = new AegisContext();
>
> aegisContext.setWriteXsiTypes(true);
>
> aDB.setAegisContext(aegisContext);
>
> wsServerFactoryBean.getServiceFactory().setDataBinding(aDB);
>
> final Object delegateItf = delegate.getFcInterface(itfName);
>
> BeanInvoker invoker = new BeanInvoker(delegateItf);
>
> wsServerFactoryBean.setInvoker(invoker);
>
> server = wsServerFactoryBean.create();
>
> to run this code, plenty spring libraries are imported.
> The  idea is to reduce the disk-footprint of our library, by removing
> apprently unrequired libraries.
> Is Spring really required to execute the above code ?
>
> Thanks for any suggestion
> valerio
> --
> http://www.linkedin.com/in/vschiavoni
> http://jroller.com/vschiavoni
>



-- 
http://www.linkedin.com/in/vschiavoni
http://jroller.com/vschiavoni

Re: how to do the same without importing any Spring lib?

Posted by Valerio Schiavoni <va...@gmail.com>.
On Mon, Mar 16, 2009 at 8:36 PM, Daniel Kulp <dk...@apache.org> wrote:

>
> Honestly, I don't see anything in there that would require the spring stuff
> since you are configuring everything programatically.  Thus, you may be
> able
> to exclude the spring jars.  I'd say "try it and see".


sorry for my previous email. Seems like the pom was already excluding spring
jars.

thanks a lot


>
>
-- 
http://www.linkedin.com/in/vschiavoni
http://jroller.com/vschiavoni

Re: how to do the same without importing any Spring lib?

Posted by Daniel Kulp <dk...@apache.org>.
Honestly, I don't see anything in there that would require the spring stuff 
since you are configuring everything programatically.  Thus, you may be able 
to exclude the spring jars.  I'd say "try it and see".

Dan


On Fri March 13 2009 9:00:27 pm Valerio Schiavoni wrote:
> Hi,consider the following code, to export a java interface using the simple
> frontend :
>
> ServerFactoryBean wsServerFactoryBean = new ServerFactoryBean();
>
> wsServerFactoryBean.setServiceClass(..)
>
> wsServerFactoryBean.setAddress(..)
>
> AegisDatabinding aDB = new AegisDatabinding();
>
> AegisContext aegisContext = new AegisContext();
>
> aegisContext.setWriteXsiTypes(true);
>
> aDB.setAegisContext(aegisContext);
>
> wsServerFactoryBean.getServiceFactory().setDataBinding(aDB);
>
> final Object delegateItf = delegate.getFcInterface(itfName);
>
> BeanInvoker invoker = new BeanInvoker(delegateItf);
>
> wsServerFactoryBean.setInvoker(invoker);
>
> server = wsServerFactoryBean.create();
>
> to run this code, plenty spring libraries are imported.
> The  idea is to reduce the disk-footprint of our library, by removing
> apprently unrequired libraries.
> Is Spring really required to execute the above code ?
>
> Thanks for any suggestion
> valerio

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